From 123c8a7de21f1f6e936a0933c1e02363e352cb4c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 18:29:44 +0000 Subject: [PATCH] feat(api): manual updates --- README.md | 4 +- lib/orb.rb | 119 +- .../add_subscription_adjustment_params.rb | 292 +- .../models/add_subscription_price_params.rb | 8048 +++++++++++- lib/orb/models/address_input_model.rb | 49 - lib/orb/models/address_model.rb | 49 - lib/orb/models/adjustment_interval_model.rb | 46 - lib/orb/models/adjustment_model.rb | 425 - lib/orb/models/affected_block_model.rb | 31 - lib/orb/models/aggregated_cost_model.rb | 88 - lib/orb/models/alert.rb | 76 +- .../alert_create_for_subscription_params.rb | 26 +- lib/orb/models/alert_model.rb | 177 - lib/orb/models/alert_update_params.rb | 26 +- lib/orb/models/allocation_model.rb | 25 - .../models/amount_discount_interval_model.rb | 84 - lib/orb/models/amount_discount_model.rb | 60 - lib/orb/models/auto_collection_model.rb | 48 - lib/orb/models/backfill_model.rb | 141 - lib/orb/models/billable_metric.rb | 6 +- lib/orb/models/billable_metric_model.rb | 86 - .../models/billable_metric_simple_model.rb | 25 - lib/orb/models/billable_metric_tiny_model.rb | 19 - ...illing_cycle_anchor_configuration_model.rb | 40 - .../billing_cycle_configuration_model.rb | 48 - lib/orb/models/bps_config_model.rb | 27 - lib/orb/models/bulk_bps_config_model.rb | 50 - lib/orb/models/bulk_config_model.rb | 42 - lib/orb/models/coupon_model.rb | 104 - lib/orb/models/coupon_redemption_model.rb | 31 - .../models/create_customer_alert_request.rb | 26 +- lib/orb/models/credit_ledger_entries_model.rb | 25 - lib/orb/models/credit_ledger_entry_model.rb | 1046 -- lib/orb/models/credit_note.rb | 237 +- lib/orb/models/credit_note_discount_model.rb | 85 - lib/orb/models/credit_note_model.rb | 353 - lib/orb/models/credit_note_summary_model.rb | 58 - .../custom_rating_function_config_model.rb | 7 - lib/orb/models/customer.rb | 497 +- .../customer_balance_transaction_model.rb | 186 - lib/orb/models/customer_costs_model.rb | 19 - lib/orb/models/customer_create_params.rb | 632 +- .../models/customer_hierarchy_config_model.rb | 33 - lib/orb/models/customer_minified_model.rb | 25 - lib/orb/models/customer_model.rb | 455 - lib/orb/models/customer_tax_id_model.rb | 344 - .../customer_update_by_external_id_params.rb | 899 +- lib/orb/models/customer_update_params.rb | 889 +- .../balance_transaction_create_response.rb | 190 + .../balance_transaction_list_response.rb | 190 + .../cost_list_by_external_id_response.rb | 105 + .../models/customers/cost_list_response.rb | 105 + .../credit_list_by_external_id_response.rb} | 28 +- .../models/customers/credit_list_response.rb | 80 + ...er_create_entry_by_external_id_response.rb | 1394 ++ .../credits/ledger_create_entry_response.rb | 1393 ++ .../ledger_list_by_external_id_response.rb | 1393 ++ .../customers/credits/ledger_list_response.rb | 1389 ++ .../top_up_create_by_external_id_response.rb | 161 + .../credits/top_up_create_response.rb | 160 + .../top_up_list_by_external_id_response.rb | 161 + .../customers/credits/top_up_list_response.rb | 160 + .../dimensional_price_configuration_model.rb | 25 - .../models/dimensional_price_group_model.rb | 63 - lib/orb/models/dimensional_price_groups.rb | 6 +- lib/orb/models/discount_model.rb | 92 - lib/orb/models/discount_override_model.rb | 68 - lib/orb/models/edit_customer_model.rb | 307 - lib/orb/models/edit_plan_model.rb | 31 - .../models/events/backfill_close_response.rb | 143 + .../models/events/backfill_create_response.rb | 143 + .../models/events/backfill_fetch_response.rb | 143 + .../models/events/backfill_list_response.rb | 143 + .../models/events/backfill_revert_response.rb | 143 + ...fixed_fee_quantity_schedule_entry_model.rb | 37 - lib/orb/models/invoice.rb | 1907 ++- lib/orb/models/invoice_create_params.rb | 21 +- .../models/invoice_fetch_upcoming_response.rb | 1921 ++- .../models/invoice_level_discount_model.rb | 50 - ...b => invoice_line_item_create_response.rb} | 288 +- lib/orb/models/invoice_model.rb | 522 - lib/orb/models/item.rb | 63 +- .../models/item_external_connection_model.rb | 62 - lib/orb/models/item_model.rb | 41 - lib/orb/models/item_slim_model.rb | 25 - lib/orb/models/item_update_params.rb | 65 +- lib/orb/models/matrix_config_model.rb | 34 - lib/orb/models/matrix_value_model.rb | 29 - .../matrix_with_allocation_config_model.rb | 41 - lib/orb/models/maximum_interval_model.rb | 49 - lib/orb/models/maximum_model.rb | 28 - lib/orb/models/minimum_interval_model.rb | 49 - lib/orb/models/minimum_model.rb | 28 - lib/orb/models/mutated_subscription_model.rb | 324 - ...new_accounting_sync_configuration_model.rb | 47 - lib/orb/models/new_adjustment_model.rb | 287 - lib/orb/models/new_allocation_price_model.rb | 80 - .../new_billing_cycle_configuration_model.rb | 52 - lib/orb/models/new_floating_price_model.rb | 5233 -------- .../new_reporting_configuration_model.rb | 19 - .../models/new_subscription_price_model.rb | 4935 ------- lib/orb/models/new_tax_configuration_model.rb | 80 - lib/orb/models/package_config_model.rb | 28 - lib/orb/models/pagination_metadata_model.rb | 25 - lib/orb/models/payment_attempt_model.rb | 77 - .../percentage_discount_interval_model.rb | 85 - lib/orb/models/percentage_discount_model.rb | 61 - lib/orb/models/plan.rb | 583 +- lib/orb/models/plan_create_params.rb | 3303 ++++- lib/orb/models/plan_minified_model.rb | 34 - lib/orb/models/plan_model.rb | 430 - lib/orb/models/plan_update_params.rb | 22 +- .../plans/external_plan_id_update_params.rb | 22 +- lib/orb/models/price.rb | 7852 +++++++++-- lib/orb/models/price_create_params.rb | 838 +- ...val_fixed_fee_quantity_transition_model.rb | 27 - lib/orb/models/price_interval_model.rb | 145 - lib/orb/models/price_model.rb | 7176 ---------- .../replace_subscription_adjustment_params.rb | 293 +- .../replace_subscription_price_params.rb | 8053 +++++++++++- .../models/sub_line_item_grouping_model.rb | 26 - lib/orb/models/subscription.rb | 1063 +- .../models/subscription_cancel_response.rb | 1308 ++ lib/orb/models/subscription_create_params.rb | 41 +- .../models/subscription_create_response.rb | 1308 ++ .../subscription_fetch_costs_response.rb | 90 +- .../subscription_fetch_schedule_response.rb | 35 +- lib/orb/models/subscription_minified_model.rb | 19 - lib/orb/models/subscription_model.rb | 343 - .../subscription_price_intervals_params.rb | 9326 ++++++++++++- .../subscription_price_intervals_response.rb | 1315 ++ ...ubscription_schedule_plan_change_params.rb | 41 +- ...scription_schedule_plan_change_response.rb | 1315 ++ .../models/subscription_trial_info_model.rb | 19 - .../subscription_trigger_phase_response.rb | 1315 ++ ...iption_unschedule_cancellation_response.rb | 1315 ++ ...ule_fixed_fee_quantity_updates_response.rb | 1319 ++ ...nschedule_pending_plan_changes_response.rb | 1315 ++ ...tion_update_fixed_fee_quantity_response.rb | 1315 ++ .../subscription_update_trial_response.rb | 1313 ++ lib/orb/models/subscription_usage.rb | 120 +- lib/orb/models/subscriptions.rb | 6 +- lib/orb/models/subscriptions_model.rb | 25 - lib/orb/models/tax_amount_model.rb | 34 - lib/orb/models/threshold_model.rb | 25 - lib/orb/models/tiered_bps_config_model.rb | 57 - lib/orb/models/tiered_config_model.rb | 49 - lib/orb/models/top_up_model.rb | 154 - lib/orb/models/top_ups_model.rb | 25 - lib/orb/models/trial_discount_model.rb | 76 - lib/orb/models/unit_config_model.rb | 20 - .../models/usage_discount_interval_model.rb | 85 - lib/orb/models/usage_model.rb | 31 - lib/orb/resources/alerts.rb | 40 +- lib/orb/resources/coupons.rb | 16 +- lib/orb/resources/coupons/subscriptions.rb | 4 +- lib/orb/resources/credit_notes.rb | 12 +- lib/orb/resources/customers.rb | 70 +- .../customers/balance_transactions.rb | 8 +- lib/orb/resources/customers/costs.rb | 8 +- lib/orb/resources/customers/credits.rb | 8 +- lib/orb/resources/customers/credits/ledger.rb | 16 +- .../resources/customers/credits/top_ups.rb | 16 +- lib/orb/resources/dimensional_price_groups.rb | 12 +- .../external_dimensional_price_group_id.rb | 4 +- lib/orb/resources/events/backfills.rb | 20 +- lib/orb/resources/invoice_line_items.rb | 4 +- lib/orb/resources/invoices.rb | 32 +- lib/orb/resources/items.rb | 24 +- lib/orb/resources/metrics.rb | 16 +- lib/orb/resources/plans.rb | 22 +- lib/orb/resources/plans/external_plan_id.rb | 8 +- lib/orb/resources/prices.rb | 118 +- lib/orb/resources/prices/external_price_id.rb | 8 +- lib/orb/resources/subscriptions.rb | 56 +- .../add_subscription_adjustment_params.rbi | 399 +- .../models/add_subscription_price_params.rbi | 9215 ++++++++++++- rbi/lib/orb/models/address_input_model.rbi | 85 - rbi/lib/orb/models/address_model.rbi | 85 - .../orb/models/adjustment_interval_model.rbi | 116 - rbi/lib/orb/models/adjustment_model.rbi | 519 - rbi/lib/orb/models/affected_block_model.rbi | 41 - rbi/lib/orb/models/aggregated_cost_model.rbi | 304 - rbi/lib/orb/models/alert.rbi | 92 +- .../alert_create_for_subscription_params.rbi | 29 +- rbi/lib/orb/models/alert_model.rbi | 237 - rbi/lib/orb/models/alert_update_params.rbi | 32 +- rbi/lib/orb/models/allocation_model.rbi | 31 - .../models/amount_discount_interval_model.rbi | 102 - rbi/lib/orb/models/amount_discount_model.rbi | 75 - rbi/lib/orb/models/auto_collection_model.rbi | 65 - rbi/lib/orb/models/backfill_model.rbi | 160 - rbi/lib/orb/models/billable_metric.rbi | 8 +- rbi/lib/orb/models/billable_metric_model.rbi | 97 - .../models/billable_metric_simple_model.rbi | 31 - .../orb/models/billable_metric_tiny_model.rbi | 23 - ...lling_cycle_anchor_configuration_model.rbi | 39 - .../billing_cycle_configuration_model.rbi | 42 - rbi/lib/orb/models/bps_config_model.rbi | 31 - rbi/lib/orb/models/bulk_bps_config_model.rbi | 70 - rbi/lib/orb/models/bulk_config_model.rbi | 52 - rbi/lib/orb/models/coupon_model.rbi | 114 - .../orb/models/coupon_redemption_model.rbi | 39 - .../models/create_customer_alert_request.rbi | 41 +- .../models/credit_ledger_entries_model.rbi | 106 - .../orb/models/credit_ledger_entry_model.rbi | 1342 -- rbi/lib/orb/models/credit_note.rbi | 338 +- .../orb/models/credit_note_discount_model.rbi | 120 - rbi/lib/orb/models/credit_note_model.rbi | 447 - .../orb/models/credit_note_summary_model.rbi | 95 - .../custom_rating_function_config_model.rbi | 7 - rbi/lib/orb/models/customer.rbi | 463 +- .../customer_balance_transaction_model.rbi | 207 - rbi/lib/orb/models/customer_costs_model.rbi | 23 - rbi/lib/orb/models/customer_create_params.rbi | 650 +- .../customer_hierarchy_config_model.rbi | 31 - .../orb/models/customer_minified_model.rbi | 31 - rbi/lib/orb/models/customer_model.rbi | 432 - rbi/lib/orb/models/customer_tax_id_model.rbi | 206 - .../customer_update_by_external_id_params.rbi | 857 +- rbi/lib/orb/models/customer_update_params.rbi | 847 +- .../balance_transaction_create_response.rbi | 209 + .../balance_transaction_list_response.rbi | 209 + .../cost_list_by_external_id_response.rbi | 327 + .../models/customers/cost_list_response.rbi | 327 + .../credit_list_by_external_id_response.rbi} | 45 +- .../models/customers/credit_list_response.rbi | 116 + ...r_create_entry_by_external_id_response.rbi | 1984 +++ .../credits/ledger_create_entry_response.rbi | 1906 +++ .../ledger_list_by_external_id_response.rbi | 1950 +++ .../credits/ledger_list_response.rbi | 1878 +++ .../top_up_create_by_external_id_response.rbi | 192 + .../credits/top_up_create_response.rbi | 192 + .../top_up_list_by_external_id_response.rbi | 192 + .../credits/top_up_list_response.rbi | 192 + .../dimensional_price_configuration_model.rbi | 31 - .../models/dimensional_price_group_model.rbi | 92 - .../orb/models/dimensional_price_groups.rbi | 13 +- rbi/lib/orb/models/discount_model.rbi | 78 - .../orb/models/discount_override_model.rbi | 77 - rbi/lib/orb/models/edit_customer_model.rbi | 275 - rbi/lib/orb/models/edit_plan_model.rbi | 45 - .../models/events/backfill_close_response.rbi | 162 + .../events/backfill_create_response.rbi | 162 + .../models/events/backfill_fetch_response.rbi | 162 + .../models/events/backfill_list_response.rbi | 162 + .../events/backfill_revert_response.rbi | 162 + ...ixed_fee_quantity_schedule_entry_model.rbi | 49 - rbi/lib/orb/models/invoice.rbi | 2590 +++- rbi/lib/orb/models/invoice_create_params.rbi | 29 +- .../invoice_fetch_upcoming_response.rbi | 2626 +++- .../models/invoice_level_discount_model.rbi | 18 - ... => invoice_line_item_create_response.rbi} | 623 +- rbi/lib/orb/models/invoice_model.rbi | 525 - rbi/lib/orb/models/item.rbi | 52 +- .../models/item_external_connection_model.rbi | 47 - rbi/lib/orb/models/item_model.rbi | 68 - rbi/lib/orb/models/item_slim_model.rbi | 31 - rbi/lib/orb/models/item_update_params.rbi | 52 +- rbi/lib/orb/models/matrix_config_model.rbi | 55 - rbi/lib/orb/models/matrix_value_model.rbi | 31 - .../matrix_with_allocation_config_model.rbi | 65 - rbi/lib/orb/models/maximum_interval_model.rbi | 81 - rbi/lib/orb/models/maximum_model.rbi | 31 - rbi/lib/orb/models/minimum_interval_model.rbi | 81 - rbi/lib/orb/models/minimum_model.rbi | 31 - .../orb/models/mutated_subscription_model.rbi | 383 - ...ew_accounting_sync_configuration_model.rbi | 74 - rbi/lib/orb/models/new_adjustment_model.rbi | 354 - .../orb/models/new_allocation_price_model.rbi | 67 - .../new_billing_cycle_configuration_model.rbi | 42 - .../orb/models/new_floating_price_model.rbi | 5958 --------- .../new_reporting_configuration_model.rbi | 23 - .../models/new_subscription_price_model.rbi | 5594 -------- .../models/new_tax_configuration_model.rbi | 88 - rbi/lib/orb/models/package_config_model.rbi | 31 - .../orb/models/pagination_metadata_model.rbi | 31 - rbi/lib/orb/models/payment_attempt_model.rbi | 95 - .../percentage_discount_interval_model.rbi | 102 - .../orb/models/percentage_discount_model.rbi | 75 - rbi/lib/orb/models/plan.rbi | 1038 +- rbi/lib/orb/models/plan_create_params.rbi | 3646 +++++- rbi/lib/orb/models/plan_minified_model.rbi | 47 - rbi/lib/orb/models/plan_model.rbi | 840 -- rbi/lib/orb/models/plan_update_params.rbi | 43 +- .../plans/external_plan_id_update_params.rbi | 43 +- rbi/lib/orb/models/price.rbi | 9592 ++++++++++++-- rbi/lib/orb/models/price_create_params.rbi | 1228 +- ...al_fixed_fee_quantity_transition_model.rbi | 31 - rbi/lib/orb/models/price_interval_model.rbi | 329 - rbi/lib/orb/models/price_model.rbi | 10382 --------------- ...replace_subscription_adjustment_params.rbi | 399 +- .../replace_subscription_price_params.rbi | 9223 ++++++++++++- .../models/sub_line_item_grouping_model.rbi | 31 - rbi/lib/orb/models/subscription.rbi | 1617 ++- .../models/subscription_cancel_response.rbi | 1891 +++ .../orb/models/subscription_create_params.rbi | 44 +- .../models/subscription_create_response.rbi | 1891 +++ .../subscription_fetch_costs_response.rbi | 310 +- .../subscription_fetch_schedule_response.rbi | 60 +- .../models/subscription_minified_model.rbi | 23 - rbi/lib/orb/models/subscription_model.rbi | 383 - .../subscription_price_intervals_params.rbi | 10793 +++++++++++++++- .../subscription_price_intervals_response.rbi | 1901 +++ ...bscription_schedule_plan_change_params.rbi | 44 +- ...cription_schedule_plan_change_response.rbi | 1901 +++ .../models/subscription_trial_info_model.rbi | 23 - .../subscription_trigger_phase_response.rbi | 1901 +++ ...ption_unschedule_cancellation_response.rbi | 1901 +++ ...le_fixed_fee_quantity_updates_response.rbi | 1929 +++ ...schedule_pending_plan_changes_response.rbi | 1903 +++ ...ion_update_fixed_fee_quantity_response.rbi | 1901 +++ .../subscription_update_trial_response.rbi | 1901 +++ rbi/lib/orb/models/subscription_usage.rbi | 164 +- rbi/lib/orb/models/subscriptions.rbi | 13 +- rbi/lib/orb/models/subscriptions_model.rbi | 42 - rbi/lib/orb/models/tax_amount_model.rbi | 49 - rbi/lib/orb/models/threshold_model.rbi | 23 - .../orb/models/tiered_bps_config_model.rbi | 86 - rbi/lib/orb/models/tiered_config_model.rbi | 60 - rbi/lib/orb/models/top_up_model.rbi | 185 - rbi/lib/orb/models/top_ups_model.rbi | 34 - rbi/lib/orb/models/trial_discount_model.rbi | 91 - rbi/lib/orb/models/unit_config_model.rbi | 23 - .../models/usage_discount_interval_model.rbi | 102 - rbi/lib/orb/models/usage_model.rbi | 39 - rbi/lib/orb/resources/alerts.rbi | 24 +- rbi/lib/orb/resources/coupons.rbi | 8 +- .../orb/resources/coupons/subscriptions.rbi | 2 +- rbi/lib/orb/resources/credit_notes.rbi | 6 +- rbi/lib/orb/resources/customers.rbi | 60 +- .../customers/balance_transactions.rbi | 4 +- rbi/lib/orb/resources/customers/costs.rbi | 4 +- rbi/lib/orb/resources/customers/credits.rbi | 4 +- .../resources/customers/credits/ledger.rbi | 56 +- .../resources/customers/credits/top_ups.rbi | 8 +- .../resources/dimensional_price_groups.rbi | 6 +- .../external_dimensional_price_group_id.rbi | 2 +- rbi/lib/orb/resources/events/backfills.rbi | 10 +- rbi/lib/orb/resources/invoice_line_items.rbi | 2 +- rbi/lib/orb/resources/invoices.rbi | 16 +- rbi/lib/orb/resources/items.rbi | 10 +- rbi/lib/orb/resources/metrics.rbi | 8 +- rbi/lib/orb/resources/plans.rbi | 8 +- .../orb/resources/plans/external_plan_id.rbi | 4 +- rbi/lib/orb/resources/prices.rbi | 313 +- .../resources/prices/external_price_id.rbi | 112 +- rbi/lib/orb/resources/subscriptions.rbi | 30 +- .../add_subscription_adjustment_params.rbs | 191 +- .../models/add_subscription_price_params.rbs | 4413 ++++++- sig/orb/models/address_input_model.rbs | 40 - sig/orb/models/address_model.rbs | 40 - sig/orb/models/adjustment_interval_model.rbs | 38 - sig/orb/models/adjustment_model.rbs | 238 - sig/orb/models/affected_block_model.rbs | 20 - sig/orb/models/aggregated_cost_model.rbs | 72 - sig/orb/models/alert.rbs | 56 +- .../alert_create_for_subscription_params.rbs | 21 +- sig/orb/models/alert_model.rbs | 114 - sig/orb/models/alert_update_params.rbs | 20 +- sig/orb/models/allocation_model.rbs | 17 - .../models/amount_discount_interval_model.rbs | 50 - sig/orb/models/amount_discount_model.rbs | 40 - sig/orb/models/auto_collection_model.rbs | 32 - sig/orb/models/backfill_model.rbs | 71 - sig/orb/models/billable_metric.rbs | 6 +- sig/orb/models/billable_metric_model.rbs | 50 - .../models/billable_metric_simple_model.rbs | 19 - sig/orb/models/billable_metric_tiny_model.rbs | 17 - ...lling_cycle_anchor_configuration_model.rbs | 23 - .../billing_cycle_configuration_model.rbs | 35 - sig/orb/models/bps_config_model.rbs | 17 - sig/orb/models/bulk_bps_config_model.rbs | 39 - sig/orb/models/bulk_config_model.rbs | 30 - sig/orb/models/coupon_model.rbs | 51 - sig/orb/models/coupon_redemption_model.rbs | 20 - .../models/create_customer_alert_request.rbs | 21 +- .../models/credit_ledger_entries_model.rbs | 26 - sig/orb/models/credit_ledger_entry_model.rbs | 591 - sig/orb/models/credit_note.rbs | 189 +- sig/orb/models/credit_note_discount_model.rbs | 63 - sig/orb/models/credit_note_model.rbs | 209 - sig/orb/models/credit_note_summary_model.rbs | 46 - .../custom_rating_function_config_model.rbs | 7 - sig/orb/models/customer.rbs | 477 +- .../customer_balance_transaction_model.rbs | 122 - sig/orb/models/customer_costs_model.rbs | 16 - sig/orb/models/customer_create_params.rbs | 594 +- .../models/customer_credit_balances_model.rbs | 79 - .../customer_hierarchy_config_model.rbs | 25 - sig/orb/models/customer_minified_model.rbs | 17 - sig/orb/models/customer_model.rbs | 212 - sig/orb/models/customer_tax_id_model.rbs | 340 - .../customer_update_by_external_id_params.rbs | 646 +- sig/orb/models/customer_update_params.rbs | 644 +- .../balance_transaction_create_response.rbs | 125 + .../balance_transaction_list_response.rbs | 125 + .../cost_list_by_external_id_response.rbs | 97 + .../models/customers/cost_list_response.rbs | 94 + .../credit_list_by_external_id_response.rbs | 58 + .../models/customers/credit_list_response.rbs | 57 + ...r_create_entry_by_external_id_response.rbs | 882 ++ .../credits/ledger_create_entry_response.rbs | 882 ++ .../ledger_list_by_external_id_response.rbs | 882 ++ .../credits/ledger_list_response.rbs | 882 ++ .../top_up_create_by_external_id_response.rbs | 98 + .../credits/top_up_create_response.rbs | 98 + .../top_up_list_by_external_id_response.rbs | 98 + .../credits/top_up_list_response.rbs | 98 + .../dimensional_price_configuration_model.rbs | 24 - .../models/dimensional_price_group_model.rbs | 42 - sig/orb/models/dimensional_price_groups.rbs | 6 +- sig/orb/models/discount_model.rbs | 44 - sig/orb/models/discount_override_model.rbs | 42 - sig/orb/models/edit_customer_model.rbs | 97 - sig/orb/models/edit_plan_model.rbs | 18 - .../models/events/backfill_close_response.rbs | 75 + .../events/backfill_create_response.rbs | 75 + .../models/events/backfill_fetch_response.rbs | 75 + .../models/events/backfill_list_response.rbs | 75 + .../events/backfill_revert_response.rbs | 75 + ...ixed_fee_quantity_schedule_entry_model.rbs | 30 - sig/orb/models/invoice.rbs | 1408 +- sig/orb/models/invoice_create_params.rbs | 21 +- .../invoice_fetch_upcoming_response.rbs | 1434 +- .../models/invoice_level_discount_model.rbs | 12 - ... => invoice_line_item_create_response.rbs} | 257 +- sig/orb/models/invoice_model.rbs | 202 - sig/orb/models/item.rbs | 50 +- .../models/item_external_connection_model.rbs | 47 - sig/orb/models/item_model.rbs | 32 - sig/orb/models/item_slim_model.rbs | 17 - sig/orb/models/item_update_params.rbs | 51 +- sig/orb/models/matrix_config_model.rbs | 28 - sig/orb/models/matrix_value_model.rbs | 18 - .../matrix_with_allocation_config_model.rbs | 35 - sig/orb/models/maximum_interval_model.rbs | 36 - sig/orb/models/maximum_model.rbs | 18 - sig/orb/models/minimum_interval_model.rbs | 36 - sig/orb/models/minimum_model.rbs | 18 - sig/orb/models/mutated_subscription_model.rbs | 137 - ...ew_accounting_sync_configuration_model.rbs | 45 - sig/orb/models/new_adjustment_model.rbs | 186 - sig/orb/models/new_allocation_price_model.rbs | 48 - .../new_billing_cycle_configuration_model.rbs | 36 - sig/orb/models/new_floating_price_model.rbs | 2557 ---- .../new_reporting_configuration_model.rbs | 17 - .../models/new_subscription_price_model.rbs | 2384 ---- .../models/new_tax_configuration_model.rbs | 57 - sig/orb/models/package_config_model.rbs | 18 - sig/orb/models/pagination_metadata_model.rbs | 19 - sig/orb/models/payment_attempt_model.rbs | 48 - .../percentage_discount_interval_model.rbs | 50 - sig/orb/models/percentage_discount_model.rbs | 42 - sig/orb/models/plan.rbs | 369 +- sig/orb/models/plan_create_params.rbs | 2376 +++- sig/orb/models/plan_minified_model.rbs | 20 - sig/orb/models/plan_model.rbs | 239 - sig/orb/models/plan_update_params.rbs | 16 +- .../plans/external_plan_id_update_params.rbs | 16 +- sig/orb/models/price.rbs | 6941 ++++++++-- sig/orb/models/price_create_params.rbs | 567 +- ...al_fixed_fee_quantity_transition_model.rbs | 21 - sig/orb/models/price_interval_model.rbs | 76 - sig/orb/models/price_model.rbs | 3801 ------ ...replace_subscription_adjustment_params.rbs | 191 +- .../replace_subscription_price_params.rbs | 4413 ++++++- .../models/sub_line_item_grouping_model.rbs | 19 - sig/orb/models/subscription.rbs | 684 +- .../models/subscription_cancel_response.rbs | 758 ++ sig/orb/models/subscription_create_params.rbs | 26 +- .../models/subscription_create_response.rbs | 758 ++ .../subscription_fetch_costs_response.rbs | 80 +- .../subscription_fetch_schedule_response.rbs | 25 +- .../models/subscription_minified_model.rbs | 17 - sig/orb/models/subscription_model.rbs | 135 - .../subscription_price_intervals_params.rbs | 5232 +++++++- .../subscription_price_intervals_response.rbs | 759 ++ ...bscription_schedule_plan_change_params.rbs | 26 +- ...cription_schedule_plan_change_response.rbs | 759 ++ .../models/subscription_trial_info_model.rbs | 17 - .../subscription_trigger_phase_response.rbs | 759 ++ ...ption_unschedule_cancellation_response.rbs | 759 ++ ...le_fixed_fee_quantity_updates_response.rbs | 759 ++ ...schedule_pending_plan_changes_response.rbs | 759 ++ ...ion_update_fixed_fee_quantity_response.rbs | 759 ++ .../subscription_update_trial_response.rbs | 758 ++ sig/orb/models/subscription_usage.rbs | 106 +- sig/orb/models/subscriptions.rbs | 6 +- sig/orb/models/subscriptions_model.rbs | 24 - sig/orb/models/tax_amount_model.rbs | 28 - sig/orb/models/threshold_model.rbs | 15 - sig/orb/models/tiered_bps_config_model.rbs | 47 - sig/orb/models/tiered_config_model.rbs | 34 - sig/orb/models/top_up_model.rbs | 90 - sig/orb/models/top_ups_model.rbs | 24 - sig/orb/models/trial_discount_model.rbs | 44 - sig/orb/models/unit_config_model.rbs | 15 - .../models/usage_discount_interval_model.rbs | 50 - sig/orb/models/usage_model.rbs | 20 - sig/orb/resources/alerts.rbs | 40 +- sig/orb/resources/coupons.rbs | 16 +- sig/orb/resources/coupons/subscriptions.rbs | 4 +- sig/orb/resources/credit_notes.rbs | 12 +- sig/orb/resources/customers.rbs | 70 +- .../customers/balance_transactions.rbs | 8 +- sig/orb/resources/customers/costs.rbs | 8 +- sig/orb/resources/customers/credits.rbs | 8 +- .../resources/customers/credits/ledger.rbs | 16 +- .../resources/customers/credits/top_ups.rbs | 16 +- .../resources/dimensional_price_groups.rbs | 12 +- .../external_dimensional_price_group_id.rbs | 4 +- sig/orb/resources/events/backfills.rbs | 20 +- sig/orb/resources/invoice_line_items.rbs | 4 +- sig/orb/resources/invoices.rbs | 32 +- sig/orb/resources/items.rbs | 18 +- sig/orb/resources/metrics.rbs | 16 +- sig/orb/resources/plans.rbs | 16 +- sig/orb/resources/plans/external_plan_id.rbs | 8 +- sig/orb/resources/prices.rbs | 59 +- .../resources/prices/external_price_id.rbs | 8 +- sig/orb/resources/subscriptions.rbs | 56 +- test/orb/resources/alerts_test.rb | 112 +- .../resources/coupons/subscriptions_test.rb | 26 +- test/orb/resources/coupons_test.rb | 16 +- test/orb/resources/credit_notes_test.rb | 42 +- .../customers/balance_transactions_test.rb | 20 +- test/orb/resources/customers/costs_test.rb | 8 +- .../customers/credits/ledger_test.rb | 8 +- .../customers/credits/top_ups_test.rb | 24 +- test/orb/resources/customers/credits_test.rb | 8 +- test/orb/resources/customers_test.rb | 96 +- ...xternal_dimensional_price_group_id_test.rb | 2 +- .../dimensional_price_groups_test.rb | 6 +- test/orb/resources/events/backfills_test.rb | 20 +- test/orb/resources/invoice_line_items_test.rb | 14 +- test/orb/resources/invoices_test.rb | 264 +- test/orb/resources/items_test.rb | 16 +- test/orb/resources/metrics_test.rb | 24 +- .../resources/plans/external_plan_id_test.rb | 40 +- test/orb/resources/plans_test.rb | 80 +- .../prices/external_price_id_test.rb | 4 +- test/orb/resources/prices_test.rb | 8 +- test/orb/resources/subscriptions_test.rb | 342 +- 544 files changed, 194496 insertions(+), 80534 deletions(-) delete mode 100644 lib/orb/models/address_input_model.rb delete mode 100644 lib/orb/models/address_model.rb delete mode 100644 lib/orb/models/adjustment_interval_model.rb delete mode 100644 lib/orb/models/adjustment_model.rb delete mode 100644 lib/orb/models/affected_block_model.rb delete mode 100644 lib/orb/models/aggregated_cost_model.rb delete mode 100644 lib/orb/models/alert_model.rb delete mode 100644 lib/orb/models/allocation_model.rb delete mode 100644 lib/orb/models/amount_discount_interval_model.rb delete mode 100644 lib/orb/models/amount_discount_model.rb delete mode 100644 lib/orb/models/auto_collection_model.rb delete mode 100644 lib/orb/models/backfill_model.rb delete mode 100644 lib/orb/models/billable_metric_model.rb delete mode 100644 lib/orb/models/billable_metric_simple_model.rb delete mode 100644 lib/orb/models/billable_metric_tiny_model.rb delete mode 100644 lib/orb/models/billing_cycle_anchor_configuration_model.rb delete mode 100644 lib/orb/models/billing_cycle_configuration_model.rb delete mode 100644 lib/orb/models/bps_config_model.rb delete mode 100644 lib/orb/models/bulk_bps_config_model.rb delete mode 100644 lib/orb/models/bulk_config_model.rb delete mode 100644 lib/orb/models/coupon_model.rb delete mode 100644 lib/orb/models/coupon_redemption_model.rb delete mode 100644 lib/orb/models/credit_ledger_entries_model.rb delete mode 100644 lib/orb/models/credit_ledger_entry_model.rb delete mode 100644 lib/orb/models/credit_note_discount_model.rb delete mode 100644 lib/orb/models/credit_note_model.rb delete mode 100644 lib/orb/models/credit_note_summary_model.rb delete mode 100644 lib/orb/models/custom_rating_function_config_model.rb delete mode 100644 lib/orb/models/customer_balance_transaction_model.rb delete mode 100644 lib/orb/models/customer_costs_model.rb delete mode 100644 lib/orb/models/customer_hierarchy_config_model.rb delete mode 100644 lib/orb/models/customer_minified_model.rb delete mode 100644 lib/orb/models/customer_model.rb delete mode 100644 lib/orb/models/customer_tax_id_model.rb create mode 100644 lib/orb/models/customers/balance_transaction_create_response.rb create mode 100644 lib/orb/models/customers/balance_transaction_list_response.rb create mode 100644 lib/orb/models/customers/cost_list_by_external_id_response.rb create mode 100644 lib/orb/models/customers/cost_list_response.rb rename lib/orb/models/{customer_credit_balances_model.rb => customers/credit_list_by_external_id_response.rb} (63%) create mode 100644 lib/orb/models/customers/credit_list_response.rb create mode 100644 lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb create mode 100644 lib/orb/models/customers/credits/ledger_create_entry_response.rb create mode 100644 lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb create mode 100644 lib/orb/models/customers/credits/ledger_list_response.rb create mode 100644 lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb create mode 100644 lib/orb/models/customers/credits/top_up_create_response.rb create mode 100644 lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb create mode 100644 lib/orb/models/customers/credits/top_up_list_response.rb delete mode 100644 lib/orb/models/dimensional_price_configuration_model.rb delete mode 100644 lib/orb/models/dimensional_price_group_model.rb delete mode 100644 lib/orb/models/discount_model.rb delete mode 100644 lib/orb/models/discount_override_model.rb delete mode 100644 lib/orb/models/edit_customer_model.rb delete mode 100644 lib/orb/models/edit_plan_model.rb create mode 100644 lib/orb/models/events/backfill_close_response.rb create mode 100644 lib/orb/models/events/backfill_create_response.rb create mode 100644 lib/orb/models/events/backfill_fetch_response.rb create mode 100644 lib/orb/models/events/backfill_list_response.rb create mode 100644 lib/orb/models/events/backfill_revert_response.rb delete mode 100644 lib/orb/models/fixed_fee_quantity_schedule_entry_model.rb delete mode 100644 lib/orb/models/invoice_level_discount_model.rb rename lib/orb/models/{invoice_line_item_model.rb => invoice_line_item_create_response.rb} (62%) delete mode 100644 lib/orb/models/invoice_model.rb delete mode 100644 lib/orb/models/item_external_connection_model.rb delete mode 100644 lib/orb/models/item_model.rb delete mode 100644 lib/orb/models/item_slim_model.rb delete mode 100644 lib/orb/models/matrix_config_model.rb delete mode 100644 lib/orb/models/matrix_value_model.rb delete mode 100644 lib/orb/models/matrix_with_allocation_config_model.rb delete mode 100644 lib/orb/models/maximum_interval_model.rb delete mode 100644 lib/orb/models/maximum_model.rb delete mode 100644 lib/orb/models/minimum_interval_model.rb delete mode 100644 lib/orb/models/minimum_model.rb delete mode 100644 lib/orb/models/mutated_subscription_model.rb delete mode 100644 lib/orb/models/new_accounting_sync_configuration_model.rb delete mode 100644 lib/orb/models/new_adjustment_model.rb delete mode 100644 lib/orb/models/new_allocation_price_model.rb delete mode 100644 lib/orb/models/new_billing_cycle_configuration_model.rb delete mode 100644 lib/orb/models/new_floating_price_model.rb delete mode 100644 lib/orb/models/new_reporting_configuration_model.rb delete mode 100644 lib/orb/models/new_subscription_price_model.rb delete mode 100644 lib/orb/models/new_tax_configuration_model.rb delete mode 100644 lib/orb/models/package_config_model.rb delete mode 100644 lib/orb/models/pagination_metadata_model.rb delete mode 100644 lib/orb/models/payment_attempt_model.rb delete mode 100644 lib/orb/models/percentage_discount_interval_model.rb delete mode 100644 lib/orb/models/percentage_discount_model.rb delete mode 100644 lib/orb/models/plan_minified_model.rb delete mode 100644 lib/orb/models/plan_model.rb delete mode 100644 lib/orb/models/price_interval_fixed_fee_quantity_transition_model.rb delete mode 100644 lib/orb/models/price_interval_model.rb delete mode 100644 lib/orb/models/price_model.rb delete mode 100644 lib/orb/models/sub_line_item_grouping_model.rb create mode 100644 lib/orb/models/subscription_cancel_response.rb create mode 100644 lib/orb/models/subscription_create_response.rb delete mode 100644 lib/orb/models/subscription_minified_model.rb delete mode 100644 lib/orb/models/subscription_model.rb create mode 100644 lib/orb/models/subscription_price_intervals_response.rb create mode 100644 lib/orb/models/subscription_schedule_plan_change_response.rb delete mode 100644 lib/orb/models/subscription_trial_info_model.rb create mode 100644 lib/orb/models/subscription_trigger_phase_response.rb create mode 100644 lib/orb/models/subscription_unschedule_cancellation_response.rb create mode 100644 lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb create mode 100644 lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb create mode 100644 lib/orb/models/subscription_update_fixed_fee_quantity_response.rb create mode 100644 lib/orb/models/subscription_update_trial_response.rb delete mode 100644 lib/orb/models/subscriptions_model.rb delete mode 100644 lib/orb/models/tax_amount_model.rb delete mode 100644 lib/orb/models/threshold_model.rb delete mode 100644 lib/orb/models/tiered_bps_config_model.rb delete mode 100644 lib/orb/models/tiered_config_model.rb delete mode 100644 lib/orb/models/top_up_model.rb delete mode 100644 lib/orb/models/top_ups_model.rb delete mode 100644 lib/orb/models/trial_discount_model.rb delete mode 100644 lib/orb/models/unit_config_model.rb delete mode 100644 lib/orb/models/usage_discount_interval_model.rb delete mode 100644 lib/orb/models/usage_model.rb delete mode 100644 rbi/lib/orb/models/address_input_model.rbi delete mode 100644 rbi/lib/orb/models/address_model.rbi delete mode 100644 rbi/lib/orb/models/adjustment_interval_model.rbi delete mode 100644 rbi/lib/orb/models/adjustment_model.rbi delete mode 100644 rbi/lib/orb/models/affected_block_model.rbi delete mode 100644 rbi/lib/orb/models/aggregated_cost_model.rbi delete mode 100644 rbi/lib/orb/models/alert_model.rbi delete mode 100644 rbi/lib/orb/models/allocation_model.rbi delete mode 100644 rbi/lib/orb/models/amount_discount_interval_model.rbi delete mode 100644 rbi/lib/orb/models/amount_discount_model.rbi delete mode 100644 rbi/lib/orb/models/auto_collection_model.rbi delete mode 100644 rbi/lib/orb/models/backfill_model.rbi delete mode 100644 rbi/lib/orb/models/billable_metric_model.rbi delete mode 100644 rbi/lib/orb/models/billable_metric_simple_model.rbi delete mode 100644 rbi/lib/orb/models/billable_metric_tiny_model.rbi delete mode 100644 rbi/lib/orb/models/billing_cycle_anchor_configuration_model.rbi delete mode 100644 rbi/lib/orb/models/billing_cycle_configuration_model.rbi delete mode 100644 rbi/lib/orb/models/bps_config_model.rbi delete mode 100644 rbi/lib/orb/models/bulk_bps_config_model.rbi delete mode 100644 rbi/lib/orb/models/bulk_config_model.rbi delete mode 100644 rbi/lib/orb/models/coupon_model.rbi delete mode 100644 rbi/lib/orb/models/coupon_redemption_model.rbi delete mode 100644 rbi/lib/orb/models/credit_ledger_entries_model.rbi delete mode 100644 rbi/lib/orb/models/credit_ledger_entry_model.rbi delete mode 100644 rbi/lib/orb/models/credit_note_discount_model.rbi delete mode 100644 rbi/lib/orb/models/credit_note_model.rbi delete mode 100644 rbi/lib/orb/models/credit_note_summary_model.rbi delete mode 100644 rbi/lib/orb/models/custom_rating_function_config_model.rbi delete mode 100644 rbi/lib/orb/models/customer_balance_transaction_model.rbi delete mode 100644 rbi/lib/orb/models/customer_costs_model.rbi delete mode 100644 rbi/lib/orb/models/customer_hierarchy_config_model.rbi delete mode 100644 rbi/lib/orb/models/customer_minified_model.rbi delete mode 100644 rbi/lib/orb/models/customer_model.rbi delete mode 100644 rbi/lib/orb/models/customer_tax_id_model.rbi create mode 100644 rbi/lib/orb/models/customers/balance_transaction_create_response.rbi create mode 100644 rbi/lib/orb/models/customers/balance_transaction_list_response.rbi create mode 100644 rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi create mode 100644 rbi/lib/orb/models/customers/cost_list_response.rbi rename rbi/lib/orb/models/{customer_credit_balances_model.rbi => customers/credit_list_by_external_id_response.rbi} (68%) create mode 100644 rbi/lib/orb/models/customers/credit_list_response.rbi create mode 100644 rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi create mode 100644 rbi/lib/orb/models/customers/credits/ledger_create_entry_response.rbi create mode 100644 rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rbi create mode 100644 rbi/lib/orb/models/customers/credits/ledger_list_response.rbi create mode 100644 rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rbi create mode 100644 rbi/lib/orb/models/customers/credits/top_up_create_response.rbi create mode 100644 rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rbi create mode 100644 rbi/lib/orb/models/customers/credits/top_up_list_response.rbi delete mode 100644 rbi/lib/orb/models/dimensional_price_configuration_model.rbi delete mode 100644 rbi/lib/orb/models/dimensional_price_group_model.rbi delete mode 100644 rbi/lib/orb/models/discount_model.rbi delete mode 100644 rbi/lib/orb/models/discount_override_model.rbi delete mode 100644 rbi/lib/orb/models/edit_customer_model.rbi delete mode 100644 rbi/lib/orb/models/edit_plan_model.rbi create mode 100644 rbi/lib/orb/models/events/backfill_close_response.rbi create mode 100644 rbi/lib/orb/models/events/backfill_create_response.rbi create mode 100644 rbi/lib/orb/models/events/backfill_fetch_response.rbi create mode 100644 rbi/lib/orb/models/events/backfill_list_response.rbi create mode 100644 rbi/lib/orb/models/events/backfill_revert_response.rbi delete mode 100644 rbi/lib/orb/models/fixed_fee_quantity_schedule_entry_model.rbi delete mode 100644 rbi/lib/orb/models/invoice_level_discount_model.rbi rename rbi/lib/orb/models/{invoice_line_item_model.rbi => invoice_line_item_create_response.rbi} (55%) delete mode 100644 rbi/lib/orb/models/invoice_model.rbi delete mode 100644 rbi/lib/orb/models/item_external_connection_model.rbi delete mode 100644 rbi/lib/orb/models/item_model.rbi delete mode 100644 rbi/lib/orb/models/item_slim_model.rbi delete mode 100644 rbi/lib/orb/models/matrix_config_model.rbi delete mode 100644 rbi/lib/orb/models/matrix_value_model.rbi delete mode 100644 rbi/lib/orb/models/matrix_with_allocation_config_model.rbi delete mode 100644 rbi/lib/orb/models/maximum_interval_model.rbi delete mode 100644 rbi/lib/orb/models/maximum_model.rbi delete mode 100644 rbi/lib/orb/models/minimum_interval_model.rbi delete mode 100644 rbi/lib/orb/models/minimum_model.rbi delete mode 100644 rbi/lib/orb/models/mutated_subscription_model.rbi delete mode 100644 rbi/lib/orb/models/new_accounting_sync_configuration_model.rbi delete mode 100644 rbi/lib/orb/models/new_adjustment_model.rbi delete mode 100644 rbi/lib/orb/models/new_allocation_price_model.rbi delete mode 100644 rbi/lib/orb/models/new_billing_cycle_configuration_model.rbi delete mode 100644 rbi/lib/orb/models/new_floating_price_model.rbi delete mode 100644 rbi/lib/orb/models/new_reporting_configuration_model.rbi delete mode 100644 rbi/lib/orb/models/new_subscription_price_model.rbi delete mode 100644 rbi/lib/orb/models/new_tax_configuration_model.rbi delete mode 100644 rbi/lib/orb/models/package_config_model.rbi delete mode 100644 rbi/lib/orb/models/pagination_metadata_model.rbi delete mode 100644 rbi/lib/orb/models/payment_attempt_model.rbi delete mode 100644 rbi/lib/orb/models/percentage_discount_interval_model.rbi delete mode 100644 rbi/lib/orb/models/percentage_discount_model.rbi delete mode 100644 rbi/lib/orb/models/plan_minified_model.rbi delete mode 100644 rbi/lib/orb/models/plan_model.rbi delete mode 100644 rbi/lib/orb/models/price_interval_fixed_fee_quantity_transition_model.rbi delete mode 100644 rbi/lib/orb/models/price_interval_model.rbi delete mode 100644 rbi/lib/orb/models/price_model.rbi delete mode 100644 rbi/lib/orb/models/sub_line_item_grouping_model.rbi create mode 100644 rbi/lib/orb/models/subscription_cancel_response.rbi create mode 100644 rbi/lib/orb/models/subscription_create_response.rbi delete mode 100644 rbi/lib/orb/models/subscription_minified_model.rbi delete mode 100644 rbi/lib/orb/models/subscription_model.rbi create mode 100644 rbi/lib/orb/models/subscription_price_intervals_response.rbi create mode 100644 rbi/lib/orb/models/subscription_schedule_plan_change_response.rbi delete mode 100644 rbi/lib/orb/models/subscription_trial_info_model.rbi create mode 100644 rbi/lib/orb/models/subscription_trigger_phase_response.rbi create mode 100644 rbi/lib/orb/models/subscription_unschedule_cancellation_response.rbi create mode 100644 rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi create mode 100644 rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rbi create mode 100644 rbi/lib/orb/models/subscription_update_fixed_fee_quantity_response.rbi create mode 100644 rbi/lib/orb/models/subscription_update_trial_response.rbi delete mode 100644 rbi/lib/orb/models/subscriptions_model.rbi delete mode 100644 rbi/lib/orb/models/tax_amount_model.rbi delete mode 100644 rbi/lib/orb/models/threshold_model.rbi delete mode 100644 rbi/lib/orb/models/tiered_bps_config_model.rbi delete mode 100644 rbi/lib/orb/models/tiered_config_model.rbi delete mode 100644 rbi/lib/orb/models/top_up_model.rbi delete mode 100644 rbi/lib/orb/models/top_ups_model.rbi delete mode 100644 rbi/lib/orb/models/trial_discount_model.rbi delete mode 100644 rbi/lib/orb/models/unit_config_model.rbi delete mode 100644 rbi/lib/orb/models/usage_discount_interval_model.rbi delete mode 100644 rbi/lib/orb/models/usage_model.rbi delete mode 100644 sig/orb/models/address_input_model.rbs delete mode 100644 sig/orb/models/address_model.rbs delete mode 100644 sig/orb/models/adjustment_interval_model.rbs delete mode 100644 sig/orb/models/adjustment_model.rbs delete mode 100644 sig/orb/models/affected_block_model.rbs delete mode 100644 sig/orb/models/aggregated_cost_model.rbs delete mode 100644 sig/orb/models/alert_model.rbs delete mode 100644 sig/orb/models/allocation_model.rbs delete mode 100644 sig/orb/models/amount_discount_interval_model.rbs delete mode 100644 sig/orb/models/amount_discount_model.rbs delete mode 100644 sig/orb/models/auto_collection_model.rbs delete mode 100644 sig/orb/models/backfill_model.rbs delete mode 100644 sig/orb/models/billable_metric_model.rbs delete mode 100644 sig/orb/models/billable_metric_simple_model.rbs delete mode 100644 sig/orb/models/billable_metric_tiny_model.rbs delete mode 100644 sig/orb/models/billing_cycle_anchor_configuration_model.rbs delete mode 100644 sig/orb/models/billing_cycle_configuration_model.rbs delete mode 100644 sig/orb/models/bps_config_model.rbs delete mode 100644 sig/orb/models/bulk_bps_config_model.rbs delete mode 100644 sig/orb/models/bulk_config_model.rbs delete mode 100644 sig/orb/models/coupon_model.rbs delete mode 100644 sig/orb/models/coupon_redemption_model.rbs delete mode 100644 sig/orb/models/credit_ledger_entries_model.rbs delete mode 100644 sig/orb/models/credit_ledger_entry_model.rbs delete mode 100644 sig/orb/models/credit_note_discount_model.rbs delete mode 100644 sig/orb/models/credit_note_model.rbs delete mode 100644 sig/orb/models/credit_note_summary_model.rbs delete mode 100644 sig/orb/models/custom_rating_function_config_model.rbs delete mode 100644 sig/orb/models/customer_balance_transaction_model.rbs delete mode 100644 sig/orb/models/customer_costs_model.rbs delete mode 100644 sig/orb/models/customer_credit_balances_model.rbs delete mode 100644 sig/orb/models/customer_hierarchy_config_model.rbs delete mode 100644 sig/orb/models/customer_minified_model.rbs delete mode 100644 sig/orb/models/customer_model.rbs delete mode 100644 sig/orb/models/customer_tax_id_model.rbs create mode 100644 sig/orb/models/customers/balance_transaction_create_response.rbs create mode 100644 sig/orb/models/customers/balance_transaction_list_response.rbs create mode 100644 sig/orb/models/customers/cost_list_by_external_id_response.rbs create mode 100644 sig/orb/models/customers/cost_list_response.rbs create mode 100644 sig/orb/models/customers/credit_list_by_external_id_response.rbs create mode 100644 sig/orb/models/customers/credit_list_response.rbs create mode 100644 sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs create mode 100644 sig/orb/models/customers/credits/ledger_create_entry_response.rbs create mode 100644 sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs create mode 100644 sig/orb/models/customers/credits/ledger_list_response.rbs create mode 100644 sig/orb/models/customers/credits/top_up_create_by_external_id_response.rbs create mode 100644 sig/orb/models/customers/credits/top_up_create_response.rbs create mode 100644 sig/orb/models/customers/credits/top_up_list_by_external_id_response.rbs create mode 100644 sig/orb/models/customers/credits/top_up_list_response.rbs delete mode 100644 sig/orb/models/dimensional_price_configuration_model.rbs delete mode 100644 sig/orb/models/dimensional_price_group_model.rbs delete mode 100644 sig/orb/models/discount_model.rbs delete mode 100644 sig/orb/models/discount_override_model.rbs delete mode 100644 sig/orb/models/edit_customer_model.rbs delete mode 100644 sig/orb/models/edit_plan_model.rbs create mode 100644 sig/orb/models/events/backfill_close_response.rbs create mode 100644 sig/orb/models/events/backfill_create_response.rbs create mode 100644 sig/orb/models/events/backfill_fetch_response.rbs create mode 100644 sig/orb/models/events/backfill_list_response.rbs create mode 100644 sig/orb/models/events/backfill_revert_response.rbs delete mode 100644 sig/orb/models/fixed_fee_quantity_schedule_entry_model.rbs delete mode 100644 sig/orb/models/invoice_level_discount_model.rbs rename sig/orb/models/{invoice_line_item_model.rbs => invoice_line_item_create_response.rbs} (51%) delete mode 100644 sig/orb/models/invoice_model.rbs delete mode 100644 sig/orb/models/item_external_connection_model.rbs delete mode 100644 sig/orb/models/item_model.rbs delete mode 100644 sig/orb/models/item_slim_model.rbs delete mode 100644 sig/orb/models/matrix_config_model.rbs delete mode 100644 sig/orb/models/matrix_value_model.rbs delete mode 100644 sig/orb/models/matrix_with_allocation_config_model.rbs delete mode 100644 sig/orb/models/maximum_interval_model.rbs delete mode 100644 sig/orb/models/maximum_model.rbs delete mode 100644 sig/orb/models/minimum_interval_model.rbs delete mode 100644 sig/orb/models/minimum_model.rbs delete mode 100644 sig/orb/models/mutated_subscription_model.rbs delete mode 100644 sig/orb/models/new_accounting_sync_configuration_model.rbs delete mode 100644 sig/orb/models/new_adjustment_model.rbs delete mode 100644 sig/orb/models/new_allocation_price_model.rbs delete mode 100644 sig/orb/models/new_billing_cycle_configuration_model.rbs delete mode 100644 sig/orb/models/new_floating_price_model.rbs delete mode 100644 sig/orb/models/new_reporting_configuration_model.rbs delete mode 100644 sig/orb/models/new_subscription_price_model.rbs delete mode 100644 sig/orb/models/new_tax_configuration_model.rbs delete mode 100644 sig/orb/models/package_config_model.rbs delete mode 100644 sig/orb/models/pagination_metadata_model.rbs delete mode 100644 sig/orb/models/payment_attempt_model.rbs delete mode 100644 sig/orb/models/percentage_discount_interval_model.rbs delete mode 100644 sig/orb/models/percentage_discount_model.rbs delete mode 100644 sig/orb/models/plan_minified_model.rbs delete mode 100644 sig/orb/models/plan_model.rbs delete mode 100644 sig/orb/models/price_interval_fixed_fee_quantity_transition_model.rbs delete mode 100644 sig/orb/models/price_interval_model.rbs delete mode 100644 sig/orb/models/price_model.rbs delete mode 100644 sig/orb/models/sub_line_item_grouping_model.rbs create mode 100644 sig/orb/models/subscription_cancel_response.rbs create mode 100644 sig/orb/models/subscription_create_response.rbs delete mode 100644 sig/orb/models/subscription_minified_model.rbs delete mode 100644 sig/orb/models/subscription_model.rbs create mode 100644 sig/orb/models/subscription_price_intervals_response.rbs create mode 100644 sig/orb/models/subscription_schedule_plan_change_response.rbs delete mode 100644 sig/orb/models/subscription_trial_info_model.rbs create mode 100644 sig/orb/models/subscription_trigger_phase_response.rbs create mode 100644 sig/orb/models/subscription_unschedule_cancellation_response.rbs create mode 100644 sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs create mode 100644 sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs create mode 100644 sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs create mode 100644 sig/orb/models/subscription_update_trial_response.rbs delete mode 100644 sig/orb/models/subscriptions_model.rbs delete mode 100644 sig/orb/models/tax_amount_model.rbs delete mode 100644 sig/orb/models/threshold_model.rbs delete mode 100644 sig/orb/models/tiered_bps_config_model.rbs delete mode 100644 sig/orb/models/tiered_config_model.rbs delete mode 100644 sig/orb/models/top_up_model.rbs delete mode 100644 sig/orb/models/top_ups_model.rbs delete mode 100644 sig/orb/models/trial_discount_model.rbs delete mode 100644 sig/orb/models/unit_config_model.rbs delete mode 100644 sig/orb/models/usage_discount_interval_model.rbs delete mode 100644 sig/orb/models/usage_model.rbs diff --git a/README.md b/README.md index 47cb77cc..2f5c5740 100644 --- a/README.md +++ b/README.md @@ -41,9 +41,9 @@ orb = Orb::Client.new( api_key: "My API Key" # defaults to ENV["ORB_API_KEY"] ) -customer_model = orb.customers.create(email: "example-customer@withorb.com", name: "My Customer") +customer = orb.customers.create(email: "example-customer@withorb.com", name: "My Customer") -puts(customer_model.id) +puts(customer.id) ``` ### Errors diff --git a/lib/orb.rb b/lib/orb.rb index dc6e9dce..5188db93 100644 --- a/lib/orb.rb +++ b/lib/orb.rb @@ -32,18 +32,9 @@ require_relative "orb/models/create_customer_alert_request" require_relative "orb/models/add_credit_ledger_entry_request" require_relative "orb/models/add_credit_top_up_request" -require_relative "orb/models/edit_customer_model" -require_relative "orb/models/edit_plan_model" -require_relative "orb/models/new_floating_price_model" require_relative "orb/models/update_price_request_params" -require_relative "orb/models/address_input_model" -require_relative "orb/models/address_model" require_relative "orb/models/add_subscription_adjustment_params" require_relative "orb/models/add_subscription_price_params" -require_relative "orb/models/adjustment_interval_model" -require_relative "orb/models/adjustment_model" -require_relative "orb/models/affected_block_model" -require_relative "orb/models/aggregated_cost_model" require_relative "orb/models/alert" require_relative "orb/models/alert_create_for_customer_params" require_relative "orb/models/alert_create_for_external_customer_params" @@ -51,104 +42,89 @@ require_relative "orb/models/alert_disable_params" require_relative "orb/models/alert_enable_params" require_relative "orb/models/alert_list_params" -require_relative "orb/models/alert_model" require_relative "orb/models/alert_retrieve_params" require_relative "orb/models/alert_update_params" -require_relative "orb/models/allocation_model" require_relative "orb/models/amount_discount" -require_relative "orb/models/amount_discount_interval_model" -require_relative "orb/models/amount_discount_model" -require_relative "orb/models/auto_collection_model" -require_relative "orb/models/backfill_model" require_relative "orb/models/billable_metric" -require_relative "orb/models/billable_metric_model" -require_relative "orb/models/billable_metric_simple_model" -require_relative "orb/models/billable_metric_tiny_model" -require_relative "orb/models/billing_cycle_anchor_configuration_model" -require_relative "orb/models/billing_cycle_configuration_model" require_relative "orb/models/billing_cycle_relative_date" -require_relative "orb/models/bps_config_model" -require_relative "orb/models/bulk_bps_config_model" -require_relative "orb/models/bulk_config_model" require_relative "orb/models/coupon" require_relative "orb/models/coupon_archive_params" require_relative "orb/models/coupon_create_params" require_relative "orb/models/coupon_fetch_params" require_relative "orb/models/coupon_list_params" -require_relative "orb/models/coupon_model" -require_relative "orb/models/coupon_redemption_model" require_relative "orb/models/coupons/subscription_list_params" -require_relative "orb/models/credit_ledger_entries_model" -require_relative "orb/models/credit_ledger_entry_model" require_relative "orb/models/credit_note" require_relative "orb/models/credit_note_create_params" -require_relative "orb/models/credit_note_discount_model" require_relative "orb/models/credit_note_fetch_params" require_relative "orb/models/credit_note_list_params" -require_relative "orb/models/credit_note_model" -require_relative "orb/models/credit_note_summary_model" require_relative "orb/models/customer" -require_relative "orb/models/customer_balance_transaction_model" -require_relative "orb/models/customer_costs_model" require_relative "orb/models/customer_create_params" -require_relative "orb/models/customer_credit_balances_model" require_relative "orb/models/customer_delete_params" require_relative "orb/models/customer_fetch_by_external_id_params" require_relative "orb/models/customer_fetch_params" -require_relative "orb/models/customer_hierarchy_config_model" require_relative "orb/models/customer_list_params" -require_relative "orb/models/customer_minified_model" -require_relative "orb/models/customer_model" require_relative "orb/models/customers/balance_transaction_create_params" +require_relative "orb/models/customers/balance_transaction_create_response" require_relative "orb/models/customers/balance_transaction_list_params" +require_relative "orb/models/customers/balance_transaction_list_response" require_relative "orb/models/customers/cost_list_by_external_id_params" +require_relative "orb/models/customers/cost_list_by_external_id_response" require_relative "orb/models/customers/cost_list_params" +require_relative "orb/models/customers/cost_list_response" require_relative "orb/models/customers/credit_list_by_external_id_params" +require_relative "orb/models/customers/credit_list_by_external_id_response" require_relative "orb/models/customers/credit_list_params" +require_relative "orb/models/customers/credit_list_response" require_relative "orb/models/customers/credits/ledger_create_entry_by_external_id_params" +require_relative "orb/models/customers/credits/ledger_create_entry_by_external_id_response" require_relative "orb/models/customers/credits/ledger_create_entry_params" +require_relative "orb/models/customers/credits/ledger_create_entry_response" require_relative "orb/models/customers/credits/ledger_list_by_external_id_params" +require_relative "orb/models/customers/credits/ledger_list_by_external_id_response" require_relative "orb/models/customers/credits/ledger_list_params" +require_relative "orb/models/customers/credits/ledger_list_response" require_relative "orb/models/customers/credits/top_up_create_by_external_id_params" +require_relative "orb/models/customers/credits/top_up_create_by_external_id_response" require_relative "orb/models/customers/credits/top_up_create_params" +require_relative "orb/models/customers/credits/top_up_create_response" require_relative "orb/models/customers/credits/top_up_delete_by_external_id_params" require_relative "orb/models/customers/credits/top_up_delete_params" require_relative "orb/models/customers/credits/top_up_list_by_external_id_params" +require_relative "orb/models/customers/credits/top_up_list_by_external_id_response" require_relative "orb/models/customers/credits/top_up_list_params" +require_relative "orb/models/customers/credits/top_up_list_response" require_relative "orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params" require_relative "orb/models/customer_sync_payment_methods_from_gateway_params" -require_relative "orb/models/customer_tax_id_model" require_relative "orb/models/customer_update_by_external_id_params" require_relative "orb/models/customer_update_params" -require_relative "orb/models/custom_rating_function_config_model" -require_relative "orb/models/dimensional_price_configuration_model" require_relative "orb/models/dimensional_price_group" require_relative "orb/models/dimensional_price_group_create_params" require_relative "orb/models/dimensional_price_group_list_params" -require_relative "orb/models/dimensional_price_group_model" require_relative "orb/models/dimensional_price_group_retrieve_params" require_relative "orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params" require_relative "orb/models/dimensional_price_groups" require_relative "orb/models/discount" -require_relative "orb/models/discount_model" -require_relative "orb/models/discount_override_model" require_relative "orb/models/evaluate_price_group" require_relative "orb/models/event_deprecate_params" require_relative "orb/models/event_deprecate_response" require_relative "orb/models/event_ingest_params" require_relative "orb/models/event_ingest_response" require_relative "orb/models/events/backfill_close_params" +require_relative "orb/models/events/backfill_close_response" require_relative "orb/models/events/backfill_create_params" +require_relative "orb/models/events/backfill_create_response" require_relative "orb/models/events/backfill_fetch_params" +require_relative "orb/models/events/backfill_fetch_response" require_relative "orb/models/events/backfill_list_params" +require_relative "orb/models/events/backfill_list_response" require_relative "orb/models/events/backfill_revert_params" +require_relative "orb/models/events/backfill_revert_response" require_relative "orb/models/events/event_volumes" require_relative "orb/models/events/volume_list_params" require_relative "orb/models/event_search_params" require_relative "orb/models/event_search_response" require_relative "orb/models/event_update_params" require_relative "orb/models/event_update_response" -require_relative "orb/models/fixed_fee_quantity_schedule_entry_model" require_relative "orb/models/invoice" require_relative "orb/models/invoice_create_params" require_relative "orb/models/invoice_fetch_params" @@ -156,55 +132,28 @@ require_relative "orb/models/invoice_fetch_upcoming_response" require_relative "orb/models/invoice_issue_params" require_relative "orb/models/invoice_level_discount" -require_relative "orb/models/invoice_level_discount_model" require_relative "orb/models/invoice_line_item_create_params" -require_relative "orb/models/invoice_line_item_model" +require_relative "orb/models/invoice_line_item_create_response" require_relative "orb/models/invoice_list_params" require_relative "orb/models/invoice_mark_paid_params" -require_relative "orb/models/invoice_model" require_relative "orb/models/invoice_pay_params" require_relative "orb/models/invoice_update_params" require_relative "orb/models/invoice_void_params" require_relative "orb/models/item" require_relative "orb/models/item_create_params" -require_relative "orb/models/item_external_connection_model" require_relative "orb/models/item_fetch_params" require_relative "orb/models/item_list_params" -require_relative "orb/models/item_model" -require_relative "orb/models/item_slim_model" require_relative "orb/models/item_update_params" -require_relative "orb/models/matrix_config_model" -require_relative "orb/models/matrix_value_model" -require_relative "orb/models/matrix_with_allocation_config_model" -require_relative "orb/models/maximum_interval_model" -require_relative "orb/models/maximum_model" require_relative "orb/models/metric_create_params" require_relative "orb/models/metric_fetch_params" require_relative "orb/models/metric_list_params" require_relative "orb/models/metric_update_params" -require_relative "orb/models/minimum_interval_model" -require_relative "orb/models/minimum_model" -require_relative "orb/models/mutated_subscription_model" -require_relative "orb/models/new_accounting_sync_configuration_model" -require_relative "orb/models/new_adjustment_model" -require_relative "orb/models/new_allocation_price_model" -require_relative "orb/models/new_billing_cycle_configuration_model" -require_relative "orb/models/new_reporting_configuration_model" -require_relative "orb/models/new_subscription_price_model" -require_relative "orb/models/new_tax_configuration_model" -require_relative "orb/models/package_config_model" require_relative "orb/models/pagination_metadata" -require_relative "orb/models/pagination_metadata_model" -require_relative "orb/models/payment_attempt_model" require_relative "orb/models/percentage_discount" -require_relative "orb/models/percentage_discount_interval_model" -require_relative "orb/models/percentage_discount_model" require_relative "orb/models/plan" require_relative "orb/models/plan_create_params" require_relative "orb/models/plan_fetch_params" require_relative "orb/models/plan_list_params" -require_relative "orb/models/plan_minified_model" -require_relative "orb/models/plan_model" require_relative "orb/models/plans/external_plan_id_fetch_params" require_relative "orb/models/plans/external_plan_id_update_params" require_relative "orb/models/plan_update_params" @@ -213,10 +162,7 @@ require_relative "orb/models/price_evaluate_params" require_relative "orb/models/price_evaluate_response" require_relative "orb/models/price_fetch_params" -require_relative "orb/models/price_interval_fixed_fee_quantity_transition_model" -require_relative "orb/models/price_interval_model" require_relative "orb/models/price_list_params" -require_relative "orb/models/price_model" require_relative "orb/models/prices/external_price_id_fetch_params" require_relative "orb/models/prices/external_price_id_update_params" require_relative "orb/models/price_update_params" @@ -224,10 +170,11 @@ require_relative "orb/models/remove_subscription_price_params" require_relative "orb/models/replace_subscription_adjustment_params" require_relative "orb/models/replace_subscription_price_params" -require_relative "orb/models/sub_line_item_grouping_model" require_relative "orb/models/subscription" require_relative "orb/models/subscription_cancel_params" +require_relative "orb/models/subscription_cancel_response" require_relative "orb/models/subscription_create_params" +require_relative "orb/models/subscription_create_response" require_relative "orb/models/subscription_fetch_costs_params" require_relative "orb/models/subscription_fetch_costs_response" require_relative "orb/models/subscription_fetch_params" @@ -235,34 +182,28 @@ require_relative "orb/models/subscription_fetch_schedule_response" require_relative "orb/models/subscription_fetch_usage_params" require_relative "orb/models/subscription_list_params" -require_relative "orb/models/subscription_minified_model" -require_relative "orb/models/subscription_model" require_relative "orb/models/subscription_price_intervals_params" +require_relative "orb/models/subscription_price_intervals_response" require_relative "orb/models/subscriptions" require_relative "orb/models/subscription_schedule_plan_change_params" -require_relative "orb/models/subscriptions_model" -require_relative "orb/models/subscription_trial_info_model" +require_relative "orb/models/subscription_schedule_plan_change_response" require_relative "orb/models/subscription_trigger_phase_params" +require_relative "orb/models/subscription_trigger_phase_response" require_relative "orb/models/subscription_unschedule_cancellation_params" +require_relative "orb/models/subscription_unschedule_cancellation_response" require_relative "orb/models/subscription_unschedule_fixed_fee_quantity_updates_params" +require_relative "orb/models/subscription_unschedule_fixed_fee_quantity_updates_response" require_relative "orb/models/subscription_unschedule_pending_plan_changes_params" +require_relative "orb/models/subscription_unschedule_pending_plan_changes_response" require_relative "orb/models/subscription_update_fixed_fee_quantity_params" +require_relative "orb/models/subscription_update_fixed_fee_quantity_response" require_relative "orb/models/subscription_update_params" require_relative "orb/models/subscription_update_trial_params" +require_relative "orb/models/subscription_update_trial_response" require_relative "orb/models/subscription_usage" -require_relative "orb/models/tax_amount_model" -require_relative "orb/models/threshold_model" -require_relative "orb/models/tiered_bps_config_model" -require_relative "orb/models/tiered_config_model" require_relative "orb/models/top_level_ping_params" require_relative "orb/models/top_level_ping_response" -require_relative "orb/models/top_up_model" -require_relative "orb/models/top_ups_model" require_relative "orb/models/trial_discount" -require_relative "orb/models/trial_discount_model" -require_relative "orb/models/unit_config_model" -require_relative "orb/models/usage_discount_interval_model" -require_relative "orb/models/usage_model" require_relative "orb/resources/alerts" require_relative "orb/resources/coupons" require_relative "orb/resources/coupons/subscriptions" diff --git a/lib/orb/models/add_subscription_adjustment_params.rb b/lib/orb/models/add_subscription_adjustment_params.rb index cd1bae52..adabe024 100644 --- a/lib/orb/models/add_subscription_adjustment_params.rb +++ b/lib/orb/models/add_subscription_adjustment_params.rb @@ -6,8 +6,8 @@ class AddSubscriptionAdjustmentParams < Orb::BaseModel # @!attribute adjustment # The definition of a new adjustment to create and add to the subscription. # - # @return [Orb::Models::NewAdjustmentModel::NewPercentageDiscount, Orb::Models::NewAdjustmentModel::NewUsageDiscount, Orb::Models::NewAdjustmentModel::NewAmountDiscount, Orb::Models::NewAdjustmentModel::NewMinimum, Orb::Models::NewAdjustmentModel::NewMaximum] - required :adjustment, union: -> { Orb::Models::NewAdjustmentModel } + # @return [Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount, Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount, Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount, Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMinimum, Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMaximum] + required :adjustment, union: -> { Orb::Models::AddSubscriptionAdjustmentParams::Adjustment } # @!attribute end_date # The end date of the adjustment interval. This is the date that the adjustment @@ -31,7 +31,7 @@ class AddSubscriptionAdjustmentParams < Orb::BaseModel optional :start_date, Time, nil?: true # @!parse - # # @param adjustment [Orb::Models::NewAdjustmentModel::NewPercentageDiscount, Orb::Models::NewAdjustmentModel::NewUsageDiscount, Orb::Models::NewAdjustmentModel::NewAmountDiscount, Orb::Models::NewAdjustmentModel::NewMinimum, Orb::Models::NewAdjustmentModel::NewMaximum] + # # @param adjustment [Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount, Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount, Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount, Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMinimum, Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMaximum] # # @param end_date [Time, nil] # # @param plan_phase_order [Integer, nil] # # @param start_date [Time, nil] @@ -39,6 +39,292 @@ class AddSubscriptionAdjustmentParams < Orb::BaseModel # def initialize(adjustment:, end_date: nil, plan_phase_order: nil, start_date: nil, **) = super # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The definition of a new adjustment to create and add to the subscription. + # + # @example + # ```ruby + # case adjustment + # in { + # adjustment_type: "percentage_discount", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # percentage_discount: Float, + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount ... + # in { + # adjustment_type: "usage_discount", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # usage_discount: Float, + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount ... + # in { + # adjustment_type: "amount_discount", + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount ... + # in { + # adjustment_type: "minimum", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # item_id: String, + # minimum_amount: String + # } + # # Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMinimum ... + # in { + # adjustment_type: "maximum", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # maximum_amount: String, + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMaximum ... + # end + # ``` + # + # @example + # ```ruby + # case adjustment + # in Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount + # # ... + # in Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount + # # ... + # in Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount + # # ... + # in Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMinimum + # # ... + # in Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMaximum + # # ... + # end + # ``` + class Adjustment < Orb::Union + discriminator :adjustment_type + + variant :percentage_discount, + -> { Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount } + + variant :usage_discount, -> { Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount } + + variant :amount_discount, + -> { Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount } + + variant :minimum, -> { Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMinimum } + + variant :maximum, -> { Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMaximum } + + class NewPercentageDiscount < Orb::BaseModel + # @!attribute adjustment_type + # + # @return [Symbol, :percentage_discount] + required :adjustment_type, const: :percentage_discount + + # @!attribute applies_to_price_ids + # The set of price IDs to which this adjustment applies. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute percentage_discount + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute [r] is_invoice_level + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. + # + # @return [Boolean, nil] + optional :is_invoice_level, Orb::BooleanModel + + # @!parse + # # @return [Boolean] + # attr_writer :is_invoice_level + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param percentage_discount [Float] + # # @param is_invoice_level [Boolean] + # # @param adjustment_type [Symbol, :percentage_discount] + # # + # def initialize( + # applies_to_price_ids:, + # percentage_discount:, + # is_invoice_level: nil, + # adjustment_type: :percentage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class NewUsageDiscount < Orb::BaseModel + # @!attribute adjustment_type + # + # @return [Symbol, :usage_discount] + required :adjustment_type, const: :usage_discount + + # @!attribute applies_to_price_ids + # The set of price IDs to which this adjustment applies. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute usage_discount + # + # @return [Float] + required :usage_discount, Float + + # @!attribute [r] is_invoice_level + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. + # + # @return [Boolean, nil] + optional :is_invoice_level, Orb::BooleanModel + + # @!parse + # # @return [Boolean] + # attr_writer :is_invoice_level + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param usage_discount [Float] + # # @param is_invoice_level [Boolean] + # # @param adjustment_type [Symbol, :usage_discount] + # # + # def initialize(applies_to_price_ids:, usage_discount:, is_invoice_level: nil, adjustment_type: :usage_discount, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class NewAmountDiscount < Orb::BaseModel + # @!attribute adjustment_type + # + # @return [Symbol, :amount_discount] + required :adjustment_type, const: :amount_discount + + # @!attribute amount_discount + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The set of price IDs to which this adjustment applies. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute [r] is_invoice_level + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. + # + # @return [Boolean, nil] + optional :is_invoice_level, Orb::BooleanModel + + # @!parse + # # @return [Boolean] + # attr_writer :is_invoice_level + + # @!parse + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param adjustment_type [Symbol, :amount_discount] + # # + # def initialize(amount_discount:, applies_to_price_ids:, is_invoice_level: nil, adjustment_type: :amount_discount, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class NewMinimum < Orb::BaseModel + # @!attribute adjustment_type + # + # @return [Symbol, :minimum] + required :adjustment_type, const: :minimum + + # @!attribute applies_to_price_ids + # The set of price IDs to which this adjustment applies. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute item_id + # The item ID that revenue from this minimum will be attributed to. + # + # @return [String] + required :item_id, String + + # @!attribute minimum_amount + # + # @return [String] + required :minimum_amount, String + + # @!attribute [r] is_invoice_level + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. + # + # @return [Boolean, nil] + optional :is_invoice_level, Orb::BooleanModel + + # @!parse + # # @return [Boolean] + # attr_writer :is_invoice_level + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param item_id [String] + # # @param minimum_amount [String] + # # @param is_invoice_level [Boolean] + # # @param adjustment_type [Symbol, :minimum] + # # + # def initialize(applies_to_price_ids:, item_id:, minimum_amount:, is_invoice_level: nil, adjustment_type: :minimum, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class NewMaximum < Orb::BaseModel + # @!attribute adjustment_type + # + # @return [Symbol, :maximum] + required :adjustment_type, const: :maximum + + # @!attribute applies_to_price_ids + # The set of price IDs to which this adjustment applies. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # + # @return [String] + required :maximum_amount, String + + # @!attribute [r] is_invoice_level + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. + # + # @return [Boolean, nil] + optional :is_invoice_level, Orb::BooleanModel + + # @!parse + # # @return [Boolean] + # attr_writer :is_invoice_level + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # @param is_invoice_level [Boolean] + # # @param adjustment_type [Symbol, :maximum] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, is_invoice_level: nil, adjustment_type: :maximum, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end end end end diff --git a/lib/orb/models/add_subscription_price_params.rb b/lib/orb/models/add_subscription_price_params.rb index ee883df9..93d0438c 100644 --- a/lib/orb/models/add_subscription_price_params.rb +++ b/lib/orb/models/add_subscription_price_params.rb @@ -6,15 +6,15 @@ class AddSubscriptionPriceParams < Orb::BaseModel # @!attribute allocation_price # The definition of a new allocation price to create and add to the subscription. # - # @return [Orb::Models::NewAllocationPriceModel, nil] - optional :allocation_price, -> { Orb::Models::NewAllocationPriceModel }, nil?: true + # @return [Orb::Models::AddSubscriptionPriceParams::AllocationPrice, nil] + optional :allocation_price, -> { Orb::Models::AddSubscriptionPriceParams::AllocationPrice }, nil?: true # @!attribute discounts # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for this # price. # - # @return [Array, nil] - optional :discounts, -> { Orb::ArrayOf[Orb::Models::DiscountOverrideModel] }, nil?: true + # @return [Array, nil] + optional :discounts, -> { Orb::ArrayOf[Orb::Models::AddSubscriptionPriceParams::Discount] }, nil?: true # @!attribute end_date # The end date of the price interval. This is the date that the price will stop @@ -53,8 +53,8 @@ class AddSubscriptionPriceParams < Orb::BaseModel # @!attribute price # The definition of a new price to create and add to the subscription. # - # @return [Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice, nil] - optional :price, union: -> { Orb::Models::NewSubscriptionPriceModel }, nil?: true + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice, nil] + optional :price, union: -> { Orb::Models::AddSubscriptionPriceParams::Price }, nil?: true # @!attribute price_id # The id of the price to add to the subscription. @@ -71,14 +71,14 @@ class AddSubscriptionPriceParams < Orb::BaseModel optional :start_date, Time, nil?: true # @!parse - # # @param allocation_price [Orb::Models::NewAllocationPriceModel, nil] - # # @param discounts [Array, nil] + # # @param allocation_price [Orb::Models::AddSubscriptionPriceParams::AllocationPrice, nil] + # # @param discounts [Array, nil] # # @param end_date [Time, nil] # # @param external_price_id [String, nil] # # @param maximum_amount [String, nil] # # @param minimum_amount [String, nil] # # @param plan_phase_order [Integer, nil] - # # @param price [Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice, nil] + # # @param price [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice, nil] # # @param price_id [String, nil] # # @param start_date [Time, nil] # # @@ -99,6 +99,8036 @@ class AddSubscriptionPriceParams < Orb::BaseModel # end # def initialize: (Hash | Orb::BaseModel) -> void + + class AllocationPrice < Orb::BaseModel + # @!attribute amount + # An amount of the currency to allocate to the customer at the specified cadence. + # + # @return [String] + required :amount, String + + # @!attribute cadence + # The cadence at which to allocate the amount to the customer. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::AllocationPrice::Cadence] + required :cadence, enum: -> { Orb::Models::AddSubscriptionPriceParams::AllocationPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string or a custom pricing unit identifier in which to bill + # this price. + # + # @return [String] + required :currency, String + + # @!attribute expires_at_end_of_cadence + # Whether the allocated amount should expire at the end of the cadence or roll + # over to the next period. + # + # @return [Boolean] + required :expires_at_end_of_cadence, Orb::BooleanModel + + # @!parse + # # The definition of a new allocation price to create and add to the subscription. + # # + # # @param amount [String] + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::AllocationPrice::Cadence] + # # @param currency [String] + # # @param expires_at_end_of_cadence [Boolean] + # # + # def initialize(amount:, cadence:, currency:, expires_at_end_of_cadence:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence at which to allocate the amount to the customer. + # + # @example + # ```ruby + # case cadence + # in :one_time + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :semi_annual + # # ... + # in :annual + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Discount < Orb::BaseModel + # @!attribute discount_type + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Discount::DiscountType] + required :discount_type, enum: -> { Orb::Models::AddSubscriptionPriceParams::Discount::DiscountType } + + # @!attribute amount_discount + # Only available if discount_type is `amount`. + # + # @return [String, nil] + optional :amount_discount, String, nil?: true + + # @!attribute percentage_discount + # Only available if discount_type is `percentage`. This is a number between 0 + # and 1. + # + # @return [Float, nil] + optional :percentage_discount, Float, nil?: true + + # @!attribute usage_discount + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for + # + # @return [Float, nil] + optional :usage_discount, Float, nil?: true + + # @!parse + # # @param discount_type [Symbol, Orb::Models::AddSubscriptionPriceParams::Discount::DiscountType] + # # @param amount_discount [String, nil] + # # @param percentage_discount [Float, nil] + # # @param usage_discount [Float, nil] + # # + # def initialize(discount_type:, amount_discount: nil, percentage_discount: nil, usage_discount: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case discount_type + # in :percentage + # # ... + # in :usage + # # ... + # in :amount + # # ... + # end + # ``` + class DiscountType < Orb::Enum + PERCENTAGE = :percentage + USAGE = :usage + AMOUNT = :amount + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + # @abstract + # + # The definition of a new price to create and add to the subscription. + # + # @example + # ```ruby + # case price + # in { + # model_type: "unit", + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice ... + # in { + # model_type: "package", + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice ... + # in { + # model_type: "matrix", + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::Cadence, + # item_id: String, + # matrix_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice ... + # in { + # model_type: "tiered", + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice ... + # in { + # model_type: "tiered_bps", + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice ... + # in { + # model_type: "bps", + # bps_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig, + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::Cadence, + # item_id: String + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice ... + # in { + # model_type: "bulk_bps", + # bulk_bps_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig, + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::Cadence, + # item_id: String + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice ... + # in { + # model_type: "bulk", + # bulk_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig, + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::Cadence, + # item_id: String + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice ... + # in { + # model_type: "threshold_total_amount", + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice ... + # in { + # model_type: "tiered_package", + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice ... + # in { + # model_type: "tiered_with_minimum", + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice ... + # in { + # model_type: "unit_with_percent", + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice ... + # in { + # model_type: "package_with_allocation", + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice ... + # in { + # model_type: "tiered_with_proration", + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice ... + # in { + # model_type: "unit_with_proration", + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice ... + # in { + # model_type: "grouped_allocation", + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::Cadence, + # grouped_allocation_config: ^(Orb::HashOf[Orb::Unknown]), + # item_id: String + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice ... + # in { + # model_type: "grouped_with_prorated_minimum", + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::Cadence, + # grouped_with_prorated_minimum_config: ^(Orb::HashOf[Orb::Unknown]), + # item_id: String + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice ... + # in { + # model_type: "bulk_with_proration", + # bulk_with_proration_config: ^(Orb::HashOf[Orb::Unknown]), + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::Cadence, + # item_id: String + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice ... + # in { + # model_type: "scalable_matrix_with_unit_pricing", + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice ... + # in { + # model_type: "scalable_matrix_with_tiered_pricing", + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice ... + # in { + # model_type: "cumulative_grouped_bulk", + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::Cadence, + # cumulative_grouped_bulk_config: ^(Orb::HashOf[Orb::Unknown]), + # item_id: String + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice ... + # in { + # model_type: "max_group_tiered_package", + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::Cadence, + # item_id: String, + # max_group_tiered_package_config: ^(Orb::HashOf[Orb::Unknown]) + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice ... + # in { + # model_type: "grouped_with_metered_minimum", + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::Cadence, + # grouped_with_metered_minimum_config: ^(Orb::HashOf[Orb::Unknown]), + # item_id: String + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice ... + # in { + # model_type: "matrix_with_display_name", + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::Cadence, + # item_id: String, + # matrix_with_display_name_config: ^(Orb::HashOf[Orb::Unknown]) + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice ... + # in { + # model_type: "grouped_tiered_package", + # cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::Cadence, + # grouped_tiered_package_config: ^(Orb::HashOf[Orb::Unknown]), + # item_id: String + # } + # # Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice ... + # end + # ``` + # + # @example + # ```ruby + # case price + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice + # # ... + # in Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice + # # ... + # end + # ``` + class Price < Orb::Union + discriminator :model_type + + variant :unit, -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice } + + variant :package, -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice } + + variant :matrix, -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice } + + variant :tiered, -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice } + + variant :tiered_bps, -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice } + + variant :bps, -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice } + + variant :bulk_bps, -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice } + + variant :bulk, -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice } + + variant :threshold_total_amount, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice } + + variant :tiered_package, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice } + + variant :tiered_with_minimum, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice } + + variant :unit_with_percent, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice } + + variant :package_with_allocation, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice } + + variant :tiered_with_proration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice } + + variant :unit_with_proration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice } + + variant :grouped_allocation, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice } + + variant :grouped_with_prorated_minimum, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice } + + variant :bulk_with_proration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice } + + variant :scalable_matrix_with_unit_pricing, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice } + + variant :scalable_matrix_with_tiered_pricing, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice } + + variant :cumulative_grouped_bulk, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice } + + variant :max_group_tiered_package, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice } + + variant :grouped_with_metered_minimum, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice } + + variant :matrix_with_display_name, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice } + + variant :grouped_tiered_package, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice } + + class NewSubscriptionUnitPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :unit] + required :model_type, const: :unit + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute unit_config + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::UnitConfig] + required :unit_config, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::UnitConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param unit_config [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::UnitConfig] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :unit] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # unit_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :unit, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class UnitConfig < Orb::BaseModel + # @!attribute unit_amount + # Rate per unit of usage + # + # @return [String] + required :unit_amount, String + + # @!parse + # # @param unit_amount [String] + # # + # def initialize(unit_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionPackagePrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :package] + required :model_type, const: :package + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute package_config + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::PackageConfig] + required :package_config, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::PackageConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param package_config [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::PackageConfig] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :package] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # package_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :package, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class PackageConfig < Orb::BaseModel + # @!attribute package_amount + # A currency amount to rate usage by + # + # @return [String] + required :package_amount, String + + # @!attribute package_size + # An integer amount to represent package size. For example, 1000 here would divide + # usage by 1000 before multiplying by package_amount in rating + # + # @return [Integer] + required :package_size, Integer + + # @!parse + # # @param package_amount [String] + # # @param package_size [Integer] + # # + # def initialize(package_amount:, package_size:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionMatrixPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_config + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig] + required :matrix_config, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig } + + # @!attribute model_type + # + # @return [Symbol, :matrix] + required :model_type, const: :matrix + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::Cadence] + # # @param item_id [String] + # # @param matrix_config [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :matrix] + # # + # def initialize( + # cadence:, + # item_id:, + # matrix_config:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :matrix, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class MatrixConfig < Orb::BaseModel + # @!attribute default_unit_amount + # Default per unit rate for any usage not bucketed into a specified matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::ArrayOf[String, nil?: true] + + # @!attribute matrix_values + # Matrix values for specified matrix grouping keys + # + # @return [Array] + required :matrix_values, + -> { Orb::ArrayOf[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig::MatrixValue] } + + # @!parse + # # @param default_unit_amount [String] + # # @param dimensions [Array] + # # @param matrix_values [Array] + # # + # def initialize(default_unit_amount:, dimensions:, matrix_values:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class MatrixValue < Orb::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this Matrix value by. For example, + # ["region", "tier"] could be used to filter cloud usage by a cloud region and an + # instance tier. + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Unit price for the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!parse + # # @param dimension_values [Array] + # # @param unit_amount [String] + # # + # def initialize(dimension_values:, unit_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionTieredPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :tiered] + required :model_type, const: :tiered + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute tiered_config + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig] + required :tiered_config, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param tiered_config [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :tiered] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # tiered_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :tiered, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class TieredConfig < Orb::BaseModel + # @!attribute tiers + # Tiers for rating based on total usage quantities into the specified tier + # + # @return [Array] + required :tiers, + -> { Orb::ArrayOf[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig::Tier] } + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute first_unit + # Inclusive tier starting value + # + # @return [Float] + required :first_unit, Float + + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String + + # @!attribute last_unit + # Exclusive tier ending value. If null, this is treated as the last tier + # + # @return [Float, nil] + optional :last_unit, Float, nil?: true + + # @!parse + # # @param first_unit [Float] + # # @param unit_amount [String] + # # @param last_unit [Float, nil] + # # + # def initialize(first_unit:, unit_amount:, last_unit: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionTieredBpsPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :tiered_bps] + required :model_type, const: :tiered_bps + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute tiered_bps_config + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig] + required :tiered_bps_config, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param tiered_bps_config [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :tiered_bps] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # tiered_bps_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :tiered_bps, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class TieredBpsConfig < Orb::BaseModel + # @!attribute tiers + # Tiers for a Graduated BPS pricing model, where usage is bucketed into specified + # tiers + # + # @return [Array] + required :tiers, + -> { Orb::ArrayOf[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig::Tier] } + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute bps + # Per-event basis point rate + # + # @return [Float] + required :bps, Float + + # @!attribute minimum_amount + # Inclusive tier starting value + # + # @return [String] + required :minimum_amount, String + + # @!attribute maximum_amount + # Exclusive tier ending value + # + # @return [String, nil] + optional :maximum_amount, String, nil?: true + + # @!attribute per_unit_maximum + # Per unit maximum to charge + # + # @return [String, nil] + optional :per_unit_maximum, String, nil?: true + + # @!parse + # # @param bps [Float] + # # @param minimum_amount [String] + # # @param maximum_amount [String, nil] + # # @param per_unit_maximum [String, nil] + # # + # def initialize(bps:, minimum_amount:, maximum_amount: nil, per_unit_maximum: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionBpsPrice < Orb::BaseModel + # @!attribute bps_config + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig] + required :bps_config, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig } + + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :bps] + required :model_type, const: :bps + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param bps_config [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig] + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :bps] + # # + # def initialize( + # bps_config:, + # cadence:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :bps, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class BpsConfig < Orb::BaseModel + # @!attribute bps + # Basis point take rate per event + # + # @return [Float] + required :bps, Float + + # @!attribute per_unit_maximum + # Optional currency amount maximum to cap spend per event + # + # @return [String, nil] + optional :per_unit_maximum, String, nil?: true + + # @!parse + # # @param bps [Float] + # # @param per_unit_maximum [String, nil] + # # + # def initialize(bps:, per_unit_maximum: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionBulkBpsPrice < Orb::BaseModel + # @!attribute bulk_bps_config + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig] + required :bulk_bps_config, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig } + + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :bulk_bps] + required :model_type, const: :bulk_bps + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param bulk_bps_config [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig] + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :bulk_bps] + # # + # def initialize( + # bulk_bps_config:, + # cadence:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :bulk_bps, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class BulkBpsConfig < Orb::BaseModel + # @!attribute tiers + # Tiers for a bulk BPS pricing model where all usage is aggregated to a single + # tier based on total volume + # + # @return [Array] + required :tiers, + -> { Orb::ArrayOf[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig::Tier] } + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute bps + # Basis points to rate on + # + # @return [Float] + required :bps, Float + + # @!attribute maximum_amount + # Upper bound for tier + # + # @return [String, nil] + optional :maximum_amount, String, nil?: true + + # @!attribute per_unit_maximum + # The maximum amount to charge for any one event + # + # @return [String, nil] + optional :per_unit_maximum, String, nil?: true + + # @!parse + # # @param bps [Float] + # # @param maximum_amount [String, nil] + # # @param per_unit_maximum [String, nil] + # # + # def initialize(bps:, maximum_amount: nil, per_unit_maximum: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionBulkPrice < Orb::BaseModel + # @!attribute bulk_config + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig] + required :bulk_config, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig } + + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :bulk] + required :model_type, const: :bulk + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param bulk_config [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig] + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :bulk] + # # + # def initialize( + # bulk_config:, + # cadence:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :bulk, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class BulkConfig < Orb::BaseModel + # @!attribute tiers + # Bulk tiers for rating based on total usage volume + # + # @return [Array] + required :tiers, + -> { Orb::ArrayOf[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig::Tier] } + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String + + # @!attribute maximum_units + # Upper bound for this tier + # + # @return [Float, nil] + optional :maximum_units, Float, nil?: true + + # @!parse + # # @param unit_amount [String] + # # @param maximum_units [Float, nil] + # # + # def initialize(unit_amount:, maximum_units: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionThresholdTotalAmountPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :threshold_total_amount] + required :model_type, const: :threshold_total_amount + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute threshold_total_amount_config + # + # @return [Hash{Symbol=>Object}] + required :threshold_total_amount_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param threshold_total_amount_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :threshold_total_amount] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # threshold_total_amount_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :threshold_total_amount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionTieredPackagePrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :tiered_package] + required :model_type, const: :tiered_package + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute tiered_package_config + # + # @return [Hash{Symbol=>Object}] + required :tiered_package_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param tiered_package_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :tiered_package] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # tiered_package_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :tiered_package, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionTieredWithMinimumPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :tiered_with_minimum] + required :model_type, const: :tiered_with_minimum + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute tiered_with_minimum_config + # + # @return [Hash{Symbol=>Object}] + required :tiered_with_minimum_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param tiered_with_minimum_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :tiered_with_minimum] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # tiered_with_minimum_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :tiered_with_minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionUnitWithPercentPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :unit_with_percent] + required :model_type, const: :unit_with_percent + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute unit_with_percent_config + # + # @return [Hash{Symbol=>Object}] + required :unit_with_percent_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param unit_with_percent_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :unit_with_percent] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # unit_with_percent_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :unit_with_percent, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionPackageWithAllocationPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :package_with_allocation] + required :model_type, const: :package_with_allocation + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute package_with_allocation_config + # + # @return [Hash{Symbol=>Object}] + required :package_with_allocation_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param package_with_allocation_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :package_with_allocation] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # package_with_allocation_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :package_with_allocation, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionTierWithProrationPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :tiered_with_proration] + required :model_type, const: :tiered_with_proration + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute tiered_with_proration_config + # + # @return [Hash{Symbol=>Object}] + required :tiered_with_proration_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param tiered_with_proration_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :tiered_with_proration] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # tiered_with_proration_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :tiered_with_proration, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionUnitWithProrationPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :unit_with_proration] + required :model_type, const: :unit_with_proration + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute unit_with_proration_config + # + # @return [Hash{Symbol=>Object}] + required :unit_with_proration_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param unit_with_proration_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :unit_with_proration] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # unit_with_proration_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :unit_with_proration, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionGroupedAllocationPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::Cadence } + + # @!attribute grouped_allocation_config + # + # @return [Hash{Symbol=>Object}] + required :grouped_allocation_config, Orb::HashOf[Orb::Unknown] + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :grouped_allocation] + required :model_type, const: :grouped_allocation + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::Cadence] + # # @param grouped_allocation_config [Hash{Symbol=>Object}] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :grouped_allocation] + # # + # def initialize( + # cadence:, + # grouped_allocation_config:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :grouped_allocation, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionGroupedWithProratedMinimumPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::Cadence } + + # @!attribute grouped_with_prorated_minimum_config + # + # @return [Hash{Symbol=>Object}] + required :grouped_with_prorated_minimum_config, Orb::HashOf[Orb::Unknown] + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :grouped_with_prorated_minimum] + required :model_type, const: :grouped_with_prorated_minimum + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::Cadence] + # # @param grouped_with_prorated_minimum_config [Hash{Symbol=>Object}] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :grouped_with_prorated_minimum] + # # + # def initialize( + # cadence:, + # grouped_with_prorated_minimum_config:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :grouped_with_prorated_minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionBulkWithProrationPrice < Orb::BaseModel + # @!attribute bulk_with_proration_config + # + # @return [Hash{Symbol=>Object}] + required :bulk_with_proration_config, Orb::HashOf[Orb::Unknown] + + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :bulk_with_proration] + required :model_type, const: :bulk_with_proration + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param bulk_with_proration_config [Hash{Symbol=>Object}] + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :bulk_with_proration] + # # + # def initialize( + # bulk_with_proration_config:, + # cadence:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :bulk_with_proration, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionScalableMatrixWithUnitPricingPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :scalable_matrix_with_unit_pricing] + required :model_type, const: :scalable_matrix_with_unit_pricing + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute scalable_matrix_with_unit_pricing_config + # + # @return [Hash{Symbol=>Object}] + required :scalable_matrix_with_unit_pricing_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param scalable_matrix_with_unit_pricing_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :scalable_matrix_with_unit_pricing] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # scalable_matrix_with_unit_pricing_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :scalable_matrix_with_unit_pricing, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionScalableMatrixWithTieredPricingPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :scalable_matrix_with_tiered_pricing] + required :model_type, const: :scalable_matrix_with_tiered_pricing + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute scalable_matrix_with_tiered_pricing_config + # + # @return [Hash{Symbol=>Object}] + required :scalable_matrix_with_tiered_pricing_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param scalable_matrix_with_tiered_pricing_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :scalable_matrix_with_tiered_pricing] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # scalable_matrix_with_tiered_pricing_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :scalable_matrix_with_tiered_pricing, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionCumulativeGroupedBulkPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::Cadence } + + # @!attribute cumulative_grouped_bulk_config + # + # @return [Hash{Symbol=>Object}] + required :cumulative_grouped_bulk_config, Orb::HashOf[Orb::Unknown] + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :cumulative_grouped_bulk] + required :model_type, const: :cumulative_grouped_bulk + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::Cadence] + # # @param cumulative_grouped_bulk_config [Hash{Symbol=>Object}] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :cumulative_grouped_bulk] + # # + # def initialize( + # cadence:, + # cumulative_grouped_bulk_config:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :cumulative_grouped_bulk, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionMaxGroupTieredPackagePrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute max_group_tiered_package_config + # + # @return [Hash{Symbol=>Object}] + required :max_group_tiered_package_config, Orb::HashOf[Orb::Unknown] + + # @!attribute model_type + # + # @return [Symbol, :max_group_tiered_package] + required :model_type, const: :max_group_tiered_package + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::Cadence] + # # @param item_id [String] + # # @param max_group_tiered_package_config [Hash{Symbol=>Object}] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :max_group_tiered_package] + # # + # def initialize( + # cadence:, + # item_id:, + # max_group_tiered_package_config:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :max_group_tiered_package, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionGroupedWithMeteredMinimumPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::Cadence } + + # @!attribute grouped_with_metered_minimum_config + # + # @return [Hash{Symbol=>Object}] + required :grouped_with_metered_minimum_config, Orb::HashOf[Orb::Unknown] + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :grouped_with_metered_minimum] + required :model_type, const: :grouped_with_metered_minimum + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::Cadence] + # # @param grouped_with_metered_minimum_config [Hash{Symbol=>Object}] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :grouped_with_metered_minimum] + # # + # def initialize( + # cadence:, + # grouped_with_metered_minimum_config:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :grouped_with_metered_minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionMatrixWithDisplayNamePrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_display_name_config + # + # @return [Hash{Symbol=>Object}] + required :matrix_with_display_name_config, Orb::HashOf[Orb::Unknown] + + # @!attribute model_type + # + # @return [Symbol, :matrix_with_display_name] + required :model_type, const: :matrix_with_display_name + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::Cadence] + # # @param item_id [String] + # # @param matrix_with_display_name_config [Hash{Symbol=>Object}] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :matrix_with_display_name] + # # + # def initialize( + # cadence:, + # item_id:, + # matrix_with_display_name_config:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :matrix_with_display_name, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionGroupedTieredPackagePrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::Cadence] + required :cadence, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::Cadence } + + # @!attribute grouped_tiered_package_config + # + # @return [Hash{Symbol=>Object}] + required :grouped_tiered_package_config, Orb::HashOf[Orb::Unknown] + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :grouped_tiered_package] + required :model_type, const: :grouped_tiered_package + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::Cadence] + # # @param grouped_tiered_package_config [Hash{Symbol=>Object}] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :grouped_tiered_package] + # # + # def initialize( + # cadence:, + # grouped_tiered_package_config:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :grouped_tiered_package, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + end end end end diff --git a/lib/orb/models/address_input_model.rb b/lib/orb/models/address_input_model.rb deleted file mode 100644 index 32a78813..00000000 --- a/lib/orb/models/address_input_model.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class AddressInputModel < Orb::BaseModel - # @!attribute city - # - # @return [String, nil] - optional :city, String, nil?: true - - # @!attribute country - # - # @return [String, nil] - optional :country, String, nil?: true - - # @!attribute line1 - # - # @return [String, nil] - optional :line1, String, nil?: true - - # @!attribute line2 - # - # @return [String, nil] - optional :line2, String, nil?: true - - # @!attribute postal_code - # - # @return [String, nil] - optional :postal_code, String, nil?: true - - # @!attribute state - # - # @return [String, nil] - optional :state, String, nil?: true - - # @!parse - # # @param city [String, nil] - # # @param country [String, nil] - # # @param line1 [String, nil] - # # @param line2 [String, nil] - # # @param postal_code [String, nil] - # # @param state [String, nil] - # # - # def initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/address_model.rb b/lib/orb/models/address_model.rb deleted file mode 100644 index 01d57afa..00000000 --- a/lib/orb/models/address_model.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class AddressModel < Orb::BaseModel - # @!attribute city - # - # @return [String, nil] - required :city, String, nil?: true - - # @!attribute country - # - # @return [String, nil] - required :country, String, nil?: true - - # @!attribute line1 - # - # @return [String, nil] - required :line1, String, nil?: true - - # @!attribute line2 - # - # @return [String, nil] - required :line2, String, nil?: true - - # @!attribute postal_code - # - # @return [String, nil] - required :postal_code, String, nil?: true - - # @!attribute state - # - # @return [String, nil] - required :state, String, nil?: true - - # @!parse - # # @param city [String, nil] - # # @param country [String, nil] - # # @param line1 [String, nil] - # # @param line2 [String, nil] - # # @param postal_code [String, nil] - # # @param state [String, nil] - # # - # def initialize(city:, country:, line1:, line2:, postal_code:, state:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/adjustment_interval_model.rb b/lib/orb/models/adjustment_interval_model.rb deleted file mode 100644 index 502dcbbc..00000000 --- a/lib/orb/models/adjustment_interval_model.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class AdjustmentIntervalModel < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute adjustment - # - # @return [Orb::Models::AdjustmentModel::PlanPhaseUsageDiscountAdjustment, Orb::Models::AdjustmentModel::PlanPhaseAmountDiscountAdjustment, Orb::Models::AdjustmentModel::PlanPhasePercentageDiscountAdjustment, Orb::Models::AdjustmentModel::PlanPhaseMinimumAdjustment, Orb::Models::AdjustmentModel::PlanPhaseMaximumAdjustment] - required :adjustment, union: -> { Orb::Models::AdjustmentModel } - - # @!attribute applies_to_price_interval_ids - # The price interval IDs that this adjustment applies to. - # - # @return [Array] - required :applies_to_price_interval_ids, Orb::ArrayOf[String] - - # @!attribute end_date - # The end date of the adjustment interval. - # - # @return [Time, nil] - required :end_date, Time, nil?: true - - # @!attribute start_date - # The start date of the adjustment interval. - # - # @return [Time] - required :start_date, Time - - # @!parse - # # @param id [String] - # # @param adjustment [Orb::Models::AdjustmentModel::PlanPhaseUsageDiscountAdjustment, Orb::Models::AdjustmentModel::PlanPhaseAmountDiscountAdjustment, Orb::Models::AdjustmentModel::PlanPhasePercentageDiscountAdjustment, Orb::Models::AdjustmentModel::PlanPhaseMinimumAdjustment, Orb::Models::AdjustmentModel::PlanPhaseMaximumAdjustment] - # # @param applies_to_price_interval_ids [Array] - # # @param end_date [Time, nil] - # # @param start_date [Time] - # # - # def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/adjustment_model.rb b/lib/orb/models/adjustment_model.rb deleted file mode 100644 index 91cf14a1..00000000 --- a/lib/orb/models/adjustment_model.rb +++ /dev/null @@ -1,425 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - # @abstract - # - # @example - # ```ruby - # case adjustment_model - # in { - # adjustment_type: "usage_discount", - # id: String, - # applies_to_price_ids: ^(Orb::ArrayOf[String]), - # is_invoice_level: Orb::BooleanModel - # } - # # Orb::Models::AdjustmentModel::PlanPhaseUsageDiscountAdjustment ... - # in { - # adjustment_type: "amount_discount", - # id: String, - # amount_discount: String, - # applies_to_price_ids: ^(Orb::ArrayOf[String]) - # } - # # Orb::Models::AdjustmentModel::PlanPhaseAmountDiscountAdjustment ... - # in { - # adjustment_type: "percentage_discount", - # id: String, - # applies_to_price_ids: ^(Orb::ArrayOf[String]), - # is_invoice_level: Orb::BooleanModel - # } - # # Orb::Models::AdjustmentModel::PlanPhasePercentageDiscountAdjustment ... - # in { - # adjustment_type: "minimum", - # id: String, - # applies_to_price_ids: ^(Orb::ArrayOf[String]), - # is_invoice_level: Orb::BooleanModel - # } - # # Orb::Models::AdjustmentModel::PlanPhaseMinimumAdjustment ... - # in { - # adjustment_type: "maximum", - # id: String, - # applies_to_price_ids: ^(Orb::ArrayOf[String]), - # is_invoice_level: Orb::BooleanModel - # } - # # Orb::Models::AdjustmentModel::PlanPhaseMaximumAdjustment ... - # end - # ``` - # - # @example - # ```ruby - # case adjustment_model - # in Orb::Models::AdjustmentModel::PlanPhaseUsageDiscountAdjustment - # # ... - # in Orb::Models::AdjustmentModel::PlanPhaseAmountDiscountAdjustment - # # ... - # in Orb::Models::AdjustmentModel::PlanPhasePercentageDiscountAdjustment - # # ... - # in Orb::Models::AdjustmentModel::PlanPhaseMinimumAdjustment - # # ... - # in Orb::Models::AdjustmentModel::PlanPhaseMaximumAdjustment - # # ... - # end - # ``` - class AdjustmentModel < Orb::Union - discriminator :adjustment_type - - variant :usage_discount, -> { Orb::Models::AdjustmentModel::PlanPhaseUsageDiscountAdjustment } - - variant :amount_discount, -> { Orb::Models::AdjustmentModel::PlanPhaseAmountDiscountAdjustment } - - variant :percentage_discount, -> { Orb::Models::AdjustmentModel::PlanPhasePercentageDiscountAdjustment } - - variant :minimum, -> { Orb::Models::AdjustmentModel::PlanPhaseMinimumAdjustment } - - variant :maximum, -> { Orb::Models::AdjustmentModel::PlanPhaseMaximumAdjustment } - - class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute adjustment_type - # - # @return [Symbol, :usage_discount] - required :adjustment_type, const: :usage_discount - - # @!attribute applies_to_price_ids - # The price IDs that this adjustment applies to. - # - # @return [Array] - required :applies_to_price_ids, Orb::ArrayOf[String] - - # @!attribute is_invoice_level - # True for adjustments that apply to an entire invocice, false for adjustments - # that apply to only one price. - # - # @return [Boolean] - required :is_invoice_level, Orb::BooleanModel - - # @!attribute plan_phase_order - # The plan phase in which this adjustment is active. - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute reason - # The reason for the adjustment. - # - # @return [String, nil] - required :reason, String, nil?: true - - # @!attribute usage_discount - # The number of usage units by which to discount the price this adjustment applies - # to in a given billing period. - # - # @return [Float] - required :usage_discount, Float - - # @!parse - # # @param id [String] - # # @param applies_to_price_ids [Array] - # # @param is_invoice_level [Boolean] - # # @param plan_phase_order [Integer, nil] - # # @param reason [String, nil] - # # @param usage_discount [Float] - # # @param adjustment_type [Symbol, :usage_discount] - # # - # def initialize( - # id:, - # applies_to_price_ids:, - # is_invoice_level:, - # plan_phase_order:, - # reason:, - # usage_discount:, - # adjustment_type: :usage_discount, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - end - - class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute adjustment_type - # - # @return [Symbol, :amount_discount] - required :adjustment_type, const: :amount_discount - - # @!attribute amount_discount - # The amount by which to discount the prices this adjustment applies to in a given - # billing period. - # - # @return [String] - required :amount_discount, String - - # @!attribute applies_to_price_ids - # The price IDs that this adjustment applies to. - # - # @return [Array] - required :applies_to_price_ids, Orb::ArrayOf[String] - - # @!attribute is_invoice_level - # True for adjustments that apply to an entire invocice, false for adjustments - # that apply to only one price. - # - # @return [Boolean] - required :is_invoice_level, Orb::BooleanModel - - # @!attribute plan_phase_order - # The plan phase in which this adjustment is active. - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute reason - # The reason for the adjustment. - # - # @return [String, nil] - required :reason, String, nil?: true - - # @!parse - # # @param id [String] - # # @param amount_discount [String] - # # @param applies_to_price_ids [Array] - # # @param is_invoice_level [Boolean] - # # @param plan_phase_order [Integer, nil] - # # @param reason [String, nil] - # # @param adjustment_type [Symbol, :amount_discount] - # # - # def initialize( - # id:, - # amount_discount:, - # applies_to_price_ids:, - # is_invoice_level:, - # plan_phase_order:, - # reason:, - # adjustment_type: :amount_discount, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - end - - class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute adjustment_type - # - # @return [Symbol, :percentage_discount] - required :adjustment_type, const: :percentage_discount - - # @!attribute applies_to_price_ids - # The price IDs that this adjustment applies to. - # - # @return [Array] - required :applies_to_price_ids, Orb::ArrayOf[String] - - # @!attribute is_invoice_level - # True for adjustments that apply to an entire invocice, false for adjustments - # that apply to only one price. - # - # @return [Boolean] - required :is_invoice_level, Orb::BooleanModel - - # @!attribute percentage_discount - # The percentage (as a value between 0 and 1) by which to discount the price - # intervals this adjustment applies to in a given billing period. - # - # @return [Float] - required :percentage_discount, Float - - # @!attribute plan_phase_order - # The plan phase in which this adjustment is active. - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute reason - # The reason for the adjustment. - # - # @return [String, nil] - required :reason, String, nil?: true - - # @!parse - # # @param id [String] - # # @param applies_to_price_ids [Array] - # # @param is_invoice_level [Boolean] - # # @param percentage_discount [Float] - # # @param plan_phase_order [Integer, nil] - # # @param reason [String, nil] - # # @param adjustment_type [Symbol, :percentage_discount] - # # - # def initialize( - # id:, - # applies_to_price_ids:, - # is_invoice_level:, - # percentage_discount:, - # plan_phase_order:, - # reason:, - # adjustment_type: :percentage_discount, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - end - - class PlanPhaseMinimumAdjustment < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute adjustment_type - # - # @return [Symbol, :minimum] - required :adjustment_type, const: :minimum - - # @!attribute applies_to_price_ids - # The price IDs that this adjustment applies to. - # - # @return [Array] - required :applies_to_price_ids, Orb::ArrayOf[String] - - # @!attribute is_invoice_level - # True for adjustments that apply to an entire invocice, false for adjustments - # that apply to only one price. - # - # @return [Boolean] - required :is_invoice_level, Orb::BooleanModel - - # @!attribute item_id - # The item ID that revenue from this minimum will be attributed to. - # - # @return [String] - required :item_id, String - - # @!attribute minimum_amount - # The minimum amount to charge in a given billing period for the prices this - # adjustment applies to. - # - # @return [String] - required :minimum_amount, String - - # @!attribute plan_phase_order - # The plan phase in which this adjustment is active. - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute reason - # The reason for the adjustment. - # - # @return [String, nil] - required :reason, String, nil?: true - - # @!parse - # # @param id [String] - # # @param applies_to_price_ids [Array] - # # @param is_invoice_level [Boolean] - # # @param item_id [String] - # # @param minimum_amount [String] - # # @param plan_phase_order [Integer, nil] - # # @param reason [String, nil] - # # @param adjustment_type [Symbol, :minimum] - # # - # def initialize( - # id:, - # applies_to_price_ids:, - # is_invoice_level:, - # item_id:, - # minimum_amount:, - # plan_phase_order:, - # reason:, - # adjustment_type: :minimum, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - end - - class PlanPhaseMaximumAdjustment < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute adjustment_type - # - # @return [Symbol, :maximum] - required :adjustment_type, const: :maximum - - # @!attribute applies_to_price_ids - # The price IDs that this adjustment applies to. - # - # @return [Array] - required :applies_to_price_ids, Orb::ArrayOf[String] - - # @!attribute is_invoice_level - # True for adjustments that apply to an entire invocice, false for adjustments - # that apply to only one price. - # - # @return [Boolean] - required :is_invoice_level, Orb::BooleanModel - - # @!attribute maximum_amount - # The maximum amount to charge in a given billing period for the prices this - # adjustment applies to. - # - # @return [String] - required :maximum_amount, String - - # @!attribute plan_phase_order - # The plan phase in which this adjustment is active. - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute reason - # The reason for the adjustment. - # - # @return [String, nil] - required :reason, String, nil?: true - - # @!parse - # # @param id [String] - # # @param applies_to_price_ids [Array] - # # @param is_invoice_level [Boolean] - # # @param maximum_amount [String] - # # @param plan_phase_order [Integer, nil] - # # @param reason [String, nil] - # # @param adjustment_type [Symbol, :maximum] - # # - # def initialize( - # id:, - # applies_to_price_ids:, - # is_invoice_level:, - # maximum_amount:, - # plan_phase_order:, - # reason:, - # adjustment_type: :maximum, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end - end -end diff --git a/lib/orb/models/affected_block_model.rb b/lib/orb/models/affected_block_model.rb deleted file mode 100644 index 423cb6d9..00000000 --- a/lib/orb/models/affected_block_model.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class AffectedBlockModel < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute expiry_date - # - # @return [Time, nil] - required :expiry_date, Time, nil?: true - - # @!attribute per_unit_cost_basis - # - # @return [String, nil] - required :per_unit_cost_basis, String, nil?: true - - # @!parse - # # @param id [String] - # # @param expiry_date [Time, nil] - # # @param per_unit_cost_basis [String, nil] - # # - # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/aggregated_cost_model.rb b/lib/orb/models/aggregated_cost_model.rb deleted file mode 100644 index dc9a785a..00000000 --- a/lib/orb/models/aggregated_cost_model.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class AggregatedCostModel < Orb::BaseModel - # @!attribute per_price_costs - # - # @return [Array] - required :per_price_costs, -> { Orb::ArrayOf[Orb::Models::AggregatedCostModel::PerPriceCost] } - - # @!attribute subtotal - # Total costs for the timeframe, excluding any minimums and discounts. - # - # @return [String] - required :subtotal, String - - # @!attribute timeframe_end - # - # @return [Time] - required :timeframe_end, Time - - # @!attribute timeframe_start - # - # @return [Time] - required :timeframe_start, Time - - # @!attribute total - # Total costs for the timeframe, including any minimums and discounts. - # - # @return [String] - required :total, String - - # @!parse - # # @param per_price_costs [Array] - # # @param subtotal [String] - # # @param timeframe_end [Time] - # # @param timeframe_start [Time] - # # @param total [String] - # # - # def initialize(per_price_costs:, subtotal:, timeframe_end:, timeframe_start:, total:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - class PerPriceCost < Orb::BaseModel - # @!attribute price - # The price object - # - # @return [Orb::Models::PriceModel::UnitPrice, Orb::Models::PriceModel::PackagePrice, Orb::Models::PriceModel::MatrixPrice, Orb::Models::PriceModel::TieredPrice, Orb::Models::PriceModel::TieredBpsPrice, Orb::Models::PriceModel::BpsPrice, Orb::Models::PriceModel::BulkBpsPrice, Orb::Models::PriceModel::BulkPrice, Orb::Models::PriceModel::ThresholdTotalAmountPrice, Orb::Models::PriceModel::TieredPackagePrice, Orb::Models::PriceModel::GroupedTieredPrice, Orb::Models::PriceModel::TieredWithMinimumPrice, Orb::Models::PriceModel::TieredPackageWithMinimumPrice, Orb::Models::PriceModel::PackageWithAllocationPrice, Orb::Models::PriceModel::UnitWithPercentPrice, Orb::Models::PriceModel::MatrixWithAllocationPrice, Orb::Models::PriceModel::TieredWithProrationPrice, Orb::Models::PriceModel::UnitWithProrationPrice, Orb::Models::PriceModel::GroupedAllocationPrice, Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, Orb::Models::PriceModel::MatrixWithDisplayNamePrice, Orb::Models::PriceModel::BulkWithProrationPrice, Orb::Models::PriceModel::GroupedTieredPackagePrice, Orb::Models::PriceModel::MaxGroupTieredPackagePrice, Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, Orb::Models::PriceModel::CumulativeGroupedBulkPrice] - required :price, union: -> { Orb::Models::PriceModel } - - # @!attribute price_id - # The price the cost is associated with - # - # @return [String] - required :price_id, String - - # @!attribute subtotal - # Price's contributions for the timeframe, excluding any minimums and discounts. - # - # @return [String] - required :subtotal, String - - # @!attribute total - # Price's contributions for the timeframe, including minimums and discounts. - # - # @return [String] - required :total, String - - # @!attribute quantity - # The price's quantity for the timeframe - # - # @return [Float, nil] - optional :quantity, Float, nil?: true - - # @!parse - # # @param price [Orb::Models::PriceModel::UnitPrice, Orb::Models::PriceModel::PackagePrice, Orb::Models::PriceModel::MatrixPrice, Orb::Models::PriceModel::TieredPrice, Orb::Models::PriceModel::TieredBpsPrice, Orb::Models::PriceModel::BpsPrice, Orb::Models::PriceModel::BulkBpsPrice, Orb::Models::PriceModel::BulkPrice, Orb::Models::PriceModel::ThresholdTotalAmountPrice, Orb::Models::PriceModel::TieredPackagePrice, Orb::Models::PriceModel::GroupedTieredPrice, Orb::Models::PriceModel::TieredWithMinimumPrice, Orb::Models::PriceModel::TieredPackageWithMinimumPrice, Orb::Models::PriceModel::PackageWithAllocationPrice, Orb::Models::PriceModel::UnitWithPercentPrice, Orb::Models::PriceModel::MatrixWithAllocationPrice, Orb::Models::PriceModel::TieredWithProrationPrice, Orb::Models::PriceModel::UnitWithProrationPrice, Orb::Models::PriceModel::GroupedAllocationPrice, Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, Orb::Models::PriceModel::MatrixWithDisplayNamePrice, Orb::Models::PriceModel::BulkWithProrationPrice, Orb::Models::PriceModel::GroupedTieredPackagePrice, Orb::Models::PriceModel::MaxGroupTieredPackagePrice, Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, Orb::Models::PriceModel::CumulativeGroupedBulkPrice] - # # @param price_id [String] - # # @param subtotal [String] - # # @param total [String] - # # @param quantity [Float, nil] - # # - # def initialize(price:, price_id:, subtotal:, total:, quantity: nil, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end - end -end diff --git a/lib/orb/models/alert.rb b/lib/orb/models/alert.rb index d0f183d6..75f8451c 100644 --- a/lib/orb/models/alert.rb +++ b/lib/orb/models/alert.rb @@ -24,8 +24,8 @@ class Alert < Orb::BaseModel # @!attribute customer # The customer the alert applies to. # - # @return [Orb::Models::CustomerMinifiedModel, nil] - required :customer, -> { Orb::Models::CustomerMinifiedModel }, nil?: true + # @return [Orb::Models::Alert::Customer, nil] + required :customer, -> { Orb::Models::Alert::Customer }, nil?: true # @!attribute enabled # Whether the alert is enabled or disabled. @@ -48,15 +48,15 @@ class Alert < Orb::BaseModel # @!attribute subscription # The subscription the alert applies to. # - # @return [Orb::Models::SubscriptionMinifiedModel, nil] - required :subscription, -> { Orb::Models::SubscriptionMinifiedModel }, nil?: true + # @return [Orb::Models::Alert::Subscription, nil] + required :subscription, -> { Orb::Models::Alert::Subscription }, nil?: true # @!attribute thresholds # The thresholds that define the conditions under which the alert will be # triggered. # - # @return [Array, nil] - required :thresholds, -> { Orb::ArrayOf[Orb::Models::ThresholdModel] }, nil?: true + # @return [Array, nil] + required :thresholds, -> { Orb::ArrayOf[Orb::Models::Alert::Threshold] }, nil?: true # @!attribute type # The type of alert. This must be a valid alert type. @@ -74,18 +74,40 @@ class Alert < Orb::BaseModel # # @param id [String] # # @param created_at [Time] # # @param currency [String, nil] - # # @param customer [Orb::Models::CustomerMinifiedModel, nil] + # # @param customer [Orb::Models::Alert::Customer, nil] # # @param enabled [Boolean] # # @param metric [Orb::Models::Alert::Metric, nil] # # @param plan [Orb::Models::Alert::Plan, nil] - # # @param subscription [Orb::Models::SubscriptionMinifiedModel, nil] - # # @param thresholds [Array, nil] + # # @param subscription [Orb::Models::Alert::Subscription, nil] + # # @param thresholds [Array, nil] # # @param type [Symbol, Orb::Models::Alert::Type] # # # def initialize(id:, created_at:, currency:, customer:, enabled:, metric:, plan:, subscription:, thresholds:, type:, **) = super # def initialize: (Hash | Orb::BaseModel) -> void + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # The customer the alert applies to. + # # + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + class Metric < Orb::BaseModel # @!attribute id # @@ -139,6 +161,42 @@ class Plan < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + class Subscription < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # The subscription the alert applies to. + # # + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Threshold < Orb::BaseModel + # @!attribute value + # The value at which an alert will fire. For credit balance alerts, the alert will + # fire at or below this value. For usage and cost alerts, the alert will fire at + # or above this value. + # + # @return [Float] + required :value, Float + + # @!parse + # # Thresholds are used to define the conditions under which an alert will be + # # triggered. + # # + # # @param value [Float] + # # + # def initialize(value:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # The type of alert. This must be a valid alert type. diff --git a/lib/orb/models/alert_create_for_subscription_params.rb b/lib/orb/models/alert_create_for_subscription_params.rb index 34352a15..b03899a1 100644 --- a/lib/orb/models/alert_create_for_subscription_params.rb +++ b/lib/orb/models/alert_create_for_subscription_params.rb @@ -10,8 +10,8 @@ class AlertCreateForSubscriptionParams < Orb::BaseModel # @!attribute thresholds # The thresholds that define the values at which the alert will be triggered. # - # @return [Array] - required :thresholds, -> { Orb::ArrayOf[Orb::Models::ThresholdModel] } + # @return [Array] + required :thresholds, -> { Orb::ArrayOf[Orb::Models::AlertCreateForSubscriptionParams::Threshold] } # @!attribute type # The type of alert to create. This must be a valid alert type. @@ -26,7 +26,7 @@ class AlertCreateForSubscriptionParams < Orb::BaseModel optional :metric_id, String, nil?: true # @!parse - # # @param thresholds [Array] + # # @param thresholds [Array] # # @param type [Symbol, Orb::Models::AlertCreateForSubscriptionParams::Type] # # @param metric_id [String, nil] # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] @@ -35,6 +35,26 @@ class AlertCreateForSubscriptionParams < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class Threshold < Orb::BaseModel + # @!attribute value + # The value at which an alert will fire. For credit balance alerts, the alert will + # fire at or below this value. For usage and cost alerts, the alert will fire at + # or above this value. + # + # @return [Float] + required :value, Float + + # @!parse + # # Thresholds are used to define the conditions under which an alert will be + # # triggered. + # # + # # @param value [Float] + # # + # def initialize(value:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # The type of alert to create. This must be a valid alert type. diff --git a/lib/orb/models/alert_model.rb b/lib/orb/models/alert_model.rb deleted file mode 100644 index 7f9a30a3..00000000 --- a/lib/orb/models/alert_model.rb +++ /dev/null @@ -1,177 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class AlertModel < Orb::BaseModel - # @!attribute id - # Also referred to as alert_id in this documentation. - # - # @return [String] - required :id, String - - # @!attribute created_at - # The creation time of the resource in Orb. - # - # @return [Time] - required :created_at, Time - - # @!attribute currency - # The name of the currency the credit balance or invoice cost is denominated in. - # - # @return [String, nil] - required :currency, String, nil?: true - - # @!attribute customer - # The customer the alert applies to. - # - # @return [Orb::Models::CustomerMinifiedModel, nil] - required :customer, -> { Orb::Models::CustomerMinifiedModel }, nil?: true - - # @!attribute enabled - # Whether the alert is enabled or disabled. - # - # @return [Boolean] - required :enabled, Orb::BooleanModel - - # @!attribute metric - # The metric the alert applies to. - # - # @return [Orb::Models::AlertModel::Metric, nil] - required :metric, -> { Orb::Models::AlertModel::Metric }, nil?: true - - # @!attribute plan - # The plan the alert applies to. - # - # @return [Orb::Models::AlertModel::Plan, nil] - required :plan, -> { Orb::Models::AlertModel::Plan }, nil?: true - - # @!attribute subscription - # The subscription the alert applies to. - # - # @return [Orb::Models::SubscriptionMinifiedModel, nil] - required :subscription, -> { Orb::Models::SubscriptionMinifiedModel }, nil?: true - - # @!attribute thresholds - # The thresholds that define the conditions under which the alert will be - # triggered. - # - # @return [Array, nil] - required :thresholds, -> { Orb::ArrayOf[Orb::Models::ThresholdModel] }, nil?: true - - # @!attribute type - # The type of alert. This must be a valid alert type. - # - # @return [Symbol, Orb::Models::AlertModel::Type] - required :type, enum: -> { Orb::Models::AlertModel::Type } - - # @!parse - # # [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending, - # # usage, or credit balance and trigger webhooks when a threshold is exceeded. - # # - # # Alerts created through the API can be scoped to either customers or - # # subscriptions. - # # - # # @param id [String] - # # @param created_at [Time] - # # @param currency [String, nil] - # # @param customer [Orb::Models::CustomerMinifiedModel, nil] - # # @param enabled [Boolean] - # # @param metric [Orb::Models::AlertModel::Metric, nil] - # # @param plan [Orb::Models::AlertModel::Plan, nil] - # # @param subscription [Orb::Models::SubscriptionMinifiedModel, nil] - # # @param thresholds [Array, nil] - # # @param type [Symbol, Orb::Models::AlertModel::Type] - # # - # def initialize(id:, created_at:, currency:, customer:, enabled:, metric:, plan:, subscription:, thresholds:, type:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - class Metric < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!parse - # # The metric the alert applies to. - # # - # # @param id [String] - # # - # def initialize(id:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - - class Plan < Orb::BaseModel - # @!attribute id - # - # @return [String, nil] - required :id, String, nil?: true - - # @!attribute external_plan_id - # An optional user-defined ID for this plan resource, used throughout the system - # as an alias for this Plan. Use this field to identify a plan by an existing - # identifier in your system. - # - # @return [String, nil] - required :external_plan_id, String, nil?: true - - # @!attribute name - # - # @return [String, nil] - required :name, String, nil?: true - - # @!attribute plan_version - # - # @return [String] - required :plan_version, String - - # @!parse - # # The plan the alert applies to. - # # - # # @param id [String, nil] - # # @param external_plan_id [String, nil] - # # @param name [String, nil] - # # @param plan_version [String] - # # - # def initialize(id:, external_plan_id:, name:, plan_version:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - - # @abstract - # - # The type of alert. This must be a valid alert type. - # - # @example - # ```ruby - # case type - # in :usage_exceeded - # # ... - # in :cost_exceeded - # # ... - # in :credit_balance_depleted - # # ... - # in :credit_balance_dropped - # # ... - # in :credit_balance_recovered - # # ... - # end - # ``` - class Type < Orb::Enum - USAGE_EXCEEDED = :usage_exceeded - COST_EXCEEDED = :cost_exceeded - CREDIT_BALANCE_DEPLETED = :credit_balance_depleted - CREDIT_BALANCE_DROPPED = :credit_balance_dropped - CREDIT_BALANCE_RECOVERED = :credit_balance_recovered - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end -end diff --git a/lib/orb/models/alert_update_params.rb b/lib/orb/models/alert_update_params.rb index 1d1b0188..9a7dd021 100644 --- a/lib/orb/models/alert_update_params.rb +++ b/lib/orb/models/alert_update_params.rb @@ -10,16 +10,36 @@ class AlertUpdateParams < Orb::BaseModel # @!attribute thresholds # The thresholds that define the values at which the alert will be triggered. # - # @return [Array] - required :thresholds, -> { Orb::ArrayOf[Orb::Models::ThresholdModel] } + # @return [Array] + required :thresholds, -> { Orb::ArrayOf[Orb::Models::AlertUpdateParams::Threshold] } # @!parse - # # @param thresholds [Array] + # # @param thresholds [Array] # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] # # # def initialize(thresholds:, request_options: {}, **) = super # def initialize: (Hash | Orb::BaseModel) -> void + + class Threshold < Orb::BaseModel + # @!attribute value + # The value at which an alert will fire. For credit balance alerts, the alert will + # fire at or below this value. For usage and cost alerts, the alert will fire at + # or above this value. + # + # @return [Float] + required :value, Float + + # @!parse + # # Thresholds are used to define the conditions under which an alert will be + # # triggered. + # # + # # @param value [Float] + # # + # def initialize(value:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end end end diff --git a/lib/orb/models/allocation_model.rb b/lib/orb/models/allocation_model.rb deleted file mode 100644 index b597dc52..00000000 --- a/lib/orb/models/allocation_model.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class AllocationModel < Orb::BaseModel - # @!attribute allows_rollover - # - # @return [Boolean] - required :allows_rollover, Orb::BooleanModel - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!parse - # # @param allows_rollover [Boolean] - # # @param currency [String] - # # - # def initialize(allows_rollover:, currency:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/amount_discount_interval_model.rb b/lib/orb/models/amount_discount_interval_model.rb deleted file mode 100644 index af96cfaf..00000000 --- a/lib/orb/models/amount_discount_interval_model.rb +++ /dev/null @@ -1,84 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class AmountDiscountIntervalModel < Orb::BaseModel - # @!attribute amount_discount - # Only available if discount_type is `amount`. - # - # @return [String] - required :amount_discount, String - - # @!attribute applies_to_price_ids - # The price ids that this discount interval applies to. - # - # @return [Array] - required :applies_to_price_ids, Orb::ArrayOf[String] - - # @!attribute applies_to_price_interval_ids - # The price interval ids that this discount interval applies to. - # - # @return [Array] - required :applies_to_price_interval_ids, Orb::ArrayOf[String] - - # @!attribute discount_type - # - # @return [Symbol, Orb::Models::AmountDiscountIntervalModel::DiscountType] - required :discount_type, enum: -> { Orb::Models::AmountDiscountIntervalModel::DiscountType } - - # @!attribute end_date - # The end date of the discount interval. - # - # @return [Time, nil] - required :end_date, Time, nil?: true - - # @!attribute start_date - # The start date of the discount interval. - # - # @return [Time] - required :start_date, Time - - # @!parse - # # @param amount_discount [String] - # # @param applies_to_price_ids [Array] - # # @param applies_to_price_interval_ids [Array] - # # @param discount_type [Symbol, Orb::Models::AmountDiscountIntervalModel::DiscountType] - # # @param end_date [Time, nil] - # # @param start_date [Time] - # # - # def initialize( - # amount_discount:, - # applies_to_price_ids:, - # applies_to_price_interval_ids:, - # discount_type:, - # end_date:, - # start_date:, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case discount_type - # in :amount - # # ... - # end - # ``` - class DiscountType < Orb::Enum - AMOUNT = :amount - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end -end diff --git a/lib/orb/models/amount_discount_model.rb b/lib/orb/models/amount_discount_model.rb deleted file mode 100644 index e311af66..00000000 --- a/lib/orb/models/amount_discount_model.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class AmountDiscountModel < Orb::BaseModel - # @!attribute amount_discount - # Only available if discount_type is `amount`. - # - # @return [String] - required :amount_discount, String - - # @!attribute applies_to_price_ids - # List of price_ids that this discount applies to. For plan/plan phase discounts, - # this can be a subset of prices. - # - # @return [Array] - required :applies_to_price_ids, Orb::ArrayOf[String] - - # @!attribute discount_type - # - # @return [Symbol, Orb::Models::AmountDiscountModel::DiscountType] - required :discount_type, enum: -> { Orb::Models::AmountDiscountModel::DiscountType } - - # @!attribute reason - # - # @return [String, nil] - optional :reason, String, nil?: true - - # @!parse - # # @param amount_discount [String] - # # @param applies_to_price_ids [Array] - # # @param discount_type [Symbol, Orb::Models::AmountDiscountModel::DiscountType] - # # @param reason [String, nil] - # # - # def initialize(amount_discount:, applies_to_price_ids:, discount_type:, reason: nil, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case discount_type - # in :amount - # # ... - # end - # ``` - class DiscountType < Orb::Enum - AMOUNT = :amount - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end -end diff --git a/lib/orb/models/auto_collection_model.rb b/lib/orb/models/auto_collection_model.rb deleted file mode 100644 index b936995c..00000000 --- a/lib/orb/models/auto_collection_model.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class AutoCollectionModel < Orb::BaseModel - # @!attribute enabled - # True only if auto-collection is enabled for this invoice. - # - # @return [Boolean, nil] - required :enabled, Orb::BooleanModel, nil?: true - - # @!attribute next_attempt_at - # If the invoice is scheduled for auto-collection, this field will reflect when - # the next attempt will occur. If dunning has been exhausted, or auto-collection - # is not enabled for this invoice, this field will be `null`. - # - # @return [Time, nil] - required :next_attempt_at, Time, nil?: true - - # @!attribute num_attempts - # Number of auto-collection payment attempts. - # - # @return [Integer, nil] - required :num_attempts, Integer, nil?: true - - # @!attribute previously_attempted_at - # If Orb has ever attempted payment auto-collection for this invoice, this field - # will reflect when that attempt occurred. In conjunction with `next_attempt_at`, - # this can be used to tell whether the invoice is currently in dunning (that is, - # `previously_attempted_at` is non-null, and `next_attempt_time` is non-null), or - # if dunning has been exhausted (`previously_attempted_at` is non-null, but - # `next_attempt_time` is null). - # - # @return [Time, nil] - required :previously_attempted_at, Time, nil?: true - - # @!parse - # # @param enabled [Boolean, nil] - # # @param next_attempt_at [Time, nil] - # # @param num_attempts [Integer, nil] - # # @param previously_attempted_at [Time, nil] - # # - # def initialize(enabled:, next_attempt_at:, num_attempts:, previously_attempted_at:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/backfill_model.rb b/lib/orb/models/backfill_model.rb deleted file mode 100644 index 23eeeca9..00000000 --- a/lib/orb/models/backfill_model.rb +++ /dev/null @@ -1,141 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class BackfillModel < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute close_time - # If in the future, the time at which the backfill will automatically close. If in - # the past, the time at which the backfill was closed. - # - # @return [Time, nil] - required :close_time, Time, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute customer_id - # The Orb-generated ID of the customer to which this backfill is scoped. If - # `null`, this backfill is scoped to all customers. - # - # @return [String, nil] - required :customer_id, String, nil?: true - - # @!attribute events_ingested - # The number of events ingested in this backfill. - # - # @return [Integer] - required :events_ingested, Integer - - # @!attribute replace_existing_events - # If `true`, existing events in the backfill's timeframe will be replaced with the - # newly ingested events associated with the backfill. If `false`, newly ingested - # events will be added to the existing events. - # - # @return [Boolean] - required :replace_existing_events, Orb::BooleanModel - - # @!attribute reverted_at - # The time at which this backfill was reverted. - # - # @return [Time, nil] - required :reverted_at, Time, nil?: true - - # @!attribute status - # The status of the backfill. - # - # @return [Symbol, Orb::Models::BackfillModel::Status] - required :status, enum: -> { Orb::Models::BackfillModel::Status } - - # @!attribute timeframe_end - # - # @return [Time] - required :timeframe_end, Time - - # @!attribute timeframe_start - # - # @return [Time] - required :timeframe_start, Time - - # @!attribute deprecation_filter - # A boolean - # [computed property](/extensibility/advanced-metrics#computed-properties) used to - # filter the set of events to deprecate - # - # @return [String, nil] - optional :deprecation_filter, String, nil?: true - - # @!parse - # # A backfill represents an update to historical usage data, adding or replacing - # # events in a timeframe. - # # - # # @param id [String] - # # @param close_time [Time, nil] - # # @param created_at [Time] - # # @param customer_id [String, nil] - # # @param events_ingested [Integer] - # # @param replace_existing_events [Boolean] - # # @param reverted_at [Time, nil] - # # @param status [Symbol, Orb::Models::BackfillModel::Status] - # # @param timeframe_end [Time] - # # @param timeframe_start [Time] - # # @param deprecation_filter [String, nil] - # # - # def initialize( - # id:, - # close_time:, - # created_at:, - # customer_id:, - # events_ingested:, - # replace_existing_events:, - # reverted_at:, - # status:, - # timeframe_end:, - # timeframe_start:, - # deprecation_filter: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The status of the backfill. - # - # @example - # ```ruby - # case status - # in :pending - # # ... - # in :reflected - # # ... - # in :pending_revert - # # ... - # in :reverted - # # ... - # end - # ``` - class Status < Orb::Enum - PENDING = :pending - REFLECTED = :reflected - PENDING_REVERT = :pending_revert - REVERTED = :reverted - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end -end diff --git a/lib/orb/models/billable_metric.rb b/lib/orb/models/billable_metric.rb index d7d5dcc7..2cf61284 100644 --- a/lib/orb/models/billable_metric.rb +++ b/lib/orb/models/billable_metric.rb @@ -18,8 +18,8 @@ class BillableMetric < Orb::BaseModel # with all line items, billable metrics, and prices and are used for defining # external sync behavior for invoices and tax calculation purposes. # - # @return [Orb::Models::ItemModel] - required :item, -> { Orb::Models::ItemModel } + # @return [Orb::Models::Item] + required :item, -> { Orb::Models::Item } # @!attribute metadata # User specified key-value pairs for the resource. If not present, this defaults @@ -47,7 +47,7 @@ class BillableMetric < Orb::BaseModel # # # # @param id [String] # # @param description [String, nil] - # # @param item [Orb::Models::ItemModel] + # # @param item [Orb::Models::Item] # # @param metadata [Hash{Symbol=>String}] # # @param name [String] # # @param status [Symbol, Orb::Models::BillableMetric::Status] diff --git a/lib/orb/models/billable_metric_model.rb b/lib/orb/models/billable_metric_model.rb deleted file mode 100644 index cad81434..00000000 --- a/lib/orb/models/billable_metric_model.rb +++ /dev/null @@ -1,86 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class BillableMetricModel < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute description - # - # @return [String, nil] - required :description, String, nil?: true - - # @!attribute item - # The Item resource represents a sellable product or good. Items are associated - # with all line items, billable metrics, and prices and are used for defining - # external sync behavior for invoices and tax calculation purposes. - # - # @return [Orb::Models::ItemModel] - required :item, -> { Orb::Models::ItemModel } - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute status - # - # @return [Symbol, Orb::Models::BillableMetricModel::Status] - required :status, enum: -> { Orb::Models::BillableMetricModel::Status } - - # @!parse - # # The Metric resource represents a calculation of a quantity based on events. - # # Metrics are defined by the query that transforms raw usage events into - # # meaningful values for your customers. - # # - # # @param id [String] - # # @param description [String, nil] - # # @param item [Orb::Models::ItemModel] - # # @param metadata [Hash{Symbol=>String}] - # # @param name [String] - # # @param status [Symbol, Orb::Models::BillableMetricModel::Status] - # # - # def initialize(id:, description:, item:, metadata:, name:, status:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case status - # in :active - # # ... - # in :draft - # # ... - # in :archived - # # ... - # end - # ``` - class Status < Orb::Enum - ACTIVE = :active - DRAFT = :draft - ARCHIVED = :archived - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end -end diff --git a/lib/orb/models/billable_metric_simple_model.rb b/lib/orb/models/billable_metric_simple_model.rb deleted file mode 100644 index e39def41..00000000 --- a/lib/orb/models/billable_metric_simple_model.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class BillableMetricSimpleModel < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!parse - # # @param id [String] - # # @param name [String] - # # - # def initialize(id:, name:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/billable_metric_tiny_model.rb b/lib/orb/models/billable_metric_tiny_model.rb deleted file mode 100644 index ed38710b..00000000 --- a/lib/orb/models/billable_metric_tiny_model.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class BillableMetricTinyModel < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!parse - # # @param id [String] - # # - # def initialize(id:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/billing_cycle_anchor_configuration_model.rb b/lib/orb/models/billing_cycle_anchor_configuration_model.rb deleted file mode 100644 index e1f47ee9..00000000 --- a/lib/orb/models/billing_cycle_anchor_configuration_model.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class BillingCycleAnchorConfigurationModel < Orb::BaseModel - # @!attribute day - # The day of the month on which the billing cycle is anchored. If the maximum - # number of days in a month is greater than this value, the last day of the month - # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing - # period begins on the 30th. - # - # @return [Integer] - required :day, Integer - - # @!attribute month - # The month on which the billing cycle is anchored (e.g. a quarterly price - # anchored in February would have cycles starting February, May, August, and - # November). - # - # @return [Integer, nil] - optional :month, Integer, nil?: true - - # @!attribute year - # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle - # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). - # - # @return [Integer, nil] - optional :year, Integer, nil?: true - - # @!parse - # # @param day [Integer] - # # @param month [Integer, nil] - # # @param year [Integer, nil] - # # - # def initialize(day:, month: nil, year: nil, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/billing_cycle_configuration_model.rb b/lib/orb/models/billing_cycle_configuration_model.rb deleted file mode 100644 index b61b2aaa..00000000 --- a/lib/orb/models/billing_cycle_configuration_model.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class BillingCycleConfigurationModel < Orb::BaseModel - # @!attribute duration - # - # @return [Integer] - required :duration, Integer - - # @!attribute duration_unit - # - # @return [Symbol, Orb::Models::BillingCycleConfigurationModel::DurationUnit] - required :duration_unit, enum: -> { Orb::Models::BillingCycleConfigurationModel::DurationUnit } - - # @!parse - # # @param duration [Integer] - # # @param duration_unit [Symbol, Orb::Models::BillingCycleConfigurationModel::DurationUnit] - # # - # def initialize(duration:, duration_unit:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case duration_unit - # in :day - # # ... - # in :month - # # ... - # end - # ``` - class DurationUnit < Orb::Enum - DAY = :day - MONTH = :month - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end -end diff --git a/lib/orb/models/bps_config_model.rb b/lib/orb/models/bps_config_model.rb deleted file mode 100644 index 23852b2a..00000000 --- a/lib/orb/models/bps_config_model.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class BpsConfigModel < Orb::BaseModel - # @!attribute bps - # Basis point take rate per event - # - # @return [Float] - required :bps, Float - - # @!attribute per_unit_maximum - # Optional currency amount maximum to cap spend per event - # - # @return [String, nil] - optional :per_unit_maximum, String, nil?: true - - # @!parse - # # @param bps [Float] - # # @param per_unit_maximum [String, nil] - # # - # def initialize(bps:, per_unit_maximum: nil, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/bulk_bps_config_model.rb b/lib/orb/models/bulk_bps_config_model.rb deleted file mode 100644 index 9b144512..00000000 --- a/lib/orb/models/bulk_bps_config_model.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class BulkBpsConfigModel < Orb::BaseModel - # @!attribute tiers - # Tiers for a bulk BPS pricing model where all usage is aggregated to a single - # tier based on total volume - # - # @return [Array] - required :tiers, -> { Orb::ArrayOf[Orb::Models::BulkBpsConfigModel::Tier] } - - # @!parse - # # @param tiers [Array] - # # - # def initialize(tiers:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - class Tier < Orb::BaseModel - # @!attribute bps - # Basis points to rate on - # - # @return [Float] - required :bps, Float - - # @!attribute maximum_amount - # Upper bound for tier - # - # @return [String, nil] - optional :maximum_amount, String, nil?: true - - # @!attribute per_unit_maximum - # The maximum amount to charge for any one event - # - # @return [String, nil] - optional :per_unit_maximum, String, nil?: true - - # @!parse - # # @param bps [Float] - # # @param maximum_amount [String, nil] - # # @param per_unit_maximum [String, nil] - # # - # def initialize(bps:, maximum_amount: nil, per_unit_maximum: nil, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end - end -end diff --git a/lib/orb/models/bulk_config_model.rb b/lib/orb/models/bulk_config_model.rb deleted file mode 100644 index 6990aa98..00000000 --- a/lib/orb/models/bulk_config_model.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class BulkConfigModel < Orb::BaseModel - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, -> { Orb::ArrayOf[Orb::Models::BulkConfigModel::Tier] } - - # @!parse - # # @param tiers [Array] - # # - # def initialize(tiers:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - class Tier < Orb::BaseModel - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute maximum_units - # Upper bound for this tier - # - # @return [Float, nil] - optional :maximum_units, Float, nil?: true - - # @!parse - # # @param unit_amount [String] - # # @param maximum_units [Float, nil] - # # - # def initialize(unit_amount:, maximum_units: nil, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end - end -end diff --git a/lib/orb/models/coupon_model.rb b/lib/orb/models/coupon_model.rb deleted file mode 100644 index 7ad12eda..00000000 --- a/lib/orb/models/coupon_model.rb +++ /dev/null @@ -1,104 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class CouponModel < Orb::BaseModel - # @!attribute id - # Also referred to as coupon_id in this documentation. - # - # @return [String] - required :id, String - - # @!attribute archived_at - # An archived coupon can no longer be redeemed. Active coupons will have a value - # of null for `archived_at`; this field will be non-null for archived coupons. - # - # @return [Time, nil] - required :archived_at, Time, nil?: true - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount] - required :discount, union: -> { Orb::Models::CouponModel::Discount } - - # @!attribute duration_in_months - # This allows for a coupon's discount to apply for a limited time (determined in - # months); a `null` value here means "unlimited time". - # - # @return [Integer, nil] - required :duration_in_months, Integer, nil?: true - - # @!attribute max_redemptions - # The maximum number of redemptions allowed for this coupon before it is - # exhausted; `null` here means "unlimited". - # - # @return [Integer, nil] - required :max_redemptions, Integer, nil?: true - - # @!attribute redemption_code - # This string can be used to redeem this coupon for a given subscription. - # - # @return [String] - required :redemption_code, String - - # @!attribute times_redeemed - # The number of times this coupon has been redeemed. - # - # @return [Integer] - required :times_redeemed, Integer - - # @!parse - # # A coupon represents a reusable discount configuration that can be applied either - # # as a fixed or percentage amount to an invoice or subscription. Coupons are - # # activated using a redemption code, which applies the discount to a subscription - # # or invoice. The duration of a coupon determines how long it remains available - # # for use by end users. - # # - # # @param id [String] - # # @param archived_at [Time, nil] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount] - # # @param duration_in_months [Integer, nil] - # # @param max_redemptions [Integer, nil] - # # @param redemption_code [String] - # # @param times_redeemed [Integer] - # # - # def initialize(id:, archived_at:, discount:, duration_in_months:, max_redemptions:, redemption_code:, times_redeemed:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case discount - # in { - # discount_type: "percentage", - # applies_to_price_ids: ^(Orb::ArrayOf[String]), - # percentage_discount: Float, - # reason: String - # } - # # Orb::Models::PercentageDiscount ... - # in {discount_type: "amount", amount_discount: String, applies_to_price_ids: ^(Orb::ArrayOf[String]), reason: String} - # # Orb::Models::AmountDiscount ... - # end - # ``` - # - # @example - # ```ruby - # case discount - # in Orb::Models::PercentageDiscount - # # ... - # in Orb::Models::AmountDiscount - # # ... - # end - # ``` - class Discount < Orb::Union - discriminator :discount_type - - variant :percentage, -> { Orb::Models::PercentageDiscount } - - variant :amount, -> { Orb::Models::AmountDiscount } - end - end - end -end diff --git a/lib/orb/models/coupon_redemption_model.rb b/lib/orb/models/coupon_redemption_model.rb deleted file mode 100644 index f28bbea0..00000000 --- a/lib/orb/models/coupon_redemption_model.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class CouponRedemptionModel < Orb::BaseModel - # @!attribute coupon_id - # - # @return [String] - required :coupon_id, String - - # @!attribute end_date - # - # @return [Time, nil] - required :end_date, Time, nil?: true - - # @!attribute start_date - # - # @return [Time] - required :start_date, Time - - # @!parse - # # @param coupon_id [String] - # # @param end_date [Time, nil] - # # @param start_date [Time] - # # - # def initialize(coupon_id:, end_date:, start_date:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/create_customer_alert_request.rb b/lib/orb/models/create_customer_alert_request.rb index 1eaf165f..2deb6043 100644 --- a/lib/orb/models/create_customer_alert_request.rb +++ b/lib/orb/models/create_customer_alert_request.rb @@ -18,13 +18,13 @@ class CreateCustomerAlertRequest < Orb::BaseModel # @!attribute thresholds # The thresholds that define the values at which the alert will be triggered. # - # @return [Array, nil] - optional :thresholds, -> { Orb::ArrayOf[Orb::Models::ThresholdModel] }, nil?: true + # @return [Array, nil] + optional :thresholds, -> { Orb::ArrayOf[Orb::Models::CreateCustomerAlertRequest::Threshold] }, nil?: true # @!parse # # @param currency [String] # # @param type [Symbol, Orb::Models::CreateCustomerAlertRequest::Type] - # # @param thresholds [Array, nil] + # # @param thresholds [Array, nil] # # # def initialize(currency:, type:, thresholds: nil, **) = super @@ -63,6 +63,26 @@ class Type < Orb::Enum # # # def self.values; end end + + class Threshold < Orb::BaseModel + # @!attribute value + # The value at which an alert will fire. For credit balance alerts, the alert will + # fire at or below this value. For usage and cost alerts, the alert will fire at + # or above this value. + # + # @return [Float] + required :value, Float + + # @!parse + # # Thresholds are used to define the conditions under which an alert will be + # # triggered. + # # + # # @param value [Float] + # # + # def initialize(value:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end end end diff --git a/lib/orb/models/credit_ledger_entries_model.rb b/lib/orb/models/credit_ledger_entries_model.rb deleted file mode 100644 index e986fdd2..00000000 --- a/lib/orb/models/credit_ledger_entries_model.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class CreditLedgerEntriesModel < Orb::BaseModel - # @!attribute data - # - # @return [Array] - required :data, -> { Orb::ArrayOf[union: Orb::Models::CreditLedgerEntryModel] } - - # @!attribute pagination_metadata - # - # @return [Orb::Models::PaginationMetadata] - required :pagination_metadata, -> { Orb::Models::PaginationMetadata } - - # @!parse - # # @param data [Array] - # # @param pagination_metadata [Orb::Models::PaginationMetadata] - # # - # def initialize(data:, pagination_metadata:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/credit_ledger_entry_model.rb b/lib/orb/models/credit_ledger_entry_model.rb deleted file mode 100644 index 1c0ab6b0..00000000 --- a/lib/orb/models/credit_ledger_entry_model.rb +++ /dev/null @@ -1,1046 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - # @abstract - # - # The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid - # credits within Orb. - # - # @example - # ```ruby - # case credit_ledger_entry_model - # in {entry_type: "increment", id: String, amount: Float, created_at: Time} - # # Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry ... - # in {entry_type: "decrement", id: String, amount: Float, created_at: Time} - # # Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry ... - # in {entry_type: "expiration_change", id: String, amount: Float, created_at: Time} - # # Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry ... - # in {entry_type: "credit_block_expiry", id: String, amount: Float, created_at: Time} - # # Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry ... - # in {entry_type: "void", id: String, amount: Float, created_at: Time} - # # Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry ... - # in {entry_type: "void_initiated", id: String, amount: Float, created_at: Time} - # # Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry ... - # in {entry_type: "amendment", id: String, amount: Float, created_at: Time} - # # Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry ... - # end - # ``` - # - # @example - # ```ruby - # case credit_ledger_entry_model - # in Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry - # # ... - # in Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry - # # ... - # in Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry - # # ... - # in Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry - # # ... - # in Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry - # # ... - # in Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry - # # ... - # in Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry - # # ... - # end - # ``` - class CreditLedgerEntryModel < Orb::Union - discriminator :entry_type - - variant :increment, -> { Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry } - - variant :decrement, -> { Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry } - - variant :expiration_change, -> { Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry } - - variant :credit_block_expiry, -> { Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry } - - variant :void, -> { Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry } - - variant :void_initiated, -> { Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry } - - variant :amendment, -> { Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry } - - class IncrementLedgerEntry < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute amount - # - # @return [Float] - required :amount, Float - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_block - # - # @return [Orb::Models::AffectedBlockModel] - required :credit_block, -> { Orb::Models::AffectedBlockModel } - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute customer - # - # @return [Orb::Models::CustomerMinifiedModel] - required :customer, -> { Orb::Models::CustomerMinifiedModel } - - # @!attribute description - # - # @return [String, nil] - required :description, String, nil?: true - - # @!attribute ending_balance - # - # @return [Float] - required :ending_balance, Float - - # @!attribute entry_status - # - # @return [Symbol, Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry::EntryStatus] - required :entry_status, - enum: -> { Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry::EntryStatus } - - # @!attribute entry_type - # - # @return [Symbol, :increment] - required :entry_type, const: :increment - - # @!attribute ledger_sequence_number - # - # @return [Integer] - required :ledger_sequence_number, Integer - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute starting_balance - # - # @return [Float] - required :starting_balance, Float - - # @!parse - # # @param id [String] - # # @param amount [Float] - # # @param created_at [Time] - # # @param credit_block [Orb::Models::AffectedBlockModel] - # # @param currency [String] - # # @param customer [Orb::Models::CustomerMinifiedModel] - # # @param description [String, nil] - # # @param ending_balance [Float] - # # @param entry_status [Symbol, Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry::EntryStatus] - # # @param ledger_sequence_number [Integer] - # # @param metadata [Hash{Symbol=>String}] - # # @param starting_balance [Float] - # # @param entry_type [Symbol, :increment] - # # - # def initialize( - # id:, - # amount:, - # created_at:, - # credit_block:, - # currency:, - # customer:, - # description:, - # ending_balance:, - # entry_status:, - # ledger_sequence_number:, - # metadata:, - # starting_balance:, - # entry_type: :increment, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case entry_status - # in :committed - # # ... - # in :pending - # # ... - # end - # ``` - class EntryStatus < Orb::Enum - COMMITTED = :committed - PENDING = :pending - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class DecrementLedgerEntry < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute amount - # - # @return [Float] - required :amount, Float - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_block - # - # @return [Orb::Models::AffectedBlockModel] - required :credit_block, -> { Orb::Models::AffectedBlockModel } - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute customer - # - # @return [Orb::Models::CustomerMinifiedModel] - required :customer, -> { Orb::Models::CustomerMinifiedModel } - - # @!attribute description - # - # @return [String, nil] - required :description, String, nil?: true - - # @!attribute ending_balance - # - # @return [Float] - required :ending_balance, Float - - # @!attribute entry_status - # - # @return [Symbol, Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry::EntryStatus] - required :entry_status, - enum: -> { Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry::EntryStatus } - - # @!attribute entry_type - # - # @return [Symbol, :decrement] - required :entry_type, const: :decrement - - # @!attribute ledger_sequence_number - # - # @return [Integer] - required :ledger_sequence_number, Integer - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute starting_balance - # - # @return [Float] - required :starting_balance, Float - - # @!attribute event_id - # - # @return [String, nil] - optional :event_id, String, nil?: true - - # @!attribute invoice_id - # - # @return [String, nil] - optional :invoice_id, String, nil?: true - - # @!attribute price_id - # - # @return [String, nil] - optional :price_id, String, nil?: true - - # @!parse - # # @param id [String] - # # @param amount [Float] - # # @param created_at [Time] - # # @param credit_block [Orb::Models::AffectedBlockModel] - # # @param currency [String] - # # @param customer [Orb::Models::CustomerMinifiedModel] - # # @param description [String, nil] - # # @param ending_balance [Float] - # # @param entry_status [Symbol, Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry::EntryStatus] - # # @param ledger_sequence_number [Integer] - # # @param metadata [Hash{Symbol=>String}] - # # @param starting_balance [Float] - # # @param event_id [String, nil] - # # @param invoice_id [String, nil] - # # @param price_id [String, nil] - # # @param entry_type [Symbol, :decrement] - # # - # def initialize( - # id:, - # amount:, - # created_at:, - # credit_block:, - # currency:, - # customer:, - # description:, - # ending_balance:, - # entry_status:, - # ledger_sequence_number:, - # metadata:, - # starting_balance:, - # event_id: nil, - # invoice_id: nil, - # price_id: nil, - # entry_type: :decrement, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case entry_status - # in :committed - # # ... - # in :pending - # # ... - # end - # ``` - class EntryStatus < Orb::Enum - COMMITTED = :committed - PENDING = :pending - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class ExpirationChangeLedgerEntry < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute amount - # - # @return [Float] - required :amount, Float - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_block - # - # @return [Orb::Models::AffectedBlockModel] - required :credit_block, -> { Orb::Models::AffectedBlockModel } - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute customer - # - # @return [Orb::Models::CustomerMinifiedModel] - required :customer, -> { Orb::Models::CustomerMinifiedModel } - - # @!attribute description - # - # @return [String, nil] - required :description, String, nil?: true - - # @!attribute ending_balance - # - # @return [Float] - required :ending_balance, Float - - # @!attribute entry_status - # - # @return [Symbol, Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry::EntryStatus] - required :entry_status, - enum: -> { Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry::EntryStatus } - - # @!attribute entry_type - # - # @return [Symbol, :expiration_change] - required :entry_type, const: :expiration_change - - # @!attribute ledger_sequence_number - # - # @return [Integer] - required :ledger_sequence_number, Integer - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute new_block_expiry_date - # - # @return [Time, nil] - required :new_block_expiry_date, Time, nil?: true - - # @!attribute starting_balance - # - # @return [Float] - required :starting_balance, Float - - # @!parse - # # @param id [String] - # # @param amount [Float] - # # @param created_at [Time] - # # @param credit_block [Orb::Models::AffectedBlockModel] - # # @param currency [String] - # # @param customer [Orb::Models::CustomerMinifiedModel] - # # @param description [String, nil] - # # @param ending_balance [Float] - # # @param entry_status [Symbol, Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry::EntryStatus] - # # @param ledger_sequence_number [Integer] - # # @param metadata [Hash{Symbol=>String}] - # # @param new_block_expiry_date [Time, nil] - # # @param starting_balance [Float] - # # @param entry_type [Symbol, :expiration_change] - # # - # def initialize( - # id:, - # amount:, - # created_at:, - # credit_block:, - # currency:, - # customer:, - # description:, - # ending_balance:, - # entry_status:, - # ledger_sequence_number:, - # metadata:, - # new_block_expiry_date:, - # starting_balance:, - # entry_type: :expiration_change, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case entry_status - # in :committed - # # ... - # in :pending - # # ... - # end - # ``` - class EntryStatus < Orb::Enum - COMMITTED = :committed - PENDING = :pending - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class CreditBlockExpiryLedgerEntry < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute amount - # - # @return [Float] - required :amount, Float - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_block - # - # @return [Orb::Models::AffectedBlockModel] - required :credit_block, -> { Orb::Models::AffectedBlockModel } - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute customer - # - # @return [Orb::Models::CustomerMinifiedModel] - required :customer, -> { Orb::Models::CustomerMinifiedModel } - - # @!attribute description - # - # @return [String, nil] - required :description, String, nil?: true - - # @!attribute ending_balance - # - # @return [Float] - required :ending_balance, Float - - # @!attribute entry_status - # - # @return [Symbol, Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry::EntryStatus] - required :entry_status, - enum: -> { Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry::EntryStatus } - - # @!attribute entry_type - # - # @return [Symbol, :credit_block_expiry] - required :entry_type, const: :credit_block_expiry - - # @!attribute ledger_sequence_number - # - # @return [Integer] - required :ledger_sequence_number, Integer - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute starting_balance - # - # @return [Float] - required :starting_balance, Float - - # @!parse - # # @param id [String] - # # @param amount [Float] - # # @param created_at [Time] - # # @param credit_block [Orb::Models::AffectedBlockModel] - # # @param currency [String] - # # @param customer [Orb::Models::CustomerMinifiedModel] - # # @param description [String, nil] - # # @param ending_balance [Float] - # # @param entry_status [Symbol, Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry::EntryStatus] - # # @param ledger_sequence_number [Integer] - # # @param metadata [Hash{Symbol=>String}] - # # @param starting_balance [Float] - # # @param entry_type [Symbol, :credit_block_expiry] - # # - # def initialize( - # id:, - # amount:, - # created_at:, - # credit_block:, - # currency:, - # customer:, - # description:, - # ending_balance:, - # entry_status:, - # ledger_sequence_number:, - # metadata:, - # starting_balance:, - # entry_type: :credit_block_expiry, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case entry_status - # in :committed - # # ... - # in :pending - # # ... - # end - # ``` - class EntryStatus < Orb::Enum - COMMITTED = :committed - PENDING = :pending - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class VoidLedgerEntry < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute amount - # - # @return [Float] - required :amount, Float - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_block - # - # @return [Orb::Models::AffectedBlockModel] - required :credit_block, -> { Orb::Models::AffectedBlockModel } - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute customer - # - # @return [Orb::Models::CustomerMinifiedModel] - required :customer, -> { Orb::Models::CustomerMinifiedModel } - - # @!attribute description - # - # @return [String, nil] - required :description, String, nil?: true - - # @!attribute ending_balance - # - # @return [Float] - required :ending_balance, Float - - # @!attribute entry_status - # - # @return [Symbol, Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry::EntryStatus] - required :entry_status, enum: -> { Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry::EntryStatus } - - # @!attribute entry_type - # - # @return [Symbol, :void] - required :entry_type, const: :void - - # @!attribute ledger_sequence_number - # - # @return [Integer] - required :ledger_sequence_number, Integer - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute starting_balance - # - # @return [Float] - required :starting_balance, Float - - # @!attribute void_amount - # - # @return [Float] - required :void_amount, Float - - # @!attribute void_reason - # - # @return [String, nil] - required :void_reason, String, nil?: true - - # @!parse - # # @param id [String] - # # @param amount [Float] - # # @param created_at [Time] - # # @param credit_block [Orb::Models::AffectedBlockModel] - # # @param currency [String] - # # @param customer [Orb::Models::CustomerMinifiedModel] - # # @param description [String, nil] - # # @param ending_balance [Float] - # # @param entry_status [Symbol, Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry::EntryStatus] - # # @param ledger_sequence_number [Integer] - # # @param metadata [Hash{Symbol=>String}] - # # @param starting_balance [Float] - # # @param void_amount [Float] - # # @param void_reason [String, nil] - # # @param entry_type [Symbol, :void] - # # - # def initialize( - # id:, - # amount:, - # created_at:, - # credit_block:, - # currency:, - # customer:, - # description:, - # ending_balance:, - # entry_status:, - # ledger_sequence_number:, - # metadata:, - # starting_balance:, - # void_amount:, - # void_reason:, - # entry_type: :void, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case entry_status - # in :committed - # # ... - # in :pending - # # ... - # end - # ``` - class EntryStatus < Orb::Enum - COMMITTED = :committed - PENDING = :pending - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class VoidInitiatedLedgerEntry < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute amount - # - # @return [Float] - required :amount, Float - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_block - # - # @return [Orb::Models::AffectedBlockModel] - required :credit_block, -> { Orb::Models::AffectedBlockModel } - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute customer - # - # @return [Orb::Models::CustomerMinifiedModel] - required :customer, -> { Orb::Models::CustomerMinifiedModel } - - # @!attribute description - # - # @return [String, nil] - required :description, String, nil?: true - - # @!attribute ending_balance - # - # @return [Float] - required :ending_balance, Float - - # @!attribute entry_status - # - # @return [Symbol, Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry::EntryStatus] - required :entry_status, - enum: -> { Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry::EntryStatus } - - # @!attribute entry_type - # - # @return [Symbol, :void_initiated] - required :entry_type, const: :void_initiated - - # @!attribute ledger_sequence_number - # - # @return [Integer] - required :ledger_sequence_number, Integer - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute new_block_expiry_date - # - # @return [Time] - required :new_block_expiry_date, Time - - # @!attribute starting_balance - # - # @return [Float] - required :starting_balance, Float - - # @!attribute void_amount - # - # @return [Float] - required :void_amount, Float - - # @!attribute void_reason - # - # @return [String, nil] - required :void_reason, String, nil?: true - - # @!parse - # # @param id [String] - # # @param amount [Float] - # # @param created_at [Time] - # # @param credit_block [Orb::Models::AffectedBlockModel] - # # @param currency [String] - # # @param customer [Orb::Models::CustomerMinifiedModel] - # # @param description [String, nil] - # # @param ending_balance [Float] - # # @param entry_status [Symbol, Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry::EntryStatus] - # # @param ledger_sequence_number [Integer] - # # @param metadata [Hash{Symbol=>String}] - # # @param new_block_expiry_date [Time] - # # @param starting_balance [Float] - # # @param void_amount [Float] - # # @param void_reason [String, nil] - # # @param entry_type [Symbol, :void_initiated] - # # - # def initialize( - # id:, - # amount:, - # created_at:, - # credit_block:, - # currency:, - # customer:, - # description:, - # ending_balance:, - # entry_status:, - # ledger_sequence_number:, - # metadata:, - # new_block_expiry_date:, - # starting_balance:, - # void_amount:, - # void_reason:, - # entry_type: :void_initiated, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case entry_status - # in :committed - # # ... - # in :pending - # # ... - # end - # ``` - class EntryStatus < Orb::Enum - COMMITTED = :committed - PENDING = :pending - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class AmendmentLedgerEntry < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute amount - # - # @return [Float] - required :amount, Float - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_block - # - # @return [Orb::Models::AffectedBlockModel] - required :credit_block, -> { Orb::Models::AffectedBlockModel } - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute customer - # - # @return [Orb::Models::CustomerMinifiedModel] - required :customer, -> { Orb::Models::CustomerMinifiedModel } - - # @!attribute description - # - # @return [String, nil] - required :description, String, nil?: true - - # @!attribute ending_balance - # - # @return [Float] - required :ending_balance, Float - - # @!attribute entry_status - # - # @return [Symbol, Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry::EntryStatus] - required :entry_status, - enum: -> { Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry::EntryStatus } - - # @!attribute entry_type - # - # @return [Symbol, :amendment] - required :entry_type, const: :amendment - - # @!attribute ledger_sequence_number - # - # @return [Integer] - required :ledger_sequence_number, Integer - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute starting_balance - # - # @return [Float] - required :starting_balance, Float - - # @!parse - # # @param id [String] - # # @param amount [Float] - # # @param created_at [Time] - # # @param credit_block [Orb::Models::AffectedBlockModel] - # # @param currency [String] - # # @param customer [Orb::Models::CustomerMinifiedModel] - # # @param description [String, nil] - # # @param ending_balance [Float] - # # @param entry_status [Symbol, Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry::EntryStatus] - # # @param ledger_sequence_number [Integer] - # # @param metadata [Hash{Symbol=>String}] - # # @param starting_balance [Float] - # # @param entry_type [Symbol, :amendment] - # # - # def initialize( - # id:, - # amount:, - # created_at:, - # credit_block:, - # currency:, - # customer:, - # description:, - # ending_balance:, - # entry_status:, - # ledger_sequence_number:, - # metadata:, - # starting_balance:, - # entry_type: :amendment, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case entry_status - # in :committed - # # ... - # in :pending - # # ... - # end - # ``` - class EntryStatus < Orb::Enum - COMMITTED = :committed - PENDING = :pending - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end - end -end diff --git a/lib/orb/models/credit_note.rb b/lib/orb/models/credit_note.rb index c1e335f8..ce641b99 100644 --- a/lib/orb/models/credit_note.rb +++ b/lib/orb/models/credit_note.rb @@ -29,8 +29,8 @@ class CreditNote < Orb::BaseModel # @!attribute customer # - # @return [Orb::Models::CustomerMinifiedModel] - required :customer, -> { Orb::Models::CustomerMinifiedModel } + # @return [Orb::Models::CreditNote::Customer] + required :customer, -> { Orb::Models::CreditNote::Customer } # @!attribute invoice_id # The id of the invoice resource that this credit note is applied to. @@ -47,8 +47,8 @@ class CreditNote < Orb::BaseModel # @!attribute maximum_amount_adjustment # The maximum amount applied on the original invoice # - # @return [Orb::Models::CreditNoteDiscountModel, nil] - required :maximum_amount_adjustment, -> { Orb::Models::CreditNoteDiscountModel }, nil?: true + # @return [Orb::Models::CreditNote::MaximumAmountAdjustment, nil] + required :maximum_amount_adjustment, -> { Orb::Models::CreditNote::MaximumAmountAdjustment }, nil?: true # @!attribute memo # An optional memo supplied on the credit note. @@ -93,11 +93,11 @@ class CreditNote < Orb::BaseModel # @!attribute [r] discounts # Any discounts applied on the original invoice. # - # @return [Array, nil] - optional :discounts, -> { Orb::ArrayOf[Orb::Models::CreditNoteDiscountModel] } + # @return [Array, nil] + optional :discounts, -> { Orb::ArrayOf[Orb::Models::CreditNote::Discount] } # @!parse - # # @return [Array] + # # @return [Array] # attr_writer :discounts # @!parse @@ -108,10 +108,10 @@ class CreditNote < Orb::BaseModel # # @param created_at [Time] # # @param credit_note_number [String] # # @param credit_note_pdf [String, nil] - # # @param customer [Orb::Models::CustomerMinifiedModel] + # # @param customer [Orb::Models::CreditNote::Customer] # # @param invoice_id [String] # # @param line_items [Array] - # # @param maximum_amount_adjustment [Orb::Models::CreditNoteDiscountModel, nil] + # # @param maximum_amount_adjustment [Orb::Models::CreditNote::MaximumAmountAdjustment, nil] # # @param memo [String, nil] # # @param minimum_amount_refunded [String, nil] # # @param reason [Symbol, Orb::Models::CreditNote::Reason, nil] @@ -119,7 +119,7 @@ class CreditNote < Orb::BaseModel # # @param total [String] # # @param type [Symbol, Orb::Models::CreditNote::Type] # # @param voided_at [Time, nil] - # # @param discounts [Array] + # # @param discounts [Array] # # # def initialize( # id:, @@ -145,6 +145,26 @@ class CreditNote < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + class LineItem < Orb::BaseModel # @!attribute id # The Orb id of this resource. @@ -185,8 +205,8 @@ class LineItem < Orb::BaseModel # @!attribute tax_amounts # Any tax amounts applied onto the line item. # - # @return [Array] - required :tax_amounts, -> { Orb::ArrayOf[Orb::Models::TaxAmountModel] } + # @return [Array] + required :tax_amounts, -> { Orb::ArrayOf[Orb::Models::CreditNote::LineItem::TaxAmount] } # @!attribute [r] discounts # Any line item discounts from the invoice's line item. @@ -205,13 +225,42 @@ class LineItem < Orb::BaseModel # # @param name [String] # # @param quantity [Float, nil] # # @param subtotal [String] - # # @param tax_amounts [Array] + # # @param tax_amounts [Array] # # @param discounts [Array] # # # def initialize(id:, amount:, item_id:, name:, quantity:, subtotal:, tax_amounts:, discounts: nil, **) = super # def initialize: (Hash | Orb::BaseModel) -> void + class TaxAmount < Orb::BaseModel + # @!attribute amount + # The amount of additional tax incurred by this tax rate. + # + # @return [String] + required :amount, String + + # @!attribute tax_rate_description + # The human-readable description of the applied tax rate. + # + # @return [String] + required :tax_rate_description, String + + # @!attribute tax_rate_percentage + # The tax rate percentage, out of 100. + # + # @return [String, nil] + required :tax_rate_percentage, String, nil?: true + + # @!parse + # # @param amount [String] + # # @param tax_rate_description [String] + # # @param tax_rate_percentage [String, nil] + # # + # def initialize(amount:, tax_rate_description:, tax_rate_percentage:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + class Discount < Orb::BaseModel # @!attribute id # @@ -297,6 +346,88 @@ class DiscountType < Orb::Enum end end + class MaximumAmountAdjustment < Orb::BaseModel + # @!attribute amount_applied + # + # @return [String] + required :amount_applied, String + + # @!attribute discount_type + # + # @return [Symbol, Orb::Models::CreditNote::MaximumAmountAdjustment::DiscountType] + required :discount_type, enum: -> { Orb::Models::CreditNote::MaximumAmountAdjustment::DiscountType } + + # @!attribute percentage_discount + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute applies_to_prices + # + # @return [Array, nil] + optional :applies_to_prices, + -> { Orb::ArrayOf[Orb::Models::CreditNote::MaximumAmountAdjustment::AppliesToPrice] }, + nil?: true + + # @!attribute reason + # + # @return [String, nil] + optional :reason, String, nil?: true + + # @!parse + # # The maximum amount applied on the original invoice + # # + # # @param amount_applied [String] + # # @param discount_type [Symbol, Orb::Models::CreditNote::MaximumAmountAdjustment::DiscountType] + # # @param percentage_discount [Float] + # # @param applies_to_prices [Array, nil] + # # @param reason [String, nil] + # # + # def initialize(amount_applied:, discount_type:, percentage_discount:, applies_to_prices: nil, reason: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case discount_type + # in :percentage + # # ... + # end + # ``` + class DiscountType < Orb::Enum + PERCENTAGE = :percentage + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class AppliesToPrice < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + # @abstract # # @example @@ -348,6 +479,86 @@ class Type < Orb::Enum # # # def self.values; end end + + class Discount < Orb::BaseModel + # @!attribute amount_applied + # + # @return [String] + required :amount_applied, String + + # @!attribute discount_type + # + # @return [Symbol, Orb::Models::CreditNote::Discount::DiscountType] + required :discount_type, enum: -> { Orb::Models::CreditNote::Discount::DiscountType } + + # @!attribute percentage_discount + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute applies_to_prices + # + # @return [Array, nil] + optional :applies_to_prices, + -> { Orb::ArrayOf[Orb::Models::CreditNote::Discount::AppliesToPrice] }, + nil?: true + + # @!attribute reason + # + # @return [String, nil] + optional :reason, String, nil?: true + + # @!parse + # # @param amount_applied [String] + # # @param discount_type [Symbol, Orb::Models::CreditNote::Discount::DiscountType] + # # @param percentage_discount [Float] + # # @param applies_to_prices [Array, nil] + # # @param reason [String, nil] + # # + # def initialize(amount_applied:, discount_type:, percentage_discount:, applies_to_prices: nil, reason: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case discount_type + # in :percentage + # # ... + # end + # ``` + class DiscountType < Orb::Enum + PERCENTAGE = :percentage + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class AppliesToPrice < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end end end end diff --git a/lib/orb/models/credit_note_discount_model.rb b/lib/orb/models/credit_note_discount_model.rb deleted file mode 100644 index 11605403..00000000 --- a/lib/orb/models/credit_note_discount_model.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class CreditNoteDiscountModel < Orb::BaseModel - # @!attribute amount_applied - # - # @return [String] - required :amount_applied, String - - # @!attribute discount_type - # - # @return [Symbol, Orb::Models::CreditNoteDiscountModel::DiscountType] - required :discount_type, enum: -> { Orb::Models::CreditNoteDiscountModel::DiscountType } - - # @!attribute percentage_discount - # - # @return [Float] - required :percentage_discount, Float - - # @!attribute applies_to_prices - # - # @return [Array, nil] - optional :applies_to_prices, - -> { Orb::ArrayOf[Orb::Models::CreditNoteDiscountModel::AppliesToPrice] }, - nil?: true - - # @!attribute reason - # - # @return [String, nil] - optional :reason, String, nil?: true - - # @!parse - # # @param amount_applied [String] - # # @param discount_type [Symbol, Orb::Models::CreditNoteDiscountModel::DiscountType] - # # @param percentage_discount [Float] - # # @param applies_to_prices [Array, nil] - # # @param reason [String, nil] - # # - # def initialize(amount_applied:, discount_type:, percentage_discount:, applies_to_prices: nil, reason: nil, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case discount_type - # in :percentage - # # ... - # end - # ``` - class DiscountType < Orb::Enum - PERCENTAGE = :percentage - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - class AppliesToPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!parse - # # @param id [String] - # # @param name [String] - # # - # def initialize(id:, name:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end - end -end diff --git a/lib/orb/models/credit_note_model.rb b/lib/orb/models/credit_note_model.rb deleted file mode 100644 index 5b153c9d..00000000 --- a/lib/orb/models/credit_note_model.rb +++ /dev/null @@ -1,353 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class CreditNoteModel < Orb::BaseModel - # @!attribute id - # The Orb id of this credit note. - # - # @return [String] - required :id, String - - # @!attribute created_at - # The creation time of the resource in Orb. - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_note_number - # The unique identifier for credit notes. - # - # @return [String] - required :credit_note_number, String - - # @!attribute credit_note_pdf - # A URL to a PDF of the credit note. - # - # @return [String, nil] - required :credit_note_pdf, String, nil?: true - - # @!attribute customer - # - # @return [Orb::Models::CustomerMinifiedModel] - required :customer, -> { Orb::Models::CustomerMinifiedModel } - - # @!attribute invoice_id - # The id of the invoice resource that this credit note is applied to. - # - # @return [String] - required :invoice_id, String - - # @!attribute line_items - # All of the line items associated with this credit note. - # - # @return [Array] - required :line_items, -> { Orb::ArrayOf[Orb::Models::CreditNoteModel::LineItem] } - - # @!attribute maximum_amount_adjustment - # The maximum amount applied on the original invoice - # - # @return [Orb::Models::CreditNoteDiscountModel, nil] - required :maximum_amount_adjustment, -> { Orb::Models::CreditNoteDiscountModel }, nil?: true - - # @!attribute memo - # An optional memo supplied on the credit note. - # - # @return [String, nil] - required :memo, String, nil?: true - - # @!attribute minimum_amount_refunded - # Any credited amount from the applied minimum on the invoice. - # - # @return [String, nil] - required :minimum_amount_refunded, String, nil?: true - - # @!attribute reason - # - # @return [Symbol, Orb::Models::CreditNoteModel::Reason, nil] - required :reason, enum: -> { Orb::Models::CreditNoteModel::Reason }, nil?: true - - # @!attribute subtotal - # The total prior to any creditable invoice-level discounts or minimums. - # - # @return [String] - required :subtotal, String - - # @!attribute total - # The total including creditable invoice-level discounts or minimums, and tax. - # - # @return [String] - required :total, String - - # @!attribute type - # - # @return [Symbol, Orb::Models::CreditNoteModel::Type] - required :type, enum: -> { Orb::Models::CreditNoteModel::Type } - - # @!attribute voided_at - # The time at which the credit note was voided in Orb, if applicable. - # - # @return [Time, nil] - required :voided_at, Time, nil?: true - - # @!attribute [r] discounts - # Any discounts applied on the original invoice. - # - # @return [Array, nil] - optional :discounts, -> { Orb::ArrayOf[Orb::Models::CreditNoteDiscountModel] } - - # @!parse - # # @return [Array] - # attr_writer :discounts - - # @!parse - # # The [Credit Note](/invoicing/credit-notes) resource represents a credit that has - # # been applied to a particular invoice. - # # - # # @param id [String] - # # @param created_at [Time] - # # @param credit_note_number [String] - # # @param credit_note_pdf [String, nil] - # # @param customer [Orb::Models::CustomerMinifiedModel] - # # @param invoice_id [String] - # # @param line_items [Array] - # # @param maximum_amount_adjustment [Orb::Models::CreditNoteDiscountModel, nil] - # # @param memo [String, nil] - # # @param minimum_amount_refunded [String, nil] - # # @param reason [Symbol, Orb::Models::CreditNoteModel::Reason, nil] - # # @param subtotal [String] - # # @param total [String] - # # @param type [Symbol, Orb::Models::CreditNoteModel::Type] - # # @param voided_at [Time, nil] - # # @param discounts [Array] - # # - # def initialize( - # id:, - # created_at:, - # credit_note_number:, - # credit_note_pdf:, - # customer:, - # invoice_id:, - # line_items:, - # maximum_amount_adjustment:, - # memo:, - # minimum_amount_refunded:, - # reason:, - # subtotal:, - # total:, - # type:, - # voided_at:, - # discounts: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - class LineItem < Orb::BaseModel - # @!attribute id - # The Orb id of this resource. - # - # @return [String] - required :id, String - - # @!attribute amount - # The amount of the line item, including any line item minimums and discounts. - # - # @return [String] - required :amount, String - - # @!attribute item_id - # The id of the item associated with this line item. - # - # @return [String] - required :item_id, String - - # @!attribute name - # The name of the corresponding invoice line item. - # - # @return [String] - required :name, String - - # @!attribute quantity - # An optional quantity credited. - # - # @return [Float, nil] - required :quantity, Float, nil?: true - - # @!attribute subtotal - # The amount of the line item, excluding any line item minimums and discounts. - # - # @return [String] - required :subtotal, String - - # @!attribute tax_amounts - # Any tax amounts applied onto the line item. - # - # @return [Array] - required :tax_amounts, -> { Orb::ArrayOf[Orb::Models::TaxAmountModel] } - - # @!attribute [r] discounts - # Any line item discounts from the invoice's line item. - # - # @return [Array, nil] - optional :discounts, -> { Orb::ArrayOf[Orb::Models::CreditNoteModel::LineItem::Discount] } - - # @!parse - # # @return [Array] - # attr_writer :discounts - - # @!parse - # # @param id [String] - # # @param amount [String] - # # @param item_id [String] - # # @param name [String] - # # @param quantity [Float, nil] - # # @param subtotal [String] - # # @param tax_amounts [Array] - # # @param discounts [Array] - # # - # def initialize(id:, amount:, item_id:, name:, quantity:, subtotal:, tax_amounts:, discounts: nil, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - class Discount < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute amount_applied - # - # @return [String] - required :amount_applied, String - - # @!attribute applies_to_price_ids - # - # @return [Array] - required :applies_to_price_ids, Orb::ArrayOf[String] - - # @!attribute discount_type - # - # @return [Symbol, Orb::Models::CreditNoteModel::LineItem::Discount::DiscountType] - required :discount_type, enum: -> { Orb::Models::CreditNoteModel::LineItem::Discount::DiscountType } - - # @!attribute percentage_discount - # - # @return [Float] - required :percentage_discount, Float - - # @!attribute amount_discount - # - # @return [String, nil] - optional :amount_discount, String, nil?: true - - # @!attribute reason - # - # @return [String, nil] - optional :reason, String, nil?: true - - # @!parse - # # @param id [String] - # # @param amount_applied [String] - # # @param applies_to_price_ids [Array] - # # @param discount_type [Symbol, Orb::Models::CreditNoteModel::LineItem::Discount::DiscountType] - # # @param percentage_discount [Float] - # # @param amount_discount [String, nil] - # # @param reason [String, nil] - # # - # def initialize( - # id:, - # amount_applied:, - # applies_to_price_ids:, - # discount_type:, - # percentage_discount:, - # amount_discount: nil, - # reason: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case discount_type - # in :percentage - # # ... - # in :amount - # # ... - # end - # ``` - class DiscountType < Orb::Enum - PERCENTAGE = :percentage - AMOUNT = :amount - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end - - # @abstract - # - # @example - # ```ruby - # case reason - # in :Duplicate - # # ... - # in :Fraudulent - # # ... - # in :"Order change" - # # ... - # in :"Product unsatisfactory" - # # ... - # end - # ``` - class Reason < Orb::Enum - DUPLICATE = :Duplicate - FRAUDULENT = :Fraudulent - ORDER_CHANGE = :"Order change" - PRODUCT_UNSATISFACTORY = :"Product unsatisfactory" - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case type - # in :refund - # # ... - # in :adjustment - # # ... - # end - # ``` - class Type < Orb::Enum - REFUND = :refund - ADJUSTMENT = :adjustment - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end -end diff --git a/lib/orb/models/credit_note_summary_model.rb b/lib/orb/models/credit_note_summary_model.rb deleted file mode 100644 index 132a3aa5..00000000 --- a/lib/orb/models/credit_note_summary_model.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class CreditNoteSummaryModel < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute credit_note_number - # - # @return [String] - required :credit_note_number, String - - # @!attribute memo - # An optional memo supplied on the credit note. - # - # @return [String, nil] - required :memo, String, nil?: true - - # @!attribute reason - # - # @return [String] - required :reason, String - - # @!attribute total - # - # @return [String] - required :total, String - - # @!attribute type - # - # @return [String] - required :type, String - - # @!attribute voided_at - # If the credit note has a status of `void`, this gives a timestamp when the - # credit note was voided. - # - # @return [Time, nil] - required :voided_at, Time, nil?: true - - # @!parse - # # @param id [String] - # # @param credit_note_number [String] - # # @param memo [String, nil] - # # @param reason [String] - # # @param total [String] - # # @param type [String] - # # @param voided_at [Time, nil] - # # - # def initialize(id:, credit_note_number:, memo:, reason:, total:, type:, voided_at:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/custom_rating_function_config_model.rb b/lib/orb/models/custom_rating_function_config_model.rb deleted file mode 100644 index d2b97c83..00000000 --- a/lib/orb/models/custom_rating_function_config_model.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - CustomRatingFunctionConfigModel = Orb::HashOf[Orb::Unknown] - end -end diff --git a/lib/orb/models/customer.rb b/lib/orb/models/customer.rb index 659bb312..29057077 100644 --- a/lib/orb/models/customer.rb +++ b/lib/orb/models/customer.rb @@ -26,8 +26,8 @@ class Customer < Orb::BaseModel # @!attribute billing_address # - # @return [Orb::Models::AddressModel, nil] - required :billing_address, -> { Orb::Models::AddressModel }, nil?: true + # @return [Orb::Models::Customer::BillingAddress, nil] + required :billing_address, -> { Orb::Models::Customer::BillingAddress }, nil?: true # @!attribute created_at # @@ -108,8 +108,8 @@ class Customer < Orb::BaseModel # @!attribute shipping_address # - # @return [Orb::Models::AddressModel, nil] - required :shipping_address, -> { Orb::Models::AddressModel }, nil?: true + # @return [Orb::Models::Customer::ShippingAddress, nil] + required :shipping_address, -> { Orb::Models::Customer::ShippingAddress }, nil?: true # @!attribute tax_id # Tax IDs are commonly required to be displayed on customer invoices, which are @@ -218,8 +218,8 @@ class Customer < Orb::BaseModel # | Venezuela | `ve_rif` | Venezuelan RIF Number | # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | # - # @return [Orb::Models::CustomerTaxIDModel, nil] - required :tax_id, -> { Orb::Models::CustomerTaxIDModel }, nil?: true + # @return [Orb::Models::Customer::TaxID, nil] + required :tax_id, -> { Orb::Models::Customer::TaxID }, nil?: true # @!attribute timezone # A timezone identifier from the IANA timezone database, such as @@ -265,7 +265,7 @@ class Customer < Orb::BaseModel # # @param additional_emails [Array] # # @param auto_collection [Boolean] # # @param balance [String] - # # @param billing_address [Orb::Models::AddressModel, nil] + # # @param billing_address [Orb::Models::Customer::BillingAddress, nil] # # @param created_at [Time] # # @param currency [String, nil] # # @param email [String] @@ -278,8 +278,8 @@ class Customer < Orb::BaseModel # # @param payment_provider [Symbol, Orb::Models::Customer::PaymentProvider, nil] # # @param payment_provider_id [String, nil] # # @param portal_url [String, nil] - # # @param shipping_address [Orb::Models::AddressModel, nil] - # # @param tax_id [Orb::Models::CustomerTaxIDModel, nil] + # # @param shipping_address [Orb::Models::Customer::ShippingAddress, nil] + # # @param tax_id [Orb::Models::Customer::TaxID, nil] # # @param timezone [String] # # @param accounting_sync_configuration [Orb::Models::Customer::AccountingSyncConfiguration, nil] # # @param reporting_configuration [Orb::Models::Customer::ReportingConfiguration, nil] @@ -314,26 +314,110 @@ class Customer < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillingAddress < Orb::BaseModel + # @!attribute city + # + # @return [String, nil] + required :city, String, nil?: true + + # @!attribute country + # + # @return [String, nil] + required :country, String, nil?: true + + # @!attribute line1 + # + # @return [String, nil] + required :line1, String, nil?: true + + # @!attribute line2 + # + # @return [String, nil] + required :line2, String, nil?: true + + # @!attribute postal_code + # + # @return [String, nil] + required :postal_code, String, nil?: true + + # @!attribute state + # + # @return [String, nil] + required :state, String, nil?: true + + # @!parse + # # @param city [String, nil] + # # @param country [String, nil] + # # @param line1 [String, nil] + # # @param line2 [String, nil] + # # @param postal_code [String, nil] + # # @param state [String, nil] + # # + # def initialize(city:, country:, line1:, line2:, postal_code:, state:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + class Hierarchy < Orb::BaseModel # @!attribute children # - # @return [Array] - required :children, -> { Orb::ArrayOf[Orb::Models::CustomerMinifiedModel] } + # @return [Array] + required :children, -> { Orb::ArrayOf[Orb::Models::Customer::Hierarchy::Child] } # @!attribute parent # - # @return [Orb::Models::CustomerMinifiedModel, nil] - required :parent, -> { Orb::Models::CustomerMinifiedModel }, nil?: true + # @return [Orb::Models::Customer::Hierarchy::Parent, nil] + required :parent, -> { Orb::Models::Customer::Hierarchy::Parent }, nil?: true # @!parse # # The hierarchical relationships for this customer. # # - # # @param children [Array] - # # @param parent [Orb::Models::CustomerMinifiedModel, nil] + # # @param children [Array] + # # @param parent [Orb::Models::Customer::Hierarchy::Parent, nil] # # # def initialize(children:, parent:, **) = super # def initialize: (Hash | Orb::BaseModel) -> void + + class Child < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Parent < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end # @abstract @@ -372,6 +456,389 @@ class PaymentProvider < Orb::Enum # def self.values; end end + class ShippingAddress < Orb::BaseModel + # @!attribute city + # + # @return [String, nil] + required :city, String, nil?: true + + # @!attribute country + # + # @return [String, nil] + required :country, String, nil?: true + + # @!attribute line1 + # + # @return [String, nil] + required :line1, String, nil?: true + + # @!attribute line2 + # + # @return [String, nil] + required :line2, String, nil?: true + + # @!attribute postal_code + # + # @return [String, nil] + required :postal_code, String, nil?: true + + # @!attribute state + # + # @return [String, nil] + required :state, String, nil?: true + + # @!parse + # # @param city [String, nil] + # # @param country [String, nil] + # # @param line1 [String, nil] + # # @param line2 [String, nil] + # # @param postal_code [String, nil] + # # @param state [String, nil] + # # + # def initialize(city:, country:, line1:, line2:, postal_code:, state:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class TaxID < Orb::BaseModel + # @!attribute country + # + # @return [Symbol, Orb::Models::Customer::TaxID::Country] + required :country, enum: -> { Orb::Models::Customer::TaxID::Country } + + # @!attribute type + # + # @return [Symbol, Orb::Models::Customer::TaxID::Type] + required :type, enum: -> { Orb::Models::Customer::TaxID::Type } + + # @!attribute value + # + # @return [String] + required :value, String + + # @!parse + # # Tax IDs are commonly required to be displayed on customer invoices, which are + # # added to the headers of invoices. + # # + # # ### Supported Tax ID Countries and Types + # # + # # | Country | Type | Description | + # # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | + # # | Andorra | `ad_nrt` | Andorran NRT Number | + # # | Argentina | `ar_cuit` | Argentinian Tax ID Number | + # # | Australia | `au_abn` | Australian Business Number (AU ABN) | + # # | Australia | `au_arn` | Australian Taxation Office Reference Number | + # # | Austria | `eu_vat` | European VAT Number | + # # | Bahrain | `bh_vat` | Bahraini VAT Number | + # # | Belgium | `eu_vat` | European VAT Number | + # # | Bolivia | `bo_tin` | Bolivian Tax ID | + # # | Brazil | `br_cnpj` | Brazilian CNPJ Number | + # # | Brazil | `br_cpf` | Brazilian CPF Number | + # # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | + # # | Bulgaria | `eu_vat` | European VAT Number | + # # | Canada | `ca_bn` | Canadian BN | + # # | Canada | `ca_gst_hst` | Canadian GST/HST Number | + # # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | + # # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | + # # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | + # # | Canada | `ca_qst` | Canadian QST Number (Québec) | + # # | Chile | `cl_tin` | Chilean TIN | + # # | China | `cn_tin` | Chinese Tax ID | + # # | Colombia | `co_nit` | Colombian NIT Number | + # # | Costa Rica | `cr_tin` | Costa Rican Tax ID | + # # | Croatia | `eu_vat` | European VAT Number | + # # | Cyprus | `eu_vat` | European VAT Number | + # # | Czech Republic | `eu_vat` | European VAT Number | + # # | Denmark | `eu_vat` | European VAT Number | + # # | Dominican Republic | `do_rcn` | Dominican RCN Number | + # # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | + # # | Egypt | `eg_tin` | Egyptian Tax Identification Number | + # # | El Salvador | `sv_nit` | El Salvadorian NIT Number | + # # | Estonia | `eu_vat` | European VAT Number | + # # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # # | Finland | `eu_vat` | European VAT Number | + # # | France | `eu_vat` | European VAT Number | + # # | Georgia | `ge_vat` | Georgian VAT | + # # | Germany | `eu_vat` | European VAT Number | + # # | Greece | `eu_vat` | European VAT Number | + # # | Hong Kong | `hk_br` | Hong Kong BR Number | + # # | Hungary | `eu_vat` | European VAT Number | + # # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | + # # | Iceland | `is_vat` | Icelandic VAT | + # # | India | `in_gst` | Indian GST Number | + # # | Indonesia | `id_npwp` | Indonesian NPWP Number | + # # | Ireland | `eu_vat` | European VAT Number | + # # | Israel | `il_vat` | Israel VAT | + # # | Italy | `eu_vat` | European VAT Number | + # # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | + # # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | + # # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | + # # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | + # # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | + # # | Latvia | `eu_vat` | European VAT Number | + # # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | + # # | Lithuania | `eu_vat` | European VAT Number | + # # | Luxembourg | `eu_vat` | European VAT Number | + # # | Malaysia | `my_frp` | Malaysian FRP Number | + # # | Malaysia | `my_itn` | Malaysian ITN | + # # | Malaysia | `my_sst` | Malaysian SST Number | + # # | Malta | `eu_vat ` | European VAT Number | + # # | Mexico | `mx_rfc` | Mexican RFC Number | + # # | Netherlands | `eu_vat` | European VAT Number | + # # | New Zealand | `nz_gst` | New Zealand GST Number | + # # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | + # # | Norway | `no_vat` | Norwegian VAT Number | + # # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | + # # | Oman | `om_vat` | Omani VAT Number | + # # | Peru | `pe_ruc` | Peruvian RUC Number | + # # | Philippines | `ph_tin ` | Philippines Tax Identification Number | + # # | Poland | `eu_vat` | European VAT Number | + # # | Portugal | `eu_vat` | European VAT Number | + # # | Romania | `eu_vat` | European VAT Number | + # # | Romania | `ro_tin` | Romanian Tax ID Number | + # # | Russia | `ru_inn` | Russian INN | + # # | Russia | `ru_kpp` | Russian KPP | + # # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | + # # | Serbia | `rs_pib` | Serbian PIB Number | + # # | Singapore | `sg_gst` | Singaporean GST | + # # | Singapore | `sg_uen` | Singaporean UEN | + # # | Slovakia | `eu_vat` | European VAT Number | + # # | Slovenia | `eu_vat` | European VAT Number | + # # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | + # # | South Africa | `za_vat` | South African VAT Number | + # # | South Korea | `kr_brn` | Korean BRN | + # # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | + # # | Spain | `eu_vat` | European VAT Number | + # # | Sweden | `eu_vat` | European VAT Number | + # # | Switzerland | `ch_vat` | Switzerland VAT Number | + # # | Taiwan | `tw_vat` | Taiwanese VAT | + # # | Thailand | `th_vat` | Thai VAT | + # # | Turkey | `tr_tin` | Turkish Tax Identification Number | + # # | Ukraine | `ua_vat` | Ukrainian VAT | + # # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | + # # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | + # # | United Kingdom | `gb_vat` | United Kingdom VAT Number | + # # | United States | `us_ein` | United States EIN | + # # | Uruguay | `uy_ruc` | Uruguayan RUC Number | + # # | Venezuela | `ve_rif` | Venezuelan RIF Number | + # # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | + # # + # # @param country [Symbol, Orb::Models::Customer::TaxID::Country] + # # @param type [Symbol, Orb::Models::Customer::TaxID::Type] + # # @param value [String] + # # + # def initialize(country:, type:, value:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case country + # in :AD + # # ... + # in :AE + # # ... + # in :AR + # # ... + # in :AT + # # ... + # in :AU + # # ... + # in ... + # #... + # end + # ``` + class Country < Orb::Enum + AD = :AD + AE = :AE + AR = :AR + AT = :AT + AU = :AU + BE = :BE + BG = :BG + BH = :BH + BO = :BO + BR = :BR + CA = :CA + CH = :CH + CL = :CL + CN = :CN + CO = :CO + CR = :CR + CY = :CY + CZ = :CZ + DE = :DE + DK = :DK + EE = :EE + DO = :DO + EC = :EC + EG = :EG + ES = :ES + EU = :EU + FI = :FI + FR = :FR + GB = :GB + GE = :GE + GR = :GR + HK = :HK + HR = :HR + HU = :HU + ID = :ID + IE = :IE + IL = :IL + IN = :IN + IS = :IS + IT = :IT + JP = :JP + KE = :KE + KR = :KR + KZ = :KZ + LI = :LI + LT = :LT + LU = :LU + LV = :LV + MT = :MT + MX = :MX + MY = :MY + NG = :NG + NL = :NL + NO = :NO + NZ = :NZ + OM = :OM + PE = :PE + PH = :PH + PL = :PL + PT = :PT + RO = :RO + RS = :RS + RU = :RU + SA = :SA + SE = :SE + SG = :SG + SI = :SI + SK = :SK + SV = :SV + TH = :TH + TR = :TR + TW = :TW + UA = :UA + US = :US + UY = :UY + VE = :VE + VN = :VN + ZA = :ZA + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + # @abstract + # + # @example + # ```ruby + # case type + # in :ad_nrt + # # ... + # in :ae_trn + # # ... + # in :ar_cuit + # # ... + # in :eu_vat + # # ... + # in :au_abn + # # ... + # in ... + # #... + # end + # ``` + class Type < Orb::Enum + AD_NRT = :ad_nrt + AE_TRN = :ae_trn + AR_CUIT = :ar_cuit + EU_VAT = :eu_vat + AU_ABN = :au_abn + AU_ARN = :au_arn + BG_UIC = :bg_uic + BH_VAT = :bh_vat + BO_TIN = :bo_tin + BR_CNPJ = :br_cnpj + BR_CPF = :br_cpf + CA_BN = :ca_bn + CA_GST_HST = :ca_gst_hst + CA_PST_BC = :ca_pst_bc + CA_PST_MB = :ca_pst_mb + CA_PST_SK = :ca_pst_sk + CA_QST = :ca_qst + CH_VAT = :ch_vat + CL_TIN = :cl_tin + CN_TIN = :cn_tin + CO_NIT = :co_nit + CR_TIN = :cr_tin + DO_RCN = :do_rcn + EC_RUC = :ec_ruc + EG_TIN = :eg_tin + ES_CIF = :es_cif + EU_OSS_VAT = :eu_oss_vat + GB_VAT = :gb_vat + GE_VAT = :ge_vat + HK_BR = :hk_br + HU_TIN = :hu_tin + ID_NPWP = :id_npwp + IL_VAT = :il_vat + IN_GST = :in_gst + IS_VAT = :is_vat + JP_CN = :jp_cn + JP_RN = :jp_rn + JP_TRN = :jp_trn + KE_PIN = :ke_pin + KR_BRN = :kr_brn + KZ_BIN = :kz_bin + LI_UID = :li_uid + MX_RFC = :mx_rfc + MY_FRP = :my_frp + MY_ITN = :my_itn + MY_SST = :my_sst + NG_TIN = :ng_tin + NO_VAT = :no_vat + NO_VOEC = :no_voec + NZ_GST = :nz_gst + OM_VAT = :om_vat + PE_RUC = :pe_ruc + PH_TIN = :ph_tin + RO_TIN = :ro_tin + RS_PIB = :rs_pib + RU_INN = :ru_inn + RU_KPP = :ru_kpp + SA_VAT = :sa_vat + SG_GST = :sg_gst + SG_UEN = :sg_uen + SI_TIN = :si_tin + SV_NIT = :sv_nit + TH_VAT = :th_vat + TR_TIN = :tr_tin + TW_VAT = :tw_vat + UA_VAT = :ua_vat + US_EIN = :us_ein + UY_RUC = :uy_ruc + VE_RIF = :ve_rif + VN_TIN = :vn_tin + ZA_VAT = :za_vat + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + class AccountingSyncConfiguration < Orb::BaseModel # @!attribute accounting_providers # diff --git a/lib/orb/models/customer_balance_transaction_model.rb b/lib/orb/models/customer_balance_transaction_model.rb deleted file mode 100644 index 1ad059b8..00000000 --- a/lib/orb/models/customer_balance_transaction_model.rb +++ /dev/null @@ -1,186 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class CustomerBalanceTransactionModel < Orb::BaseModel - # @!attribute id - # A unique id for this transaction. - # - # @return [String] - required :id, String - - # @!attribute action - # - # @return [Symbol, Orb::Models::CustomerBalanceTransactionModel::Action] - required :action, enum: -> { Orb::Models::CustomerBalanceTransactionModel::Action } - - # @!attribute amount - # The value of the amount changed in the transaction. - # - # @return [String] - required :amount, String - - # @!attribute created_at - # The creation time of this transaction. - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_note - # - # @return [Orb::Models::CustomerBalanceTransactionModel::CreditNote, nil] - required :credit_note, -> { Orb::Models::CustomerBalanceTransactionModel::CreditNote }, nil?: true - - # @!attribute description - # An optional description provided for manual customer balance adjustments. - # - # @return [String, nil] - required :description, String, nil?: true - - # @!attribute ending_balance - # The new value of the customer's balance prior to the transaction, in the - # customer's currency. - # - # @return [String] - required :ending_balance, String - - # @!attribute invoice - # - # @return [Orb::Models::CustomerBalanceTransactionModel::Invoice, nil] - required :invoice, -> { Orb::Models::CustomerBalanceTransactionModel::Invoice }, nil?: true - - # @!attribute starting_balance - # The original value of the customer's balance prior to the transaction, in the - # customer's currency. - # - # @return [String] - required :starting_balance, String - - # @!attribute type - # - # @return [Symbol, Orb::Models::CustomerBalanceTransactionModel::Type] - required :type, enum: -> { Orb::Models::CustomerBalanceTransactionModel::Type } - - # @!parse - # # @param id [String] - # # @param action [Symbol, Orb::Models::CustomerBalanceTransactionModel::Action] - # # @param amount [String] - # # @param created_at [Time] - # # @param credit_note [Orb::Models::CustomerBalanceTransactionModel::CreditNote, nil] - # # @param description [String, nil] - # # @param ending_balance [String] - # # @param invoice [Orb::Models::CustomerBalanceTransactionModel::Invoice, nil] - # # @param starting_balance [String] - # # @param type [Symbol, Orb::Models::CustomerBalanceTransactionModel::Type] - # # - # def initialize( - # id:, - # action:, - # amount:, - # created_at:, - # credit_note:, - # description:, - # ending_balance:, - # invoice:, - # starting_balance:, - # type:, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case action - # in :applied_to_invoice - # # ... - # in :manual_adjustment - # # ... - # in :prorated_refund - # # ... - # in :revert_prorated_refund - # # ... - # in :return_from_voiding - # # ... - # in ... - # #... - # end - # ``` - class Action < Orb::Enum - APPLIED_TO_INVOICE = :applied_to_invoice - MANUAL_ADJUSTMENT = :manual_adjustment - PRORATED_REFUND = :prorated_refund - REVERT_PRORATED_REFUND = :revert_prorated_refund - RETURN_FROM_VOIDING = :return_from_voiding - CREDIT_NOTE_APPLIED = :credit_note_applied - CREDIT_NOTE_VOIDED = :credit_note_voided - OVERPAYMENT_REFUND = :overpayment_refund - EXTERNAL_PAYMENT = :external_payment - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - class CreditNote < Orb::BaseModel - # @!attribute id - # The id of the Credit note - # - # @return [String] - required :id, String - - # @!parse - # # @param id [String] - # # - # def initialize(id:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - - class Invoice < Orb::BaseModel - # @!attribute id - # The Invoice id - # - # @return [String] - required :id, String - - # @!parse - # # @param id [String] - # # - # def initialize(id:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - - # @abstract - # - # @example - # ```ruby - # case type - # in :increment - # # ... - # in :decrement - # # ... - # end - # ``` - class Type < Orb::Enum - INCREMENT = :increment - DECREMENT = :decrement - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end -end diff --git a/lib/orb/models/customer_costs_model.rb b/lib/orb/models/customer_costs_model.rb deleted file mode 100644 index 45036641..00000000 --- a/lib/orb/models/customer_costs_model.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class CustomerCostsModel < Orb::BaseModel - # @!attribute data - # - # @return [Array] - required :data, -> { Orb::ArrayOf[Orb::Models::AggregatedCostModel] } - - # @!parse - # # @param data [Array] - # # - # def initialize(data:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/customer_create_params.rb b/lib/orb/models/customer_create_params.rb index 15e8570f..5e08d3ee 100644 --- a/lib/orb/models/customer_create_params.rb +++ b/lib/orb/models/customer_create_params.rb @@ -23,9 +23,9 @@ class CustomerCreateParams < Orb::BaseModel # @!attribute accounting_sync_configuration # - # @return [Orb::Models::NewAccountingSyncConfigurationModel, nil] + # @return [Orb::Models::CustomerCreateParams::AccountingSyncConfiguration, nil] optional :accounting_sync_configuration, - -> { Orb::Models::NewAccountingSyncConfigurationModel }, + -> { Orb::Models::CustomerCreateParams::AccountingSyncConfiguration }, nil?: true # @!attribute additional_emails @@ -45,8 +45,8 @@ class CustomerCreateParams < Orb::BaseModel # @!attribute billing_address # - # @return [Orb::Models::AddressInputModel, nil] - optional :billing_address, -> { Orb::Models::AddressInputModel }, nil?: true + # @return [Orb::Models::CustomerCreateParams::BillingAddress, nil] + optional :billing_address, -> { Orb::Models::CustomerCreateParams::BillingAddress }, nil?: true # @!attribute currency # An ISO 4217 currency string used for the customer's invoices and balance. If not @@ -71,8 +71,8 @@ class CustomerCreateParams < Orb::BaseModel # @!attribute hierarchy # The hierarchical relationships for this customer. # - # @return [Orb::Models::CustomerHierarchyConfigModel, nil] - optional :hierarchy, -> { Orb::Models::CustomerHierarchyConfigModel }, nil?: true + # @return [Orb::Models::CustomerCreateParams::Hierarchy, nil] + optional :hierarchy, -> { Orb::Models::CustomerCreateParams::Hierarchy }, nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -99,18 +99,20 @@ class CustomerCreateParams < Orb::BaseModel # @!attribute reporting_configuration # - # @return [Orb::Models::NewReportingConfigurationModel, nil] - optional :reporting_configuration, -> { Orb::Models::NewReportingConfigurationModel }, nil?: true + # @return [Orb::Models::CustomerCreateParams::ReportingConfiguration, nil] + optional :reporting_configuration, + -> { Orb::Models::CustomerCreateParams::ReportingConfiguration }, + nil?: true # @!attribute shipping_address # - # @return [Orb::Models::AddressInputModel, nil] - optional :shipping_address, -> { Orb::Models::AddressInputModel }, nil?: true + # @return [Orb::Models::CustomerCreateParams::ShippingAddress, nil] + optional :shipping_address, -> { Orb::Models::CustomerCreateParams::ShippingAddress }, nil?: true # @!attribute tax_configuration # - # @return [Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration, Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration, nil] - optional :tax_configuration, union: -> { Orb::Models::NewTaxConfigurationModel }, nil?: true + # @return [Orb::Models::CustomerCreateParams::TaxConfiguration::NewAvalaraTaxConfiguration, Orb::Models::CustomerCreateParams::TaxConfiguration::NewTaxJarConfiguration, nil] + optional :tax_configuration, union: -> { Orb::Models::CustomerCreateParams::TaxConfiguration }, nil?: true # @!attribute tax_id # Tax IDs are commonly required to be displayed on customer invoices, which are @@ -219,8 +221,8 @@ class CustomerCreateParams < Orb::BaseModel # | Venezuela | `ve_rif` | Venezuelan RIF Number | # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | # - # @return [Orb::Models::CustomerTaxIDModel, nil] - optional :tax_id, -> { Orb::Models::CustomerTaxIDModel }, nil?: true + # @return [Orb::Models::CustomerCreateParams::TaxID, nil] + optional :tax_id, -> { Orb::Models::CustomerCreateParams::TaxID }, nil?: true # @!attribute timezone # A timezone identifier from the IANA timezone database, such as @@ -233,21 +235,21 @@ class CustomerCreateParams < Orb::BaseModel # @!parse # # @param email [String] # # @param name [String] - # # @param accounting_sync_configuration [Orb::Models::NewAccountingSyncConfigurationModel, nil] + # # @param accounting_sync_configuration [Orb::Models::CustomerCreateParams::AccountingSyncConfiguration, nil] # # @param additional_emails [Array, nil] # # @param auto_collection [Boolean, nil] - # # @param billing_address [Orb::Models::AddressInputModel, nil] + # # @param billing_address [Orb::Models::CustomerCreateParams::BillingAddress, nil] # # @param currency [String, nil] # # @param email_delivery [Boolean, nil] # # @param external_customer_id [String, nil] - # # @param hierarchy [Orb::Models::CustomerHierarchyConfigModel, nil] + # # @param hierarchy [Orb::Models::CustomerCreateParams::Hierarchy, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param payment_provider [Symbol, Orb::Models::CustomerCreateParams::PaymentProvider, nil] # # @param payment_provider_id [String, nil] - # # @param reporting_configuration [Orb::Models::NewReportingConfigurationModel, nil] - # # @param shipping_address [Orb::Models::AddressInputModel, nil] - # # @param tax_configuration [Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration, Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration, nil] - # # @param tax_id [Orb::Models::CustomerTaxIDModel, nil] + # # @param reporting_configuration [Orb::Models::CustomerCreateParams::ReportingConfiguration, nil] + # # @param shipping_address [Orb::Models::CustomerCreateParams::ShippingAddress, nil] + # # @param tax_configuration [Orb::Models::CustomerCreateParams::TaxConfiguration::NewAvalaraTaxConfiguration, Orb::Models::CustomerCreateParams::TaxConfiguration::NewTaxJarConfiguration, nil] + # # @param tax_id [Orb::Models::CustomerCreateParams::TaxID, nil] # # @param timezone [String, nil] # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] # # @@ -278,6 +280,122 @@ class CustomerCreateParams < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class AccountingSyncConfiguration < Orb::BaseModel + # @!attribute accounting_providers + # + # @return [Array, nil] + optional :accounting_providers, + -> { Orb::ArrayOf[Orb::Models::CustomerCreateParams::AccountingSyncConfiguration::AccountingProvider] }, + nil?: true + + # @!attribute excluded + # + # @return [Boolean, nil] + optional :excluded, Orb::BooleanModel, nil?: true + + # @!parse + # # @param accounting_providers [Array, nil] + # # @param excluded [Boolean, nil] + # # + # def initialize(accounting_providers: nil, excluded: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class AccountingProvider < Orb::BaseModel + # @!attribute external_provider_id + # + # @return [String] + required :external_provider_id, String + + # @!attribute provider_type + # + # @return [String] + required :provider_type, String + + # @!parse + # # @param external_provider_id [String] + # # @param provider_type [String] + # # + # def initialize(external_provider_id:, provider_type:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class BillingAddress < Orb::BaseModel + # @!attribute city + # + # @return [String, nil] + optional :city, String, nil?: true + + # @!attribute country + # + # @return [String, nil] + optional :country, String, nil?: true + + # @!attribute line1 + # + # @return [String, nil] + optional :line1, String, nil?: true + + # @!attribute line2 + # + # @return [String, nil] + optional :line2, String, nil?: true + + # @!attribute postal_code + # + # @return [String, nil] + optional :postal_code, String, nil?: true + + # @!attribute state + # + # @return [String, nil] + optional :state, String, nil?: true + + # @!parse + # # @param city [String, nil] + # # @param country [String, nil] + # # @param line1 [String, nil] + # # @param line2 [String, nil] + # # @param postal_code [String, nil] + # # @param state [String, nil] + # # + # def initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Hierarchy < Orb::BaseModel + # @!attribute [r] child_customer_ids + # A list of child customer IDs to add to the hierarchy. The desired child + # customers must not already be part of another hierarchy. + # + # @return [Array, nil] + optional :child_customer_ids, Orb::ArrayOf[String] + + # @!parse + # # @return [Array] + # attr_writer :child_customer_ids + + # @!attribute parent_customer_id + # The ID of the parent customer in the hierarchy. The desired parent customer must + # not be a child of another customer. + # + # @return [String, nil] + optional :parent_customer_id, String, nil?: true + + # @!parse + # # The hierarchical relationships for this customer. + # # + # # @param child_customer_ids [Array] + # # @param parent_customer_id [String, nil] + # # + # def initialize(child_customer_ids: nil, parent_customer_id: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # This is used for creating charges or invoices in an external system via Orb. @@ -313,6 +431,478 @@ class PaymentProvider < Orb::Enum # # # def self.values; end end + + class ReportingConfiguration < Orb::BaseModel + # @!attribute exempt + # + # @return [Boolean] + required :exempt, Orb::BooleanModel + + # @!parse + # # @param exempt [Boolean] + # # + # def initialize(exempt:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class ShippingAddress < Orb::BaseModel + # @!attribute city + # + # @return [String, nil] + optional :city, String, nil?: true + + # @!attribute country + # + # @return [String, nil] + optional :country, String, nil?: true + + # @!attribute line1 + # + # @return [String, nil] + optional :line1, String, nil?: true + + # @!attribute line2 + # + # @return [String, nil] + optional :line2, String, nil?: true + + # @!attribute postal_code + # + # @return [String, nil] + optional :postal_code, String, nil?: true + + # @!attribute state + # + # @return [String, nil] + optional :state, String, nil?: true + + # @!parse + # # @param city [String, nil] + # # @param country [String, nil] + # # @param line1 [String, nil] + # # @param line2 [String, nil] + # # @param postal_code [String, nil] + # # @param state [String, nil] + # # + # def initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case tax_configuration + # in {tax_provider: "avalara", tax_exempt: Orb::BooleanModel, tax_exemption_code: String} + # # Orb::Models::CustomerCreateParams::TaxConfiguration::NewAvalaraTaxConfiguration ... + # in {tax_provider: "taxjar", tax_exempt: Orb::BooleanModel} + # # Orb::Models::CustomerCreateParams::TaxConfiguration::NewTaxJarConfiguration ... + # end + # ``` + # + # @example + # ```ruby + # case tax_configuration + # in Orb::Models::CustomerCreateParams::TaxConfiguration::NewAvalaraTaxConfiguration + # # ... + # in Orb::Models::CustomerCreateParams::TaxConfiguration::NewTaxJarConfiguration + # # ... + # end + # ``` + class TaxConfiguration < Orb::Union + discriminator :tax_provider + + variant :avalara, -> { Orb::Models::CustomerCreateParams::TaxConfiguration::NewAvalaraTaxConfiguration } + + variant :taxjar, -> { Orb::Models::CustomerCreateParams::TaxConfiguration::NewTaxJarConfiguration } + + class NewAvalaraTaxConfiguration < Orb::BaseModel + # @!attribute tax_exempt + # + # @return [Boolean] + required :tax_exempt, Orb::BooleanModel + + # @!attribute tax_provider + # + # @return [Symbol, :avalara] + required :tax_provider, const: :avalara + + # @!attribute tax_exemption_code + # + # @return [String, nil] + optional :tax_exemption_code, String, nil?: true + + # @!parse + # # @param tax_exempt [Boolean] + # # @param tax_exemption_code [String, nil] + # # @param tax_provider [Symbol, :avalara] + # # + # def initialize(tax_exempt:, tax_exemption_code: nil, tax_provider: :avalara, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class NewTaxJarConfiguration < Orb::BaseModel + # @!attribute tax_exempt + # + # @return [Boolean] + required :tax_exempt, Orb::BooleanModel + + # @!attribute tax_provider + # + # @return [Symbol, :taxjar] + required :tax_provider, const: :taxjar + + # @!parse + # # @param tax_exempt [Boolean] + # # @param tax_provider [Symbol, :taxjar] + # # + # def initialize(tax_exempt:, tax_provider: :taxjar, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class TaxID < Orb::BaseModel + # @!attribute country + # + # @return [Symbol, Orb::Models::CustomerCreateParams::TaxID::Country] + required :country, enum: -> { Orb::Models::CustomerCreateParams::TaxID::Country } + + # @!attribute type + # + # @return [Symbol, Orb::Models::CustomerCreateParams::TaxID::Type] + required :type, enum: -> { Orb::Models::CustomerCreateParams::TaxID::Type } + + # @!attribute value + # + # @return [String] + required :value, String + + # @!parse + # # Tax IDs are commonly required to be displayed on customer invoices, which are + # # added to the headers of invoices. + # # + # # ### Supported Tax ID Countries and Types + # # + # # | Country | Type | Description | + # # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | + # # | Andorra | `ad_nrt` | Andorran NRT Number | + # # | Argentina | `ar_cuit` | Argentinian Tax ID Number | + # # | Australia | `au_abn` | Australian Business Number (AU ABN) | + # # | Australia | `au_arn` | Australian Taxation Office Reference Number | + # # | Austria | `eu_vat` | European VAT Number | + # # | Bahrain | `bh_vat` | Bahraini VAT Number | + # # | Belgium | `eu_vat` | European VAT Number | + # # | Bolivia | `bo_tin` | Bolivian Tax ID | + # # | Brazil | `br_cnpj` | Brazilian CNPJ Number | + # # | Brazil | `br_cpf` | Brazilian CPF Number | + # # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | + # # | Bulgaria | `eu_vat` | European VAT Number | + # # | Canada | `ca_bn` | Canadian BN | + # # | Canada | `ca_gst_hst` | Canadian GST/HST Number | + # # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | + # # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | + # # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | + # # | Canada | `ca_qst` | Canadian QST Number (Québec) | + # # | Chile | `cl_tin` | Chilean TIN | + # # | China | `cn_tin` | Chinese Tax ID | + # # | Colombia | `co_nit` | Colombian NIT Number | + # # | Costa Rica | `cr_tin` | Costa Rican Tax ID | + # # | Croatia | `eu_vat` | European VAT Number | + # # | Cyprus | `eu_vat` | European VAT Number | + # # | Czech Republic | `eu_vat` | European VAT Number | + # # | Denmark | `eu_vat` | European VAT Number | + # # | Dominican Republic | `do_rcn` | Dominican RCN Number | + # # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | + # # | Egypt | `eg_tin` | Egyptian Tax Identification Number | + # # | El Salvador | `sv_nit` | El Salvadorian NIT Number | + # # | Estonia | `eu_vat` | European VAT Number | + # # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # # | Finland | `eu_vat` | European VAT Number | + # # | France | `eu_vat` | European VAT Number | + # # | Georgia | `ge_vat` | Georgian VAT | + # # | Germany | `eu_vat` | European VAT Number | + # # | Greece | `eu_vat` | European VAT Number | + # # | Hong Kong | `hk_br` | Hong Kong BR Number | + # # | Hungary | `eu_vat` | European VAT Number | + # # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | + # # | Iceland | `is_vat` | Icelandic VAT | + # # | India | `in_gst` | Indian GST Number | + # # | Indonesia | `id_npwp` | Indonesian NPWP Number | + # # | Ireland | `eu_vat` | European VAT Number | + # # | Israel | `il_vat` | Israel VAT | + # # | Italy | `eu_vat` | European VAT Number | + # # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | + # # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | + # # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | + # # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | + # # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | + # # | Latvia | `eu_vat` | European VAT Number | + # # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | + # # | Lithuania | `eu_vat` | European VAT Number | + # # | Luxembourg | `eu_vat` | European VAT Number | + # # | Malaysia | `my_frp` | Malaysian FRP Number | + # # | Malaysia | `my_itn` | Malaysian ITN | + # # | Malaysia | `my_sst` | Malaysian SST Number | + # # | Malta | `eu_vat ` | European VAT Number | + # # | Mexico | `mx_rfc` | Mexican RFC Number | + # # | Netherlands | `eu_vat` | European VAT Number | + # # | New Zealand | `nz_gst` | New Zealand GST Number | + # # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | + # # | Norway | `no_vat` | Norwegian VAT Number | + # # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | + # # | Oman | `om_vat` | Omani VAT Number | + # # | Peru | `pe_ruc` | Peruvian RUC Number | + # # | Philippines | `ph_tin ` | Philippines Tax Identification Number | + # # | Poland | `eu_vat` | European VAT Number | + # # | Portugal | `eu_vat` | European VAT Number | + # # | Romania | `eu_vat` | European VAT Number | + # # | Romania | `ro_tin` | Romanian Tax ID Number | + # # | Russia | `ru_inn` | Russian INN | + # # | Russia | `ru_kpp` | Russian KPP | + # # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | + # # | Serbia | `rs_pib` | Serbian PIB Number | + # # | Singapore | `sg_gst` | Singaporean GST | + # # | Singapore | `sg_uen` | Singaporean UEN | + # # | Slovakia | `eu_vat` | European VAT Number | + # # | Slovenia | `eu_vat` | European VAT Number | + # # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | + # # | South Africa | `za_vat` | South African VAT Number | + # # | South Korea | `kr_brn` | Korean BRN | + # # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | + # # | Spain | `eu_vat` | European VAT Number | + # # | Sweden | `eu_vat` | European VAT Number | + # # | Switzerland | `ch_vat` | Switzerland VAT Number | + # # | Taiwan | `tw_vat` | Taiwanese VAT | + # # | Thailand | `th_vat` | Thai VAT | + # # | Turkey | `tr_tin` | Turkish Tax Identification Number | + # # | Ukraine | `ua_vat` | Ukrainian VAT | + # # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | + # # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | + # # | United Kingdom | `gb_vat` | United Kingdom VAT Number | + # # | United States | `us_ein` | United States EIN | + # # | Uruguay | `uy_ruc` | Uruguayan RUC Number | + # # | Venezuela | `ve_rif` | Venezuelan RIF Number | + # # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | + # # + # # @param country [Symbol, Orb::Models::CustomerCreateParams::TaxID::Country] + # # @param type [Symbol, Orb::Models::CustomerCreateParams::TaxID::Type] + # # @param value [String] + # # + # def initialize(country:, type:, value:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case country + # in :AD + # # ... + # in :AE + # # ... + # in :AR + # # ... + # in :AT + # # ... + # in :AU + # # ... + # in ... + # #... + # end + # ``` + class Country < Orb::Enum + AD = :AD + AE = :AE + AR = :AR + AT = :AT + AU = :AU + BE = :BE + BG = :BG + BH = :BH + BO = :BO + BR = :BR + CA = :CA + CH = :CH + CL = :CL + CN = :CN + CO = :CO + CR = :CR + CY = :CY + CZ = :CZ + DE = :DE + DK = :DK + EE = :EE + DO = :DO + EC = :EC + EG = :EG + ES = :ES + EU = :EU + FI = :FI + FR = :FR + GB = :GB + GE = :GE + GR = :GR + HK = :HK + HR = :HR + HU = :HU + ID = :ID + IE = :IE + IL = :IL + IN = :IN + IS = :IS + IT = :IT + JP = :JP + KE = :KE + KR = :KR + KZ = :KZ + LI = :LI + LT = :LT + LU = :LU + LV = :LV + MT = :MT + MX = :MX + MY = :MY + NG = :NG + NL = :NL + NO = :NO + NZ = :NZ + OM = :OM + PE = :PE + PH = :PH + PL = :PL + PT = :PT + RO = :RO + RS = :RS + RU = :RU + SA = :SA + SE = :SE + SG = :SG + SI = :SI + SK = :SK + SV = :SV + TH = :TH + TR = :TR + TW = :TW + UA = :UA + US = :US + UY = :UY + VE = :VE + VN = :VN + ZA = :ZA + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + # @abstract + # + # @example + # ```ruby + # case type + # in :ad_nrt + # # ... + # in :ae_trn + # # ... + # in :ar_cuit + # # ... + # in :eu_vat + # # ... + # in :au_abn + # # ... + # in ... + # #... + # end + # ``` + class Type < Orb::Enum + AD_NRT = :ad_nrt + AE_TRN = :ae_trn + AR_CUIT = :ar_cuit + EU_VAT = :eu_vat + AU_ABN = :au_abn + AU_ARN = :au_arn + BG_UIC = :bg_uic + BH_VAT = :bh_vat + BO_TIN = :bo_tin + BR_CNPJ = :br_cnpj + BR_CPF = :br_cpf + CA_BN = :ca_bn + CA_GST_HST = :ca_gst_hst + CA_PST_BC = :ca_pst_bc + CA_PST_MB = :ca_pst_mb + CA_PST_SK = :ca_pst_sk + CA_QST = :ca_qst + CH_VAT = :ch_vat + CL_TIN = :cl_tin + CN_TIN = :cn_tin + CO_NIT = :co_nit + CR_TIN = :cr_tin + DO_RCN = :do_rcn + EC_RUC = :ec_ruc + EG_TIN = :eg_tin + ES_CIF = :es_cif + EU_OSS_VAT = :eu_oss_vat + GB_VAT = :gb_vat + GE_VAT = :ge_vat + HK_BR = :hk_br + HU_TIN = :hu_tin + ID_NPWP = :id_npwp + IL_VAT = :il_vat + IN_GST = :in_gst + IS_VAT = :is_vat + JP_CN = :jp_cn + JP_RN = :jp_rn + JP_TRN = :jp_trn + KE_PIN = :ke_pin + KR_BRN = :kr_brn + KZ_BIN = :kz_bin + LI_UID = :li_uid + MX_RFC = :mx_rfc + MY_FRP = :my_frp + MY_ITN = :my_itn + MY_SST = :my_sst + NG_TIN = :ng_tin + NO_VAT = :no_vat + NO_VOEC = :no_voec + NZ_GST = :nz_gst + OM_VAT = :om_vat + PE_RUC = :pe_ruc + PH_TIN = :ph_tin + RO_TIN = :ro_tin + RS_PIB = :rs_pib + RU_INN = :ru_inn + RU_KPP = :ru_kpp + SA_VAT = :sa_vat + SG_GST = :sg_gst + SG_UEN = :sg_uen + SI_TIN = :si_tin + SV_NIT = :sv_nit + TH_VAT = :th_vat + TR_TIN = :tr_tin + TW_VAT = :tw_vat + UA_VAT = :ua_vat + US_EIN = :us_ein + UY_RUC = :uy_ruc + VE_RIF = :ve_rif + VN_TIN = :vn_tin + ZA_VAT = :za_vat + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end end end diff --git a/lib/orb/models/customer_hierarchy_config_model.rb b/lib/orb/models/customer_hierarchy_config_model.rb deleted file mode 100644 index 989248ae..00000000 --- a/lib/orb/models/customer_hierarchy_config_model.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class CustomerHierarchyConfigModel < Orb::BaseModel - # @!attribute [r] child_customer_ids - # A list of child customer IDs to add to the hierarchy. The desired child - # customers must not already be part of another hierarchy. - # - # @return [Array, nil] - optional :child_customer_ids, Orb::ArrayOf[String] - - # @!parse - # # @return [Array] - # attr_writer :child_customer_ids - - # @!attribute parent_customer_id - # The ID of the parent customer in the hierarchy. The desired parent customer must - # not be a child of another customer. - # - # @return [String, nil] - optional :parent_customer_id, String, nil?: true - - # @!parse - # # @param child_customer_ids [Array] - # # @param parent_customer_id [String, nil] - # # - # def initialize(child_customer_ids: nil, parent_customer_id: nil, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/customer_minified_model.rb b/lib/orb/models/customer_minified_model.rb deleted file mode 100644 index 50f05155..00000000 --- a/lib/orb/models/customer_minified_model.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class CustomerMinifiedModel < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute external_customer_id - # - # @return [String, nil] - required :external_customer_id, String, nil?: true - - # @!parse - # # @param id [String] - # # @param external_customer_id [String, nil] - # # - # def initialize(id:, external_customer_id:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/customer_model.rb b/lib/orb/models/customer_model.rb deleted file mode 100644 index d2650d44..00000000 --- a/lib/orb/models/customer_model.rb +++ /dev/null @@ -1,455 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class CustomerModel < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute additional_emails - # - # @return [Array] - required :additional_emails, Orb::ArrayOf[String] - - # @!attribute auto_collection - # - # @return [Boolean] - required :auto_collection, Orb::BooleanModel - - # @!attribute balance - # The customer's current balance in their currency. - # - # @return [String] - required :balance, String - - # @!attribute billing_address - # - # @return [Orb::Models::AddressModel, nil] - required :billing_address, -> { Orb::Models::AddressModel }, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute currency - # - # @return [String, nil] - required :currency, String, nil?: true - - # @!attribute email - # A valid customer email, to be used for notifications. When Orb triggers payment - # through a payment gateway, this email will be used for any automatically issued - # receipts. - # - # @return [String] - required :email, String - - # @!attribute email_delivery - # - # @return [Boolean] - required :email_delivery, Orb::BooleanModel - - # @!attribute exempt_from_automated_tax - # - # @return [Boolean, nil] - required :exempt_from_automated_tax, Orb::BooleanModel, nil?: true - - # @!attribute external_customer_id - # An optional user-defined ID for this customer resource, used throughout the - # system as an alias for this Customer. Use this field to identify a customer by - # an existing identifier in your system. - # - # @return [String, nil] - required :external_customer_id, String, nil?: true - - # @!attribute hierarchy - # The hierarchical relationships for this customer. - # - # @return [Orb::Models::CustomerModel::Hierarchy] - required :hierarchy, -> { Orb::Models::CustomerModel::Hierarchy } - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute name - # The full name of the customer - # - # @return [String] - required :name, String - - # @!attribute payment_provider - # This is used for creating charges or invoices in an external system via Orb. - # When not in test mode, the connection must first be configured in the Orb - # webapp. - # - # @return [Symbol, Orb::Models::CustomerModel::PaymentProvider, nil] - required :payment_provider, enum: -> { Orb::Models::CustomerModel::PaymentProvider }, nil?: true - - # @!attribute payment_provider_id - # The ID of this customer in an external payments solution, such as Stripe. This - # is used for creating charges or invoices in the external system via Orb. - # - # @return [String, nil] - required :payment_provider_id, String, nil?: true - - # @!attribute portal_url - # - # @return [String, nil] - required :portal_url, String, nil?: true - - # @!attribute shipping_address - # - # @return [Orb::Models::AddressModel, nil] - required :shipping_address, -> { Orb::Models::AddressModel }, nil?: true - - # @!attribute tax_id - # Tax IDs are commonly required to be displayed on customer invoices, which are - # added to the headers of invoices. - # - # ### Supported Tax ID Countries and Types - # - # | Country | Type | Description | - # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | - # | Andorra | `ad_nrt` | Andorran NRT Number | - # | Argentina | `ar_cuit` | Argentinian Tax ID Number | - # | Australia | `au_abn` | Australian Business Number (AU ABN) | - # | Australia | `au_arn` | Australian Taxation Office Reference Number | - # | Austria | `eu_vat` | European VAT Number | - # | Bahrain | `bh_vat` | Bahraini VAT Number | - # | Belgium | `eu_vat` | European VAT Number | - # | Bolivia | `bo_tin` | Bolivian Tax ID | - # | Brazil | `br_cnpj` | Brazilian CNPJ Number | - # | Brazil | `br_cpf` | Brazilian CPF Number | - # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | - # | Bulgaria | `eu_vat` | European VAT Number | - # | Canada | `ca_bn` | Canadian BN | - # | Canada | `ca_gst_hst` | Canadian GST/HST Number | - # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | - # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | - # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | - # | Canada | `ca_qst` | Canadian QST Number (Québec) | - # | Chile | `cl_tin` | Chilean TIN | - # | China | `cn_tin` | Chinese Tax ID | - # | Colombia | `co_nit` | Colombian NIT Number | - # | Costa Rica | `cr_tin` | Costa Rican Tax ID | - # | Croatia | `eu_vat` | European VAT Number | - # | Cyprus | `eu_vat` | European VAT Number | - # | Czech Republic | `eu_vat` | European VAT Number | - # | Denmark | `eu_vat` | European VAT Number | - # | Dominican Republic | `do_rcn` | Dominican RCN Number | - # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | - # | Egypt | `eg_tin` | Egyptian Tax Identification Number | - # | El Salvador | `sv_nit` | El Salvadorian NIT Number | - # | Estonia | `eu_vat` | European VAT Number | - # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | - # | Finland | `eu_vat` | European VAT Number | - # | France | `eu_vat` | European VAT Number | - # | Georgia | `ge_vat` | Georgian VAT | - # | Germany | `eu_vat` | European VAT Number | - # | Greece | `eu_vat` | European VAT Number | - # | Hong Kong | `hk_br` | Hong Kong BR Number | - # | Hungary | `eu_vat` | European VAT Number | - # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | - # | Iceland | `is_vat` | Icelandic VAT | - # | India | `in_gst` | Indian GST Number | - # | Indonesia | `id_npwp` | Indonesian NPWP Number | - # | Ireland | `eu_vat` | European VAT Number | - # | Israel | `il_vat` | Israel VAT | - # | Italy | `eu_vat` | European VAT Number | - # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | - # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | - # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | - # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | - # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | - # | Latvia | `eu_vat` | European VAT Number | - # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | - # | Lithuania | `eu_vat` | European VAT Number | - # | Luxembourg | `eu_vat` | European VAT Number | - # | Malaysia | `my_frp` | Malaysian FRP Number | - # | Malaysia | `my_itn` | Malaysian ITN | - # | Malaysia | `my_sst` | Malaysian SST Number | - # | Malta | `eu_vat ` | European VAT Number | - # | Mexico | `mx_rfc` | Mexican RFC Number | - # | Netherlands | `eu_vat` | European VAT Number | - # | New Zealand | `nz_gst` | New Zealand GST Number | - # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | - # | Norway | `no_vat` | Norwegian VAT Number | - # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | - # | Oman | `om_vat` | Omani VAT Number | - # | Peru | `pe_ruc` | Peruvian RUC Number | - # | Philippines | `ph_tin ` | Philippines Tax Identification Number | - # | Poland | `eu_vat` | European VAT Number | - # | Portugal | `eu_vat` | European VAT Number | - # | Romania | `eu_vat` | European VAT Number | - # | Romania | `ro_tin` | Romanian Tax ID Number | - # | Russia | `ru_inn` | Russian INN | - # | Russia | `ru_kpp` | Russian KPP | - # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | - # | Serbia | `rs_pib` | Serbian PIB Number | - # | Singapore | `sg_gst` | Singaporean GST | - # | Singapore | `sg_uen` | Singaporean UEN | - # | Slovakia | `eu_vat` | European VAT Number | - # | Slovenia | `eu_vat` | European VAT Number | - # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | - # | South Africa | `za_vat` | South African VAT Number | - # | South Korea | `kr_brn` | Korean BRN | - # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | - # | Spain | `eu_vat` | European VAT Number | - # | Sweden | `eu_vat` | European VAT Number | - # | Switzerland | `ch_vat` | Switzerland VAT Number | - # | Taiwan | `tw_vat` | Taiwanese VAT | - # | Thailand | `th_vat` | Thai VAT | - # | Turkey | `tr_tin` | Turkish Tax Identification Number | - # | Ukraine | `ua_vat` | Ukrainian VAT | - # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | - # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | - # | United Kingdom | `gb_vat` | United Kingdom VAT Number | - # | United States | `us_ein` | United States EIN | - # | Uruguay | `uy_ruc` | Uruguayan RUC Number | - # | Venezuela | `ve_rif` | Venezuelan RIF Number | - # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | - # - # @return [Orb::Models::CustomerTaxIDModel, nil] - required :tax_id, -> { Orb::Models::CustomerTaxIDModel }, nil?: true - - # @!attribute timezone - # A timezone identifier from the IANA timezone database, such as - # "America/Los_Angeles". This "defaults to your account's timezone if not set. - # This cannot be changed after customer creation. - # - # @return [String] - required :timezone, String - - # @!attribute accounting_sync_configuration - # - # @return [Orb::Models::CustomerModel::AccountingSyncConfiguration, nil] - optional :accounting_sync_configuration, - -> { Orb::Models::CustomerModel::AccountingSyncConfiguration }, - nil?: true - - # @!attribute reporting_configuration - # - # @return [Orb::Models::CustomerModel::ReportingConfiguration, nil] - optional :reporting_configuration, -> { Orb::Models::CustomerModel::ReportingConfiguration }, nil?: true - - # @!parse - # # A customer is a buyer of your products, and the other party to the billing - # # relationship. - # # - # # In Orb, customers are assigned system generated identifiers automatically, but - # # it's often desirable to have these match existing identifiers in your system. To - # # avoid having to denormalize Orb ID information, you can pass in an - # # `external_customer_id` with your own identifier. See - # # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further - # # information about how these aliases work in Orb. - # # - # # In addition to having an identifier in your system, a customer may exist in a - # # payment provider solution like Stripe. Use the `payment_provider_id` and the - # # `payment_provider` enum field to express this mapping. - # # - # # A customer also has a timezone (from the standard - # # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to - # # your account's timezone. See [Timezone localization](/essentials/timezones) for - # # information on what this timezone parameter influences within Orb. - # # - # # @param id [String] - # # @param additional_emails [Array] - # # @param auto_collection [Boolean] - # # @param balance [String] - # # @param billing_address [Orb::Models::AddressModel, nil] - # # @param created_at [Time] - # # @param currency [String, nil] - # # @param email [String] - # # @param email_delivery [Boolean] - # # @param exempt_from_automated_tax [Boolean, nil] - # # @param external_customer_id [String, nil] - # # @param hierarchy [Orb::Models::CustomerModel::Hierarchy] - # # @param metadata [Hash{Symbol=>String}] - # # @param name [String] - # # @param payment_provider [Symbol, Orb::Models::CustomerModel::PaymentProvider, nil] - # # @param payment_provider_id [String, nil] - # # @param portal_url [String, nil] - # # @param shipping_address [Orb::Models::AddressModel, nil] - # # @param tax_id [Orb::Models::CustomerTaxIDModel, nil] - # # @param timezone [String] - # # @param accounting_sync_configuration [Orb::Models::CustomerModel::AccountingSyncConfiguration, nil] - # # @param reporting_configuration [Orb::Models::CustomerModel::ReportingConfiguration, nil] - # # - # def initialize( - # id:, - # additional_emails:, - # auto_collection:, - # balance:, - # billing_address:, - # created_at:, - # currency:, - # email:, - # email_delivery:, - # exempt_from_automated_tax:, - # external_customer_id:, - # hierarchy:, - # metadata:, - # name:, - # payment_provider:, - # payment_provider_id:, - # portal_url:, - # shipping_address:, - # tax_id:, - # timezone:, - # accounting_sync_configuration: nil, - # reporting_configuration: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - class Hierarchy < Orb::BaseModel - # @!attribute children - # - # @return [Array] - required :children, -> { Orb::ArrayOf[Orb::Models::CustomerMinifiedModel] } - - # @!attribute parent - # - # @return [Orb::Models::CustomerMinifiedModel, nil] - required :parent, -> { Orb::Models::CustomerMinifiedModel }, nil?: true - - # @!parse - # # The hierarchical relationships for this customer. - # # - # # @param children [Array] - # # @param parent [Orb::Models::CustomerMinifiedModel, nil] - # # - # def initialize(children:, parent:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - - # @abstract - # - # This is used for creating charges or invoices in an external system via Orb. - # When not in test mode, the connection must first be configured in the Orb - # webapp. - # - # @example - # ```ruby - # case payment_provider - # in :quickbooks - # # ... - # in :"bill.com" - # # ... - # in :stripe_charge - # # ... - # in :stripe_invoice - # # ... - # in :netsuite - # # ... - # end - # ``` - class PaymentProvider < Orb::Enum - QUICKBOOKS = :quickbooks - BILL_COM = :"bill.com" - STRIPE_CHARGE = :stripe_charge - STRIPE_INVOICE = :stripe_invoice - NETSUITE = :netsuite - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - class AccountingSyncConfiguration < Orb::BaseModel - # @!attribute accounting_providers - # - # @return [Array] - required :accounting_providers, - -> { Orb::ArrayOf[Orb::Models::CustomerModel::AccountingSyncConfiguration::AccountingProvider] } - - # @!attribute excluded - # - # @return [Boolean] - required :excluded, Orb::BooleanModel - - # @!parse - # # @param accounting_providers [Array] - # # @param excluded [Boolean] - # # - # def initialize(accounting_providers:, excluded:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - class AccountingProvider < Orb::BaseModel - # @!attribute external_provider_id - # - # @return [String, nil] - required :external_provider_id, String, nil?: true - - # @!attribute provider_type - # - # @return [Symbol, Orb::Models::CustomerModel::AccountingSyncConfiguration::AccountingProvider::ProviderType] - required :provider_type, - enum: -> { Orb::Models::CustomerModel::AccountingSyncConfiguration::AccountingProvider::ProviderType } - - # @!parse - # # @param external_provider_id [String, nil] - # # @param provider_type [Symbol, Orb::Models::CustomerModel::AccountingSyncConfiguration::AccountingProvider::ProviderType] - # # - # def initialize(external_provider_id:, provider_type:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case provider_type - # in :quickbooks - # # ... - # in :netsuite - # # ... - # end - # ``` - class ProviderType < Orb::Enum - QUICKBOOKS = :quickbooks - NETSUITE = :netsuite - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end - - class ReportingConfiguration < Orb::BaseModel - # @!attribute exempt - # - # @return [Boolean] - required :exempt, Orb::BooleanModel - - # @!parse - # # @param exempt [Boolean] - # # - # def initialize(exempt:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end - end -end diff --git a/lib/orb/models/customer_tax_id_model.rb b/lib/orb/models/customer_tax_id_model.rb deleted file mode 100644 index 22fefe1f..00000000 --- a/lib/orb/models/customer_tax_id_model.rb +++ /dev/null @@ -1,344 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class CustomerTaxIDModel < Orb::BaseModel - # @!attribute country - # - # @return [Symbol, Orb::Models::CustomerTaxIDModel::Country] - required :country, enum: -> { Orb::Models::CustomerTaxIDModel::Country } - - # @!attribute type - # - # @return [Symbol, Orb::Models::CustomerTaxIDModel::Type] - required :type, enum: -> { Orb::Models::CustomerTaxIDModel::Type } - - # @!attribute value - # - # @return [String] - required :value, String - - # @!parse - # # Tax IDs are commonly required to be displayed on customer invoices, which are - # # added to the headers of invoices. - # # - # # ### Supported Tax ID Countries and Types - # # - # # | Country | Type | Description | - # # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | - # # | Andorra | `ad_nrt` | Andorran NRT Number | - # # | Argentina | `ar_cuit` | Argentinian Tax ID Number | - # # | Australia | `au_abn` | Australian Business Number (AU ABN) | - # # | Australia | `au_arn` | Australian Taxation Office Reference Number | - # # | Austria | `eu_vat` | European VAT Number | - # # | Bahrain | `bh_vat` | Bahraini VAT Number | - # # | Belgium | `eu_vat` | European VAT Number | - # # | Bolivia | `bo_tin` | Bolivian Tax ID | - # # | Brazil | `br_cnpj` | Brazilian CNPJ Number | - # # | Brazil | `br_cpf` | Brazilian CPF Number | - # # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | - # # | Bulgaria | `eu_vat` | European VAT Number | - # # | Canada | `ca_bn` | Canadian BN | - # # | Canada | `ca_gst_hst` | Canadian GST/HST Number | - # # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | - # # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | - # # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | - # # | Canada | `ca_qst` | Canadian QST Number (Québec) | - # # | Chile | `cl_tin` | Chilean TIN | - # # | China | `cn_tin` | Chinese Tax ID | - # # | Colombia | `co_nit` | Colombian NIT Number | - # # | Costa Rica | `cr_tin` | Costa Rican Tax ID | - # # | Croatia | `eu_vat` | European VAT Number | - # # | Cyprus | `eu_vat` | European VAT Number | - # # | Czech Republic | `eu_vat` | European VAT Number | - # # | Denmark | `eu_vat` | European VAT Number | - # # | Dominican Republic | `do_rcn` | Dominican RCN Number | - # # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | - # # | Egypt | `eg_tin` | Egyptian Tax Identification Number | - # # | El Salvador | `sv_nit` | El Salvadorian NIT Number | - # # | Estonia | `eu_vat` | European VAT Number | - # # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | - # # | Finland | `eu_vat` | European VAT Number | - # # | France | `eu_vat` | European VAT Number | - # # | Georgia | `ge_vat` | Georgian VAT | - # # | Germany | `eu_vat` | European VAT Number | - # # | Greece | `eu_vat` | European VAT Number | - # # | Hong Kong | `hk_br` | Hong Kong BR Number | - # # | Hungary | `eu_vat` | European VAT Number | - # # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | - # # | Iceland | `is_vat` | Icelandic VAT | - # # | India | `in_gst` | Indian GST Number | - # # | Indonesia | `id_npwp` | Indonesian NPWP Number | - # # | Ireland | `eu_vat` | European VAT Number | - # # | Israel | `il_vat` | Israel VAT | - # # | Italy | `eu_vat` | European VAT Number | - # # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | - # # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | - # # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | - # # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | - # # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | - # # | Latvia | `eu_vat` | European VAT Number | - # # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | - # # | Lithuania | `eu_vat` | European VAT Number | - # # | Luxembourg | `eu_vat` | European VAT Number | - # # | Malaysia | `my_frp` | Malaysian FRP Number | - # # | Malaysia | `my_itn` | Malaysian ITN | - # # | Malaysia | `my_sst` | Malaysian SST Number | - # # | Malta | `eu_vat ` | European VAT Number | - # # | Mexico | `mx_rfc` | Mexican RFC Number | - # # | Netherlands | `eu_vat` | European VAT Number | - # # | New Zealand | `nz_gst` | New Zealand GST Number | - # # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | - # # | Norway | `no_vat` | Norwegian VAT Number | - # # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | - # # | Oman | `om_vat` | Omani VAT Number | - # # | Peru | `pe_ruc` | Peruvian RUC Number | - # # | Philippines | `ph_tin ` | Philippines Tax Identification Number | - # # | Poland | `eu_vat` | European VAT Number | - # # | Portugal | `eu_vat` | European VAT Number | - # # | Romania | `eu_vat` | European VAT Number | - # # | Romania | `ro_tin` | Romanian Tax ID Number | - # # | Russia | `ru_inn` | Russian INN | - # # | Russia | `ru_kpp` | Russian KPP | - # # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | - # # | Serbia | `rs_pib` | Serbian PIB Number | - # # | Singapore | `sg_gst` | Singaporean GST | - # # | Singapore | `sg_uen` | Singaporean UEN | - # # | Slovakia | `eu_vat` | European VAT Number | - # # | Slovenia | `eu_vat` | European VAT Number | - # # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | - # # | South Africa | `za_vat` | South African VAT Number | - # # | South Korea | `kr_brn` | Korean BRN | - # # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | - # # | Spain | `eu_vat` | European VAT Number | - # # | Sweden | `eu_vat` | European VAT Number | - # # | Switzerland | `ch_vat` | Switzerland VAT Number | - # # | Taiwan | `tw_vat` | Taiwanese VAT | - # # | Thailand | `th_vat` | Thai VAT | - # # | Turkey | `tr_tin` | Turkish Tax Identification Number | - # # | Ukraine | `ua_vat` | Ukrainian VAT | - # # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | - # # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | - # # | United Kingdom | `gb_vat` | United Kingdom VAT Number | - # # | United States | `us_ein` | United States EIN | - # # | Uruguay | `uy_ruc` | Uruguayan RUC Number | - # # | Venezuela | `ve_rif` | Venezuelan RIF Number | - # # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | - # # - # # @param country [Symbol, Orb::Models::CustomerTaxIDModel::Country] - # # @param type [Symbol, Orb::Models::CustomerTaxIDModel::Type] - # # @param value [String] - # # - # def initialize(country:, type:, value:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case country - # in :AD - # # ... - # in :AE - # # ... - # in :AR - # # ... - # in :AT - # # ... - # in :AU - # # ... - # in ... - # #... - # end - # ``` - class Country < Orb::Enum - AD = :AD - AE = :AE - AR = :AR - AT = :AT - AU = :AU - BE = :BE - BG = :BG - BH = :BH - BO = :BO - BR = :BR - CA = :CA - CH = :CH - CL = :CL - CN = :CN - CO = :CO - CR = :CR - CY = :CY - CZ = :CZ - DE = :DE - DK = :DK - EE = :EE - DO = :DO - EC = :EC - EG = :EG - ES = :ES - EU = :EU - FI = :FI - FR = :FR - GB = :GB - GE = :GE - GR = :GR - HK = :HK - HR = :HR - HU = :HU - ID = :ID - IE = :IE - IL = :IL - IN = :IN - IS = :IS - IT = :IT - JP = :JP - KE = :KE - KR = :KR - KZ = :KZ - LI = :LI - LT = :LT - LU = :LU - LV = :LV - MT = :MT - MX = :MX - MY = :MY - NG = :NG - NL = :NL - NO = :NO - NZ = :NZ - OM = :OM - PE = :PE - PH = :PH - PL = :PL - PT = :PT - RO = :RO - RS = :RS - RU = :RU - SA = :SA - SE = :SE - SG = :SG - SI = :SI - SK = :SK - SV = :SV - TH = :TH - TR = :TR - TW = :TW - UA = :UA - US = :US - UY = :UY - VE = :VE - VN = :VN - ZA = :ZA - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case type - # in :ad_nrt - # # ... - # in :ae_trn - # # ... - # in :ar_cuit - # # ... - # in :eu_vat - # # ... - # in :au_abn - # # ... - # in ... - # #... - # end - # ``` - class Type < Orb::Enum - AD_NRT = :ad_nrt - AE_TRN = :ae_trn - AR_CUIT = :ar_cuit - EU_VAT = :eu_vat - AU_ABN = :au_abn - AU_ARN = :au_arn - BG_UIC = :bg_uic - BH_VAT = :bh_vat - BO_TIN = :bo_tin - BR_CNPJ = :br_cnpj - BR_CPF = :br_cpf - CA_BN = :ca_bn - CA_GST_HST = :ca_gst_hst - CA_PST_BC = :ca_pst_bc - CA_PST_MB = :ca_pst_mb - CA_PST_SK = :ca_pst_sk - CA_QST = :ca_qst - CH_VAT = :ch_vat - CL_TIN = :cl_tin - CN_TIN = :cn_tin - CO_NIT = :co_nit - CR_TIN = :cr_tin - DO_RCN = :do_rcn - EC_RUC = :ec_ruc - EG_TIN = :eg_tin - ES_CIF = :es_cif - EU_OSS_VAT = :eu_oss_vat - GB_VAT = :gb_vat - GE_VAT = :ge_vat - HK_BR = :hk_br - HU_TIN = :hu_tin - ID_NPWP = :id_npwp - IL_VAT = :il_vat - IN_GST = :in_gst - IS_VAT = :is_vat - JP_CN = :jp_cn - JP_RN = :jp_rn - JP_TRN = :jp_trn - KE_PIN = :ke_pin - KR_BRN = :kr_brn - KZ_BIN = :kz_bin - LI_UID = :li_uid - MX_RFC = :mx_rfc - MY_FRP = :my_frp - MY_ITN = :my_itn - MY_SST = :my_sst - NG_TIN = :ng_tin - NO_VAT = :no_vat - NO_VOEC = :no_voec - NZ_GST = :nz_gst - OM_VAT = :om_vat - PE_RUC = :pe_ruc - PH_TIN = :ph_tin - RO_TIN = :ro_tin - RS_PIB = :rs_pib - RU_INN = :ru_inn - RU_KPP = :ru_kpp - SA_VAT = :sa_vat - SG_GST = :sg_gst - SG_UEN = :sg_uen - SI_TIN = :si_tin - SV_NIT = :sv_nit - TH_VAT = :th_vat - TR_TIN = :tr_tin - TW_VAT = :tw_vat - UA_VAT = :ua_vat - US_EIN = :us_ein - UY_RUC = :uy_ruc - VE_RIF = :ve_rif - VN_TIN = :vn_tin - ZA_VAT = :za_vat - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end -end diff --git a/lib/orb/models/customer_update_by_external_id_params.rb b/lib/orb/models/customer_update_by_external_id_params.rb index 5d4f2ab9..ae34b576 100644 --- a/lib/orb/models/customer_update_by_external_id_params.rb +++ b/lib/orb/models/customer_update_by_external_id_params.rb @@ -2,17 +2,912 @@ module Orb module Models - class CustomerUpdateByExternalIDParams < Orb::Models::EditCustomerModel + class CustomerUpdateByExternalIDParams < Orb::BaseModel # @!parse # extend Orb::RequestParameters::Converter include Orb::RequestParameters + # @!attribute accounting_sync_configuration + # + # @return [Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration, nil] + optional :accounting_sync_configuration, + -> { Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration }, + nil?: true + + # @!attribute additional_emails + # Additional email addresses for this customer. If populated, these email + # addresses will be CC'd for customer communications. + # + # @return [Array, nil] + optional :additional_emails, Orb::ArrayOf[String], nil?: true + + # @!attribute auto_collection + # Used to determine if invoices for this customer will automatically attempt to + # charge a saved payment method, if available. This parameter defaults to `True` + # when a payment provider is provided on customer creation. + # + # @return [Boolean, nil] + optional :auto_collection, Orb::BooleanModel, nil?: true + + # @!attribute billing_address + # + # @return [Orb::Models::CustomerUpdateByExternalIDParams::BillingAddress, nil] + optional :billing_address, + -> { Orb::Models::CustomerUpdateByExternalIDParams::BillingAddress }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string used for the customer's invoices and balance. If not + # set at creation time, will be set at subscription creation time. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute email + # A valid customer email, to be used for invoicing and notifications. + # + # @return [String, nil] + optional :email, String, nil?: true + + # @!attribute email_delivery + # + # @return [Boolean, nil] + optional :email_delivery, Orb::BooleanModel, nil?: true + + # @!attribute external_customer_id + # The external customer ID. This can only be set if empty and the customer has no + # past or current subscriptions. + # + # @return [String, nil] + optional :external_customer_id, String, nil?: true + + # @!attribute hierarchy + # The hierarchical relationships for this customer. + # + # @return [Orb::Models::CustomerUpdateByExternalIDParams::Hierarchy, nil] + optional :hierarchy, -> { Orb::Models::CustomerUpdateByExternalIDParams::Hierarchy }, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute name + # The full name of the customer + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute payment_provider + # This is used for creating charges or invoices in an external system via Orb. + # When not in test mode: + # + # - the connection must first be configured in the Orb webapp. + # - if the provider is an invoicing provider (`stripe_invoice`, `quickbooks`, + # `bill.com`, `netsuite`), any product mappings must first be configured with + # the Orb team. + # + # @return [Symbol, Orb::Models::CustomerUpdateByExternalIDParams::PaymentProvider, nil] + optional :payment_provider, + enum: -> { Orb::Models::CustomerUpdateByExternalIDParams::PaymentProvider }, + nil?: true + + # @!attribute payment_provider_id + # The ID of this customer in an external payments solution, such as Stripe. This + # is used for creating charges or invoices in the external system via Orb. + # + # @return [String, nil] + optional :payment_provider_id, String, nil?: true + + # @!attribute reporting_configuration + # + # @return [Orb::Models::CustomerUpdateByExternalIDParams::ReportingConfiguration, nil] + optional :reporting_configuration, + -> { Orb::Models::CustomerUpdateByExternalIDParams::ReportingConfiguration }, + nil?: true + + # @!attribute shipping_address + # + # @return [Orb::Models::CustomerUpdateByExternalIDParams::ShippingAddress, nil] + optional :shipping_address, + -> { Orb::Models::CustomerUpdateByExternalIDParams::ShippingAddress }, + nil?: true + + # @!attribute tax_configuration + # + # @return [Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewAvalaraTaxConfiguration, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewTaxJarConfiguration, nil] + optional :tax_configuration, + union: -> { Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration }, + nil?: true + + # @!attribute tax_id + # Tax IDs are commonly required to be displayed on customer invoices, which are + # added to the headers of invoices. + # + # ### Supported Tax ID Countries and Types + # + # | Country | Type | Description | + # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | + # | Andorra | `ad_nrt` | Andorran NRT Number | + # | Argentina | `ar_cuit` | Argentinian Tax ID Number | + # | Australia | `au_abn` | Australian Business Number (AU ABN) | + # | Australia | `au_arn` | Australian Taxation Office Reference Number | + # | Austria | `eu_vat` | European VAT Number | + # | Bahrain | `bh_vat` | Bahraini VAT Number | + # | Belgium | `eu_vat` | European VAT Number | + # | Bolivia | `bo_tin` | Bolivian Tax ID | + # | Brazil | `br_cnpj` | Brazilian CNPJ Number | + # | Brazil | `br_cpf` | Brazilian CPF Number | + # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | + # | Bulgaria | `eu_vat` | European VAT Number | + # | Canada | `ca_bn` | Canadian BN | + # | Canada | `ca_gst_hst` | Canadian GST/HST Number | + # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | + # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | + # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | + # | Canada | `ca_qst` | Canadian QST Number (Québec) | + # | Chile | `cl_tin` | Chilean TIN | + # | China | `cn_tin` | Chinese Tax ID | + # | Colombia | `co_nit` | Colombian NIT Number | + # | Costa Rica | `cr_tin` | Costa Rican Tax ID | + # | Croatia | `eu_vat` | European VAT Number | + # | Cyprus | `eu_vat` | European VAT Number | + # | Czech Republic | `eu_vat` | European VAT Number | + # | Denmark | `eu_vat` | European VAT Number | + # | Dominican Republic | `do_rcn` | Dominican RCN Number | + # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | + # | Egypt | `eg_tin` | Egyptian Tax Identification Number | + # | El Salvador | `sv_nit` | El Salvadorian NIT Number | + # | Estonia | `eu_vat` | European VAT Number | + # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Finland | `eu_vat` | European VAT Number | + # | France | `eu_vat` | European VAT Number | + # | Georgia | `ge_vat` | Georgian VAT | + # | Germany | `eu_vat` | European VAT Number | + # | Greece | `eu_vat` | European VAT Number | + # | Hong Kong | `hk_br` | Hong Kong BR Number | + # | Hungary | `eu_vat` | European VAT Number | + # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | + # | Iceland | `is_vat` | Icelandic VAT | + # | India | `in_gst` | Indian GST Number | + # | Indonesia | `id_npwp` | Indonesian NPWP Number | + # | Ireland | `eu_vat` | European VAT Number | + # | Israel | `il_vat` | Israel VAT | + # | Italy | `eu_vat` | European VAT Number | + # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | + # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | + # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | + # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | + # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | + # | Latvia | `eu_vat` | European VAT Number | + # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | + # | Lithuania | `eu_vat` | European VAT Number | + # | Luxembourg | `eu_vat` | European VAT Number | + # | Malaysia | `my_frp` | Malaysian FRP Number | + # | Malaysia | `my_itn` | Malaysian ITN | + # | Malaysia | `my_sst` | Malaysian SST Number | + # | Malta | `eu_vat ` | European VAT Number | + # | Mexico | `mx_rfc` | Mexican RFC Number | + # | Netherlands | `eu_vat` | European VAT Number | + # | New Zealand | `nz_gst` | New Zealand GST Number | + # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | + # | Norway | `no_vat` | Norwegian VAT Number | + # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | + # | Oman | `om_vat` | Omani VAT Number | + # | Peru | `pe_ruc` | Peruvian RUC Number | + # | Philippines | `ph_tin ` | Philippines Tax Identification Number | + # | Poland | `eu_vat` | European VAT Number | + # | Portugal | `eu_vat` | European VAT Number | + # | Romania | `eu_vat` | European VAT Number | + # | Romania | `ro_tin` | Romanian Tax ID Number | + # | Russia | `ru_inn` | Russian INN | + # | Russia | `ru_kpp` | Russian KPP | + # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | + # | Serbia | `rs_pib` | Serbian PIB Number | + # | Singapore | `sg_gst` | Singaporean GST | + # | Singapore | `sg_uen` | Singaporean UEN | + # | Slovakia | `eu_vat` | European VAT Number | + # | Slovenia | `eu_vat` | European VAT Number | + # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | + # | South Africa | `za_vat` | South African VAT Number | + # | South Korea | `kr_brn` | Korean BRN | + # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | + # | Spain | `eu_vat` | European VAT Number | + # | Sweden | `eu_vat` | European VAT Number | + # | Switzerland | `ch_vat` | Switzerland VAT Number | + # | Taiwan | `tw_vat` | Taiwanese VAT | + # | Thailand | `th_vat` | Thai VAT | + # | Turkey | `tr_tin` | Turkish Tax Identification Number | + # | Ukraine | `ua_vat` | Ukrainian VAT | + # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | + # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | + # | United Kingdom | `gb_vat` | United Kingdom VAT Number | + # | United States | `us_ein` | United States EIN | + # | Uruguay | `uy_ruc` | Uruguayan RUC Number | + # | Venezuela | `ve_rif` | Venezuelan RIF Number | + # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | + # + # @return [Orb::Models::CustomerUpdateByExternalIDParams::TaxID, nil] + optional :tax_id, -> { Orb::Models::CustomerUpdateByExternalIDParams::TaxID }, nil?: true + # @!parse + # # @param accounting_sync_configuration [Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration, nil] + # # @param additional_emails [Array, nil] + # # @param auto_collection [Boolean, nil] + # # @param billing_address [Orb::Models::CustomerUpdateByExternalIDParams::BillingAddress, nil] + # # @param currency [String, nil] + # # @param email [String, nil] + # # @param email_delivery [Boolean, nil] + # # @param external_customer_id [String, nil] + # # @param hierarchy [Orb::Models::CustomerUpdateByExternalIDParams::Hierarchy, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param name [String, nil] + # # @param payment_provider [Symbol, Orb::Models::CustomerUpdateByExternalIDParams::PaymentProvider, nil] + # # @param payment_provider_id [String, nil] + # # @param reporting_configuration [Orb::Models::CustomerUpdateByExternalIDParams::ReportingConfiguration, nil] + # # @param shipping_address [Orb::Models::CustomerUpdateByExternalIDParams::ShippingAddress, nil] + # # @param tax_configuration [Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewAvalaraTaxConfiguration, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewTaxJarConfiguration, nil] + # # @param tax_id [Orb::Models::CustomerUpdateByExternalIDParams::TaxID, nil] # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] # # - # def initialize(request_options: {}, **) = super + # def initialize( + # accounting_sync_configuration: nil, + # additional_emails: nil, + # auto_collection: nil, + # billing_address: nil, + # currency: nil, + # email: nil, + # email_delivery: nil, + # external_customer_id: nil, + # hierarchy: nil, + # metadata: nil, + # name: nil, + # payment_provider: nil, + # payment_provider_id: nil, + # reporting_configuration: nil, + # shipping_address: nil, + # tax_configuration: nil, + # tax_id: nil, + # request_options: {}, + # ** + # ) + # super + # end # def initialize: (Hash | Orb::BaseModel) -> void + + class AccountingSyncConfiguration < Orb::BaseModel + # @!attribute accounting_providers + # + # @return [Array, nil] + optional :accounting_providers, + -> { Orb::ArrayOf[Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration::AccountingProvider] }, + nil?: true + + # @!attribute excluded + # + # @return [Boolean, nil] + optional :excluded, Orb::BooleanModel, nil?: true + + # @!parse + # # @param accounting_providers [Array, nil] + # # @param excluded [Boolean, nil] + # # + # def initialize(accounting_providers: nil, excluded: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class AccountingProvider < Orb::BaseModel + # @!attribute external_provider_id + # + # @return [String] + required :external_provider_id, String + + # @!attribute provider_type + # + # @return [String] + required :provider_type, String + + # @!parse + # # @param external_provider_id [String] + # # @param provider_type [String] + # # + # def initialize(external_provider_id:, provider_type:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class BillingAddress < Orb::BaseModel + # @!attribute city + # + # @return [String, nil] + optional :city, String, nil?: true + + # @!attribute country + # + # @return [String, nil] + optional :country, String, nil?: true + + # @!attribute line1 + # + # @return [String, nil] + optional :line1, String, nil?: true + + # @!attribute line2 + # + # @return [String, nil] + optional :line2, String, nil?: true + + # @!attribute postal_code + # + # @return [String, nil] + optional :postal_code, String, nil?: true + + # @!attribute state + # + # @return [String, nil] + optional :state, String, nil?: true + + # @!parse + # # @param city [String, nil] + # # @param country [String, nil] + # # @param line1 [String, nil] + # # @param line2 [String, nil] + # # @param postal_code [String, nil] + # # @param state [String, nil] + # # + # def initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Hierarchy < Orb::BaseModel + # @!attribute [r] child_customer_ids + # A list of child customer IDs to add to the hierarchy. The desired child + # customers must not already be part of another hierarchy. + # + # @return [Array, nil] + optional :child_customer_ids, Orb::ArrayOf[String] + + # @!parse + # # @return [Array] + # attr_writer :child_customer_ids + + # @!attribute parent_customer_id + # The ID of the parent customer in the hierarchy. The desired parent customer must + # not be a child of another customer. + # + # @return [String, nil] + optional :parent_customer_id, String, nil?: true + + # @!parse + # # The hierarchical relationships for this customer. + # # + # # @param child_customer_ids [Array] + # # @param parent_customer_id [String, nil] + # # + # def initialize(child_customer_ids: nil, parent_customer_id: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # This is used for creating charges or invoices in an external system via Orb. + # When not in test mode: + # + # - the connection must first be configured in the Orb webapp. + # - if the provider is an invoicing provider (`stripe_invoice`, `quickbooks`, + # `bill.com`, `netsuite`), any product mappings must first be configured with + # the Orb team. + # + # @example + # ```ruby + # case payment_provider + # in :quickbooks + # # ... + # in :"bill.com" + # # ... + # in :stripe_charge + # # ... + # in :stripe_invoice + # # ... + # in :netsuite + # # ... + # end + # ``` + class PaymentProvider < Orb::Enum + QUICKBOOKS = :quickbooks + BILL_COM = :"bill.com" + STRIPE_CHARGE = :stripe_charge + STRIPE_INVOICE = :stripe_invoice + NETSUITE = :netsuite + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class ReportingConfiguration < Orb::BaseModel + # @!attribute exempt + # + # @return [Boolean] + required :exempt, Orb::BooleanModel + + # @!parse + # # @param exempt [Boolean] + # # + # def initialize(exempt:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class ShippingAddress < Orb::BaseModel + # @!attribute city + # + # @return [String, nil] + optional :city, String, nil?: true + + # @!attribute country + # + # @return [String, nil] + optional :country, String, nil?: true + + # @!attribute line1 + # + # @return [String, nil] + optional :line1, String, nil?: true + + # @!attribute line2 + # + # @return [String, nil] + optional :line2, String, nil?: true + + # @!attribute postal_code + # + # @return [String, nil] + optional :postal_code, String, nil?: true + + # @!attribute state + # + # @return [String, nil] + optional :state, String, nil?: true + + # @!parse + # # @param city [String, nil] + # # @param country [String, nil] + # # @param line1 [String, nil] + # # @param line2 [String, nil] + # # @param postal_code [String, nil] + # # @param state [String, nil] + # # + # def initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case tax_configuration + # in {tax_provider: "avalara", tax_exempt: Orb::BooleanModel, tax_exemption_code: String} + # # Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewAvalaraTaxConfiguration ... + # in {tax_provider: "taxjar", tax_exempt: Orb::BooleanModel} + # # Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewTaxJarConfiguration ... + # end + # ``` + # + # @example + # ```ruby + # case tax_configuration + # in Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewAvalaraTaxConfiguration + # # ... + # in Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewTaxJarConfiguration + # # ... + # end + # ``` + class TaxConfiguration < Orb::Union + discriminator :tax_provider + + variant :avalara, + -> { Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewAvalaraTaxConfiguration } + + variant :taxjar, + -> { Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewTaxJarConfiguration } + + class NewAvalaraTaxConfiguration < Orb::BaseModel + # @!attribute tax_exempt + # + # @return [Boolean] + required :tax_exempt, Orb::BooleanModel + + # @!attribute tax_provider + # + # @return [Symbol, :avalara] + required :tax_provider, const: :avalara + + # @!attribute tax_exemption_code + # + # @return [String, nil] + optional :tax_exemption_code, String, nil?: true + + # @!parse + # # @param tax_exempt [Boolean] + # # @param tax_exemption_code [String, nil] + # # @param tax_provider [Symbol, :avalara] + # # + # def initialize(tax_exempt:, tax_exemption_code: nil, tax_provider: :avalara, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class NewTaxJarConfiguration < Orb::BaseModel + # @!attribute tax_exempt + # + # @return [Boolean] + required :tax_exempt, Orb::BooleanModel + + # @!attribute tax_provider + # + # @return [Symbol, :taxjar] + required :tax_provider, const: :taxjar + + # @!parse + # # @param tax_exempt [Boolean] + # # @param tax_provider [Symbol, :taxjar] + # # + # def initialize(tax_exempt:, tax_provider: :taxjar, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class TaxID < Orb::BaseModel + # @!attribute country + # + # @return [Symbol, Orb::Models::CustomerUpdateByExternalIDParams::TaxID::Country] + required :country, enum: -> { Orb::Models::CustomerUpdateByExternalIDParams::TaxID::Country } + + # @!attribute type + # + # @return [Symbol, Orb::Models::CustomerUpdateByExternalIDParams::TaxID::Type] + required :type, enum: -> { Orb::Models::CustomerUpdateByExternalIDParams::TaxID::Type } + + # @!attribute value + # + # @return [String] + required :value, String + + # @!parse + # # Tax IDs are commonly required to be displayed on customer invoices, which are + # # added to the headers of invoices. + # # + # # ### Supported Tax ID Countries and Types + # # + # # | Country | Type | Description | + # # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | + # # | Andorra | `ad_nrt` | Andorran NRT Number | + # # | Argentina | `ar_cuit` | Argentinian Tax ID Number | + # # | Australia | `au_abn` | Australian Business Number (AU ABN) | + # # | Australia | `au_arn` | Australian Taxation Office Reference Number | + # # | Austria | `eu_vat` | European VAT Number | + # # | Bahrain | `bh_vat` | Bahraini VAT Number | + # # | Belgium | `eu_vat` | European VAT Number | + # # | Bolivia | `bo_tin` | Bolivian Tax ID | + # # | Brazil | `br_cnpj` | Brazilian CNPJ Number | + # # | Brazil | `br_cpf` | Brazilian CPF Number | + # # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | + # # | Bulgaria | `eu_vat` | European VAT Number | + # # | Canada | `ca_bn` | Canadian BN | + # # | Canada | `ca_gst_hst` | Canadian GST/HST Number | + # # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | + # # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | + # # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | + # # | Canada | `ca_qst` | Canadian QST Number (Québec) | + # # | Chile | `cl_tin` | Chilean TIN | + # # | China | `cn_tin` | Chinese Tax ID | + # # | Colombia | `co_nit` | Colombian NIT Number | + # # | Costa Rica | `cr_tin` | Costa Rican Tax ID | + # # | Croatia | `eu_vat` | European VAT Number | + # # | Cyprus | `eu_vat` | European VAT Number | + # # | Czech Republic | `eu_vat` | European VAT Number | + # # | Denmark | `eu_vat` | European VAT Number | + # # | Dominican Republic | `do_rcn` | Dominican RCN Number | + # # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | + # # | Egypt | `eg_tin` | Egyptian Tax Identification Number | + # # | El Salvador | `sv_nit` | El Salvadorian NIT Number | + # # | Estonia | `eu_vat` | European VAT Number | + # # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # # | Finland | `eu_vat` | European VAT Number | + # # | France | `eu_vat` | European VAT Number | + # # | Georgia | `ge_vat` | Georgian VAT | + # # | Germany | `eu_vat` | European VAT Number | + # # | Greece | `eu_vat` | European VAT Number | + # # | Hong Kong | `hk_br` | Hong Kong BR Number | + # # | Hungary | `eu_vat` | European VAT Number | + # # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | + # # | Iceland | `is_vat` | Icelandic VAT | + # # | India | `in_gst` | Indian GST Number | + # # | Indonesia | `id_npwp` | Indonesian NPWP Number | + # # | Ireland | `eu_vat` | European VAT Number | + # # | Israel | `il_vat` | Israel VAT | + # # | Italy | `eu_vat` | European VAT Number | + # # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | + # # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | + # # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | + # # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | + # # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | + # # | Latvia | `eu_vat` | European VAT Number | + # # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | + # # | Lithuania | `eu_vat` | European VAT Number | + # # | Luxembourg | `eu_vat` | European VAT Number | + # # | Malaysia | `my_frp` | Malaysian FRP Number | + # # | Malaysia | `my_itn` | Malaysian ITN | + # # | Malaysia | `my_sst` | Malaysian SST Number | + # # | Malta | `eu_vat ` | European VAT Number | + # # | Mexico | `mx_rfc` | Mexican RFC Number | + # # | Netherlands | `eu_vat` | European VAT Number | + # # | New Zealand | `nz_gst` | New Zealand GST Number | + # # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | + # # | Norway | `no_vat` | Norwegian VAT Number | + # # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | + # # | Oman | `om_vat` | Omani VAT Number | + # # | Peru | `pe_ruc` | Peruvian RUC Number | + # # | Philippines | `ph_tin ` | Philippines Tax Identification Number | + # # | Poland | `eu_vat` | European VAT Number | + # # | Portugal | `eu_vat` | European VAT Number | + # # | Romania | `eu_vat` | European VAT Number | + # # | Romania | `ro_tin` | Romanian Tax ID Number | + # # | Russia | `ru_inn` | Russian INN | + # # | Russia | `ru_kpp` | Russian KPP | + # # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | + # # | Serbia | `rs_pib` | Serbian PIB Number | + # # | Singapore | `sg_gst` | Singaporean GST | + # # | Singapore | `sg_uen` | Singaporean UEN | + # # | Slovakia | `eu_vat` | European VAT Number | + # # | Slovenia | `eu_vat` | European VAT Number | + # # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | + # # | South Africa | `za_vat` | South African VAT Number | + # # | South Korea | `kr_brn` | Korean BRN | + # # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | + # # | Spain | `eu_vat` | European VAT Number | + # # | Sweden | `eu_vat` | European VAT Number | + # # | Switzerland | `ch_vat` | Switzerland VAT Number | + # # | Taiwan | `tw_vat` | Taiwanese VAT | + # # | Thailand | `th_vat` | Thai VAT | + # # | Turkey | `tr_tin` | Turkish Tax Identification Number | + # # | Ukraine | `ua_vat` | Ukrainian VAT | + # # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | + # # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | + # # | United Kingdom | `gb_vat` | United Kingdom VAT Number | + # # | United States | `us_ein` | United States EIN | + # # | Uruguay | `uy_ruc` | Uruguayan RUC Number | + # # | Venezuela | `ve_rif` | Venezuelan RIF Number | + # # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | + # # + # # @param country [Symbol, Orb::Models::CustomerUpdateByExternalIDParams::TaxID::Country] + # # @param type [Symbol, Orb::Models::CustomerUpdateByExternalIDParams::TaxID::Type] + # # @param value [String] + # # + # def initialize(country:, type:, value:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case country + # in :AD + # # ... + # in :AE + # # ... + # in :AR + # # ... + # in :AT + # # ... + # in :AU + # # ... + # in ... + # #... + # end + # ``` + class Country < Orb::Enum + AD = :AD + AE = :AE + AR = :AR + AT = :AT + AU = :AU + BE = :BE + BG = :BG + BH = :BH + BO = :BO + BR = :BR + CA = :CA + CH = :CH + CL = :CL + CN = :CN + CO = :CO + CR = :CR + CY = :CY + CZ = :CZ + DE = :DE + DK = :DK + EE = :EE + DO = :DO + EC = :EC + EG = :EG + ES = :ES + EU = :EU + FI = :FI + FR = :FR + GB = :GB + GE = :GE + GR = :GR + HK = :HK + HR = :HR + HU = :HU + ID = :ID + IE = :IE + IL = :IL + IN = :IN + IS = :IS + IT = :IT + JP = :JP + KE = :KE + KR = :KR + KZ = :KZ + LI = :LI + LT = :LT + LU = :LU + LV = :LV + MT = :MT + MX = :MX + MY = :MY + NG = :NG + NL = :NL + NO = :NO + NZ = :NZ + OM = :OM + PE = :PE + PH = :PH + PL = :PL + PT = :PT + RO = :RO + RS = :RS + RU = :RU + SA = :SA + SE = :SE + SG = :SG + SI = :SI + SK = :SK + SV = :SV + TH = :TH + TR = :TR + TW = :TW + UA = :UA + US = :US + UY = :UY + VE = :VE + VN = :VN + ZA = :ZA + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + # @abstract + # + # @example + # ```ruby + # case type + # in :ad_nrt + # # ... + # in :ae_trn + # # ... + # in :ar_cuit + # # ... + # in :eu_vat + # # ... + # in :au_abn + # # ... + # in ... + # #... + # end + # ``` + class Type < Orb::Enum + AD_NRT = :ad_nrt + AE_TRN = :ae_trn + AR_CUIT = :ar_cuit + EU_VAT = :eu_vat + AU_ABN = :au_abn + AU_ARN = :au_arn + BG_UIC = :bg_uic + BH_VAT = :bh_vat + BO_TIN = :bo_tin + BR_CNPJ = :br_cnpj + BR_CPF = :br_cpf + CA_BN = :ca_bn + CA_GST_HST = :ca_gst_hst + CA_PST_BC = :ca_pst_bc + CA_PST_MB = :ca_pst_mb + CA_PST_SK = :ca_pst_sk + CA_QST = :ca_qst + CH_VAT = :ch_vat + CL_TIN = :cl_tin + CN_TIN = :cn_tin + CO_NIT = :co_nit + CR_TIN = :cr_tin + DO_RCN = :do_rcn + EC_RUC = :ec_ruc + EG_TIN = :eg_tin + ES_CIF = :es_cif + EU_OSS_VAT = :eu_oss_vat + GB_VAT = :gb_vat + GE_VAT = :ge_vat + HK_BR = :hk_br + HU_TIN = :hu_tin + ID_NPWP = :id_npwp + IL_VAT = :il_vat + IN_GST = :in_gst + IS_VAT = :is_vat + JP_CN = :jp_cn + JP_RN = :jp_rn + JP_TRN = :jp_trn + KE_PIN = :ke_pin + KR_BRN = :kr_brn + KZ_BIN = :kz_bin + LI_UID = :li_uid + MX_RFC = :mx_rfc + MY_FRP = :my_frp + MY_ITN = :my_itn + MY_SST = :my_sst + NG_TIN = :ng_tin + NO_VAT = :no_vat + NO_VOEC = :no_voec + NZ_GST = :nz_gst + OM_VAT = :om_vat + PE_RUC = :pe_ruc + PH_TIN = :ph_tin + RO_TIN = :ro_tin + RS_PIB = :rs_pib + RU_INN = :ru_inn + RU_KPP = :ru_kpp + SA_VAT = :sa_vat + SG_GST = :sg_gst + SG_UEN = :sg_uen + SI_TIN = :si_tin + SV_NIT = :sv_nit + TH_VAT = :th_vat + TR_TIN = :tr_tin + TW_VAT = :tw_vat + UA_VAT = :ua_vat + US_EIN = :us_ein + UY_RUC = :uy_ruc + VE_RIF = :ve_rif + VN_TIN = :vn_tin + ZA_VAT = :za_vat + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end end end diff --git a/lib/orb/models/customer_update_params.rb b/lib/orb/models/customer_update_params.rb index 9ba9d0b8..c929f0ae 100644 --- a/lib/orb/models/customer_update_params.rb +++ b/lib/orb/models/customer_update_params.rb @@ -2,17 +2,902 @@ module Orb module Models - class CustomerUpdateParams < Orb::Models::EditCustomerModel + class CustomerUpdateParams < Orb::BaseModel # @!parse # extend Orb::RequestParameters::Converter include Orb::RequestParameters + # @!attribute accounting_sync_configuration + # + # @return [Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration, nil] + optional :accounting_sync_configuration, + -> { Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration }, + nil?: true + + # @!attribute additional_emails + # Additional email addresses for this customer. If populated, these email + # addresses will be CC'd for customer communications. + # + # @return [Array, nil] + optional :additional_emails, Orb::ArrayOf[String], nil?: true + + # @!attribute auto_collection + # Used to determine if invoices for this customer will automatically attempt to + # charge a saved payment method, if available. This parameter defaults to `True` + # when a payment provider is provided on customer creation. + # + # @return [Boolean, nil] + optional :auto_collection, Orb::BooleanModel, nil?: true + + # @!attribute billing_address + # + # @return [Orb::Models::CustomerUpdateParams::BillingAddress, nil] + optional :billing_address, -> { Orb::Models::CustomerUpdateParams::BillingAddress }, nil?: true + + # @!attribute currency + # An ISO 4217 currency string used for the customer's invoices and balance. If not + # set at creation time, will be set at subscription creation time. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute email + # A valid customer email, to be used for invoicing and notifications. + # + # @return [String, nil] + optional :email, String, nil?: true + + # @!attribute email_delivery + # + # @return [Boolean, nil] + optional :email_delivery, Orb::BooleanModel, nil?: true + + # @!attribute external_customer_id + # The external customer ID. This can only be set if empty and the customer has no + # past or current subscriptions. + # + # @return [String, nil] + optional :external_customer_id, String, nil?: true + + # @!attribute hierarchy + # The hierarchical relationships for this customer. + # + # @return [Orb::Models::CustomerUpdateParams::Hierarchy, nil] + optional :hierarchy, -> { Orb::Models::CustomerUpdateParams::Hierarchy }, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute name + # The full name of the customer + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute payment_provider + # This is used for creating charges or invoices in an external system via Orb. + # When not in test mode: + # + # - the connection must first be configured in the Orb webapp. + # - if the provider is an invoicing provider (`stripe_invoice`, `quickbooks`, + # `bill.com`, `netsuite`), any product mappings must first be configured with + # the Orb team. + # + # @return [Symbol, Orb::Models::CustomerUpdateParams::PaymentProvider, nil] + optional :payment_provider, enum: -> { Orb::Models::CustomerUpdateParams::PaymentProvider }, nil?: true + + # @!attribute payment_provider_id + # The ID of this customer in an external payments solution, such as Stripe. This + # is used for creating charges or invoices in the external system via Orb. + # + # @return [String, nil] + optional :payment_provider_id, String, nil?: true + + # @!attribute reporting_configuration + # + # @return [Orb::Models::CustomerUpdateParams::ReportingConfiguration, nil] + optional :reporting_configuration, + -> { Orb::Models::CustomerUpdateParams::ReportingConfiguration }, + nil?: true + + # @!attribute shipping_address + # + # @return [Orb::Models::CustomerUpdateParams::ShippingAddress, nil] + optional :shipping_address, -> { Orb::Models::CustomerUpdateParams::ShippingAddress }, nil?: true + + # @!attribute tax_configuration + # + # @return [Orb::Models::CustomerUpdateParams::TaxConfiguration::NewAvalaraTaxConfiguration, Orb::Models::CustomerUpdateParams::TaxConfiguration::NewTaxJarConfiguration, nil] + optional :tax_configuration, union: -> { Orb::Models::CustomerUpdateParams::TaxConfiguration }, nil?: true + + # @!attribute tax_id + # Tax IDs are commonly required to be displayed on customer invoices, which are + # added to the headers of invoices. + # + # ### Supported Tax ID Countries and Types + # + # | Country | Type | Description | + # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | + # | Andorra | `ad_nrt` | Andorran NRT Number | + # | Argentina | `ar_cuit` | Argentinian Tax ID Number | + # | Australia | `au_abn` | Australian Business Number (AU ABN) | + # | Australia | `au_arn` | Australian Taxation Office Reference Number | + # | Austria | `eu_vat` | European VAT Number | + # | Bahrain | `bh_vat` | Bahraini VAT Number | + # | Belgium | `eu_vat` | European VAT Number | + # | Bolivia | `bo_tin` | Bolivian Tax ID | + # | Brazil | `br_cnpj` | Brazilian CNPJ Number | + # | Brazil | `br_cpf` | Brazilian CPF Number | + # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | + # | Bulgaria | `eu_vat` | European VAT Number | + # | Canada | `ca_bn` | Canadian BN | + # | Canada | `ca_gst_hst` | Canadian GST/HST Number | + # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | + # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | + # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | + # | Canada | `ca_qst` | Canadian QST Number (Québec) | + # | Chile | `cl_tin` | Chilean TIN | + # | China | `cn_tin` | Chinese Tax ID | + # | Colombia | `co_nit` | Colombian NIT Number | + # | Costa Rica | `cr_tin` | Costa Rican Tax ID | + # | Croatia | `eu_vat` | European VAT Number | + # | Cyprus | `eu_vat` | European VAT Number | + # | Czech Republic | `eu_vat` | European VAT Number | + # | Denmark | `eu_vat` | European VAT Number | + # | Dominican Republic | `do_rcn` | Dominican RCN Number | + # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | + # | Egypt | `eg_tin` | Egyptian Tax Identification Number | + # | El Salvador | `sv_nit` | El Salvadorian NIT Number | + # | Estonia | `eu_vat` | European VAT Number | + # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Finland | `eu_vat` | European VAT Number | + # | France | `eu_vat` | European VAT Number | + # | Georgia | `ge_vat` | Georgian VAT | + # | Germany | `eu_vat` | European VAT Number | + # | Greece | `eu_vat` | European VAT Number | + # | Hong Kong | `hk_br` | Hong Kong BR Number | + # | Hungary | `eu_vat` | European VAT Number | + # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | + # | Iceland | `is_vat` | Icelandic VAT | + # | India | `in_gst` | Indian GST Number | + # | Indonesia | `id_npwp` | Indonesian NPWP Number | + # | Ireland | `eu_vat` | European VAT Number | + # | Israel | `il_vat` | Israel VAT | + # | Italy | `eu_vat` | European VAT Number | + # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | + # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | + # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | + # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | + # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | + # | Latvia | `eu_vat` | European VAT Number | + # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | + # | Lithuania | `eu_vat` | European VAT Number | + # | Luxembourg | `eu_vat` | European VAT Number | + # | Malaysia | `my_frp` | Malaysian FRP Number | + # | Malaysia | `my_itn` | Malaysian ITN | + # | Malaysia | `my_sst` | Malaysian SST Number | + # | Malta | `eu_vat ` | European VAT Number | + # | Mexico | `mx_rfc` | Mexican RFC Number | + # | Netherlands | `eu_vat` | European VAT Number | + # | New Zealand | `nz_gst` | New Zealand GST Number | + # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | + # | Norway | `no_vat` | Norwegian VAT Number | + # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | + # | Oman | `om_vat` | Omani VAT Number | + # | Peru | `pe_ruc` | Peruvian RUC Number | + # | Philippines | `ph_tin ` | Philippines Tax Identification Number | + # | Poland | `eu_vat` | European VAT Number | + # | Portugal | `eu_vat` | European VAT Number | + # | Romania | `eu_vat` | European VAT Number | + # | Romania | `ro_tin` | Romanian Tax ID Number | + # | Russia | `ru_inn` | Russian INN | + # | Russia | `ru_kpp` | Russian KPP | + # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | + # | Serbia | `rs_pib` | Serbian PIB Number | + # | Singapore | `sg_gst` | Singaporean GST | + # | Singapore | `sg_uen` | Singaporean UEN | + # | Slovakia | `eu_vat` | European VAT Number | + # | Slovenia | `eu_vat` | European VAT Number | + # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | + # | South Africa | `za_vat` | South African VAT Number | + # | South Korea | `kr_brn` | Korean BRN | + # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | + # | Spain | `eu_vat` | European VAT Number | + # | Sweden | `eu_vat` | European VAT Number | + # | Switzerland | `ch_vat` | Switzerland VAT Number | + # | Taiwan | `tw_vat` | Taiwanese VAT | + # | Thailand | `th_vat` | Thai VAT | + # | Turkey | `tr_tin` | Turkish Tax Identification Number | + # | Ukraine | `ua_vat` | Ukrainian VAT | + # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | + # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | + # | United Kingdom | `gb_vat` | United Kingdom VAT Number | + # | United States | `us_ein` | United States EIN | + # | Uruguay | `uy_ruc` | Uruguayan RUC Number | + # | Venezuela | `ve_rif` | Venezuelan RIF Number | + # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | + # + # @return [Orb::Models::CustomerUpdateParams::TaxID, nil] + optional :tax_id, -> { Orb::Models::CustomerUpdateParams::TaxID }, nil?: true + # @!parse + # # @param accounting_sync_configuration [Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration, nil] + # # @param additional_emails [Array, nil] + # # @param auto_collection [Boolean, nil] + # # @param billing_address [Orb::Models::CustomerUpdateParams::BillingAddress, nil] + # # @param currency [String, nil] + # # @param email [String, nil] + # # @param email_delivery [Boolean, nil] + # # @param external_customer_id [String, nil] + # # @param hierarchy [Orb::Models::CustomerUpdateParams::Hierarchy, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param name [String, nil] + # # @param payment_provider [Symbol, Orb::Models::CustomerUpdateParams::PaymentProvider, nil] + # # @param payment_provider_id [String, nil] + # # @param reporting_configuration [Orb::Models::CustomerUpdateParams::ReportingConfiguration, nil] + # # @param shipping_address [Orb::Models::CustomerUpdateParams::ShippingAddress, nil] + # # @param tax_configuration [Orb::Models::CustomerUpdateParams::TaxConfiguration::NewAvalaraTaxConfiguration, Orb::Models::CustomerUpdateParams::TaxConfiguration::NewTaxJarConfiguration, nil] + # # @param tax_id [Orb::Models::CustomerUpdateParams::TaxID, nil] # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] # # - # def initialize(request_options: {}, **) = super + # def initialize( + # accounting_sync_configuration: nil, + # additional_emails: nil, + # auto_collection: nil, + # billing_address: nil, + # currency: nil, + # email: nil, + # email_delivery: nil, + # external_customer_id: nil, + # hierarchy: nil, + # metadata: nil, + # name: nil, + # payment_provider: nil, + # payment_provider_id: nil, + # reporting_configuration: nil, + # shipping_address: nil, + # tax_configuration: nil, + # tax_id: nil, + # request_options: {}, + # ** + # ) + # super + # end # def initialize: (Hash | Orb::BaseModel) -> void + + class AccountingSyncConfiguration < Orb::BaseModel + # @!attribute accounting_providers + # + # @return [Array, nil] + optional :accounting_providers, + -> { Orb::ArrayOf[Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration::AccountingProvider] }, + nil?: true + + # @!attribute excluded + # + # @return [Boolean, nil] + optional :excluded, Orb::BooleanModel, nil?: true + + # @!parse + # # @param accounting_providers [Array, nil] + # # @param excluded [Boolean, nil] + # # + # def initialize(accounting_providers: nil, excluded: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class AccountingProvider < Orb::BaseModel + # @!attribute external_provider_id + # + # @return [String] + required :external_provider_id, String + + # @!attribute provider_type + # + # @return [String] + required :provider_type, String + + # @!parse + # # @param external_provider_id [String] + # # @param provider_type [String] + # # + # def initialize(external_provider_id:, provider_type:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class BillingAddress < Orb::BaseModel + # @!attribute city + # + # @return [String, nil] + optional :city, String, nil?: true + + # @!attribute country + # + # @return [String, nil] + optional :country, String, nil?: true + + # @!attribute line1 + # + # @return [String, nil] + optional :line1, String, nil?: true + + # @!attribute line2 + # + # @return [String, nil] + optional :line2, String, nil?: true + + # @!attribute postal_code + # + # @return [String, nil] + optional :postal_code, String, nil?: true + + # @!attribute state + # + # @return [String, nil] + optional :state, String, nil?: true + + # @!parse + # # @param city [String, nil] + # # @param country [String, nil] + # # @param line1 [String, nil] + # # @param line2 [String, nil] + # # @param postal_code [String, nil] + # # @param state [String, nil] + # # + # def initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Hierarchy < Orb::BaseModel + # @!attribute [r] child_customer_ids + # A list of child customer IDs to add to the hierarchy. The desired child + # customers must not already be part of another hierarchy. + # + # @return [Array, nil] + optional :child_customer_ids, Orb::ArrayOf[String] + + # @!parse + # # @return [Array] + # attr_writer :child_customer_ids + + # @!attribute parent_customer_id + # The ID of the parent customer in the hierarchy. The desired parent customer must + # not be a child of another customer. + # + # @return [String, nil] + optional :parent_customer_id, String, nil?: true + + # @!parse + # # The hierarchical relationships for this customer. + # # + # # @param child_customer_ids [Array] + # # @param parent_customer_id [String, nil] + # # + # def initialize(child_customer_ids: nil, parent_customer_id: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # This is used for creating charges or invoices in an external system via Orb. + # When not in test mode: + # + # - the connection must first be configured in the Orb webapp. + # - if the provider is an invoicing provider (`stripe_invoice`, `quickbooks`, + # `bill.com`, `netsuite`), any product mappings must first be configured with + # the Orb team. + # + # @example + # ```ruby + # case payment_provider + # in :quickbooks + # # ... + # in :"bill.com" + # # ... + # in :stripe_charge + # # ... + # in :stripe_invoice + # # ... + # in :netsuite + # # ... + # end + # ``` + class PaymentProvider < Orb::Enum + QUICKBOOKS = :quickbooks + BILL_COM = :"bill.com" + STRIPE_CHARGE = :stripe_charge + STRIPE_INVOICE = :stripe_invoice + NETSUITE = :netsuite + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class ReportingConfiguration < Orb::BaseModel + # @!attribute exempt + # + # @return [Boolean] + required :exempt, Orb::BooleanModel + + # @!parse + # # @param exempt [Boolean] + # # + # def initialize(exempt:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class ShippingAddress < Orb::BaseModel + # @!attribute city + # + # @return [String, nil] + optional :city, String, nil?: true + + # @!attribute country + # + # @return [String, nil] + optional :country, String, nil?: true + + # @!attribute line1 + # + # @return [String, nil] + optional :line1, String, nil?: true + + # @!attribute line2 + # + # @return [String, nil] + optional :line2, String, nil?: true + + # @!attribute postal_code + # + # @return [String, nil] + optional :postal_code, String, nil?: true + + # @!attribute state + # + # @return [String, nil] + optional :state, String, nil?: true + + # @!parse + # # @param city [String, nil] + # # @param country [String, nil] + # # @param line1 [String, nil] + # # @param line2 [String, nil] + # # @param postal_code [String, nil] + # # @param state [String, nil] + # # + # def initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case tax_configuration + # in {tax_provider: "avalara", tax_exempt: Orb::BooleanModel, tax_exemption_code: String} + # # Orb::Models::CustomerUpdateParams::TaxConfiguration::NewAvalaraTaxConfiguration ... + # in {tax_provider: "taxjar", tax_exempt: Orb::BooleanModel} + # # Orb::Models::CustomerUpdateParams::TaxConfiguration::NewTaxJarConfiguration ... + # end + # ``` + # + # @example + # ```ruby + # case tax_configuration + # in Orb::Models::CustomerUpdateParams::TaxConfiguration::NewAvalaraTaxConfiguration + # # ... + # in Orb::Models::CustomerUpdateParams::TaxConfiguration::NewTaxJarConfiguration + # # ... + # end + # ``` + class TaxConfiguration < Orb::Union + discriminator :tax_provider + + variant :avalara, -> { Orb::Models::CustomerUpdateParams::TaxConfiguration::NewAvalaraTaxConfiguration } + + variant :taxjar, -> { Orb::Models::CustomerUpdateParams::TaxConfiguration::NewTaxJarConfiguration } + + class NewAvalaraTaxConfiguration < Orb::BaseModel + # @!attribute tax_exempt + # + # @return [Boolean] + required :tax_exempt, Orb::BooleanModel + + # @!attribute tax_provider + # + # @return [Symbol, :avalara] + required :tax_provider, const: :avalara + + # @!attribute tax_exemption_code + # + # @return [String, nil] + optional :tax_exemption_code, String, nil?: true + + # @!parse + # # @param tax_exempt [Boolean] + # # @param tax_exemption_code [String, nil] + # # @param tax_provider [Symbol, :avalara] + # # + # def initialize(tax_exempt:, tax_exemption_code: nil, tax_provider: :avalara, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class NewTaxJarConfiguration < Orb::BaseModel + # @!attribute tax_exempt + # + # @return [Boolean] + required :tax_exempt, Orb::BooleanModel + + # @!attribute tax_provider + # + # @return [Symbol, :taxjar] + required :tax_provider, const: :taxjar + + # @!parse + # # @param tax_exempt [Boolean] + # # @param tax_provider [Symbol, :taxjar] + # # + # def initialize(tax_exempt:, tax_provider: :taxjar, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class TaxID < Orb::BaseModel + # @!attribute country + # + # @return [Symbol, Orb::Models::CustomerUpdateParams::TaxID::Country] + required :country, enum: -> { Orb::Models::CustomerUpdateParams::TaxID::Country } + + # @!attribute type + # + # @return [Symbol, Orb::Models::CustomerUpdateParams::TaxID::Type] + required :type, enum: -> { Orb::Models::CustomerUpdateParams::TaxID::Type } + + # @!attribute value + # + # @return [String] + required :value, String + + # @!parse + # # Tax IDs are commonly required to be displayed on customer invoices, which are + # # added to the headers of invoices. + # # + # # ### Supported Tax ID Countries and Types + # # + # # | Country | Type | Description | + # # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | + # # | Andorra | `ad_nrt` | Andorran NRT Number | + # # | Argentina | `ar_cuit` | Argentinian Tax ID Number | + # # | Australia | `au_abn` | Australian Business Number (AU ABN) | + # # | Australia | `au_arn` | Australian Taxation Office Reference Number | + # # | Austria | `eu_vat` | European VAT Number | + # # | Bahrain | `bh_vat` | Bahraini VAT Number | + # # | Belgium | `eu_vat` | European VAT Number | + # # | Bolivia | `bo_tin` | Bolivian Tax ID | + # # | Brazil | `br_cnpj` | Brazilian CNPJ Number | + # # | Brazil | `br_cpf` | Brazilian CPF Number | + # # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | + # # | Bulgaria | `eu_vat` | European VAT Number | + # # | Canada | `ca_bn` | Canadian BN | + # # | Canada | `ca_gst_hst` | Canadian GST/HST Number | + # # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | + # # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | + # # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | + # # | Canada | `ca_qst` | Canadian QST Number (Québec) | + # # | Chile | `cl_tin` | Chilean TIN | + # # | China | `cn_tin` | Chinese Tax ID | + # # | Colombia | `co_nit` | Colombian NIT Number | + # # | Costa Rica | `cr_tin` | Costa Rican Tax ID | + # # | Croatia | `eu_vat` | European VAT Number | + # # | Cyprus | `eu_vat` | European VAT Number | + # # | Czech Republic | `eu_vat` | European VAT Number | + # # | Denmark | `eu_vat` | European VAT Number | + # # | Dominican Republic | `do_rcn` | Dominican RCN Number | + # # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | + # # | Egypt | `eg_tin` | Egyptian Tax Identification Number | + # # | El Salvador | `sv_nit` | El Salvadorian NIT Number | + # # | Estonia | `eu_vat` | European VAT Number | + # # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # # | Finland | `eu_vat` | European VAT Number | + # # | France | `eu_vat` | European VAT Number | + # # | Georgia | `ge_vat` | Georgian VAT | + # # | Germany | `eu_vat` | European VAT Number | + # # | Greece | `eu_vat` | European VAT Number | + # # | Hong Kong | `hk_br` | Hong Kong BR Number | + # # | Hungary | `eu_vat` | European VAT Number | + # # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | + # # | Iceland | `is_vat` | Icelandic VAT | + # # | India | `in_gst` | Indian GST Number | + # # | Indonesia | `id_npwp` | Indonesian NPWP Number | + # # | Ireland | `eu_vat` | European VAT Number | + # # | Israel | `il_vat` | Israel VAT | + # # | Italy | `eu_vat` | European VAT Number | + # # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | + # # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | + # # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | + # # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | + # # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | + # # | Latvia | `eu_vat` | European VAT Number | + # # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | + # # | Lithuania | `eu_vat` | European VAT Number | + # # | Luxembourg | `eu_vat` | European VAT Number | + # # | Malaysia | `my_frp` | Malaysian FRP Number | + # # | Malaysia | `my_itn` | Malaysian ITN | + # # | Malaysia | `my_sst` | Malaysian SST Number | + # # | Malta | `eu_vat ` | European VAT Number | + # # | Mexico | `mx_rfc` | Mexican RFC Number | + # # | Netherlands | `eu_vat` | European VAT Number | + # # | New Zealand | `nz_gst` | New Zealand GST Number | + # # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | + # # | Norway | `no_vat` | Norwegian VAT Number | + # # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | + # # | Oman | `om_vat` | Omani VAT Number | + # # | Peru | `pe_ruc` | Peruvian RUC Number | + # # | Philippines | `ph_tin ` | Philippines Tax Identification Number | + # # | Poland | `eu_vat` | European VAT Number | + # # | Portugal | `eu_vat` | European VAT Number | + # # | Romania | `eu_vat` | European VAT Number | + # # | Romania | `ro_tin` | Romanian Tax ID Number | + # # | Russia | `ru_inn` | Russian INN | + # # | Russia | `ru_kpp` | Russian KPP | + # # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | + # # | Serbia | `rs_pib` | Serbian PIB Number | + # # | Singapore | `sg_gst` | Singaporean GST | + # # | Singapore | `sg_uen` | Singaporean UEN | + # # | Slovakia | `eu_vat` | European VAT Number | + # # | Slovenia | `eu_vat` | European VAT Number | + # # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | + # # | South Africa | `za_vat` | South African VAT Number | + # # | South Korea | `kr_brn` | Korean BRN | + # # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | + # # | Spain | `eu_vat` | European VAT Number | + # # | Sweden | `eu_vat` | European VAT Number | + # # | Switzerland | `ch_vat` | Switzerland VAT Number | + # # | Taiwan | `tw_vat` | Taiwanese VAT | + # # | Thailand | `th_vat` | Thai VAT | + # # | Turkey | `tr_tin` | Turkish Tax Identification Number | + # # | Ukraine | `ua_vat` | Ukrainian VAT | + # # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | + # # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | + # # | United Kingdom | `gb_vat` | United Kingdom VAT Number | + # # | United States | `us_ein` | United States EIN | + # # | Uruguay | `uy_ruc` | Uruguayan RUC Number | + # # | Venezuela | `ve_rif` | Venezuelan RIF Number | + # # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | + # # + # # @param country [Symbol, Orb::Models::CustomerUpdateParams::TaxID::Country] + # # @param type [Symbol, Orb::Models::CustomerUpdateParams::TaxID::Type] + # # @param value [String] + # # + # def initialize(country:, type:, value:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case country + # in :AD + # # ... + # in :AE + # # ... + # in :AR + # # ... + # in :AT + # # ... + # in :AU + # # ... + # in ... + # #... + # end + # ``` + class Country < Orb::Enum + AD = :AD + AE = :AE + AR = :AR + AT = :AT + AU = :AU + BE = :BE + BG = :BG + BH = :BH + BO = :BO + BR = :BR + CA = :CA + CH = :CH + CL = :CL + CN = :CN + CO = :CO + CR = :CR + CY = :CY + CZ = :CZ + DE = :DE + DK = :DK + EE = :EE + DO = :DO + EC = :EC + EG = :EG + ES = :ES + EU = :EU + FI = :FI + FR = :FR + GB = :GB + GE = :GE + GR = :GR + HK = :HK + HR = :HR + HU = :HU + ID = :ID + IE = :IE + IL = :IL + IN = :IN + IS = :IS + IT = :IT + JP = :JP + KE = :KE + KR = :KR + KZ = :KZ + LI = :LI + LT = :LT + LU = :LU + LV = :LV + MT = :MT + MX = :MX + MY = :MY + NG = :NG + NL = :NL + NO = :NO + NZ = :NZ + OM = :OM + PE = :PE + PH = :PH + PL = :PL + PT = :PT + RO = :RO + RS = :RS + RU = :RU + SA = :SA + SE = :SE + SG = :SG + SI = :SI + SK = :SK + SV = :SV + TH = :TH + TR = :TR + TW = :TW + UA = :UA + US = :US + UY = :UY + VE = :VE + VN = :VN + ZA = :ZA + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + # @abstract + # + # @example + # ```ruby + # case type + # in :ad_nrt + # # ... + # in :ae_trn + # # ... + # in :ar_cuit + # # ... + # in :eu_vat + # # ... + # in :au_abn + # # ... + # in ... + # #... + # end + # ``` + class Type < Orb::Enum + AD_NRT = :ad_nrt + AE_TRN = :ae_trn + AR_CUIT = :ar_cuit + EU_VAT = :eu_vat + AU_ABN = :au_abn + AU_ARN = :au_arn + BG_UIC = :bg_uic + BH_VAT = :bh_vat + BO_TIN = :bo_tin + BR_CNPJ = :br_cnpj + BR_CPF = :br_cpf + CA_BN = :ca_bn + CA_GST_HST = :ca_gst_hst + CA_PST_BC = :ca_pst_bc + CA_PST_MB = :ca_pst_mb + CA_PST_SK = :ca_pst_sk + CA_QST = :ca_qst + CH_VAT = :ch_vat + CL_TIN = :cl_tin + CN_TIN = :cn_tin + CO_NIT = :co_nit + CR_TIN = :cr_tin + DO_RCN = :do_rcn + EC_RUC = :ec_ruc + EG_TIN = :eg_tin + ES_CIF = :es_cif + EU_OSS_VAT = :eu_oss_vat + GB_VAT = :gb_vat + GE_VAT = :ge_vat + HK_BR = :hk_br + HU_TIN = :hu_tin + ID_NPWP = :id_npwp + IL_VAT = :il_vat + IN_GST = :in_gst + IS_VAT = :is_vat + JP_CN = :jp_cn + JP_RN = :jp_rn + JP_TRN = :jp_trn + KE_PIN = :ke_pin + KR_BRN = :kr_brn + KZ_BIN = :kz_bin + LI_UID = :li_uid + MX_RFC = :mx_rfc + MY_FRP = :my_frp + MY_ITN = :my_itn + MY_SST = :my_sst + NG_TIN = :ng_tin + NO_VAT = :no_vat + NO_VOEC = :no_voec + NZ_GST = :nz_gst + OM_VAT = :om_vat + PE_RUC = :pe_ruc + PH_TIN = :ph_tin + RO_TIN = :ro_tin + RS_PIB = :rs_pib + RU_INN = :ru_inn + RU_KPP = :ru_kpp + SA_VAT = :sa_vat + SG_GST = :sg_gst + SG_UEN = :sg_uen + SI_TIN = :si_tin + SV_NIT = :sv_nit + TH_VAT = :th_vat + TR_TIN = :tr_tin + TW_VAT = :tw_vat + UA_VAT = :ua_vat + US_EIN = :us_ein + UY_RUC = :uy_ruc + VE_RIF = :ve_rif + VN_TIN = :vn_tin + ZA_VAT = :za_vat + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end end end diff --git a/lib/orb/models/customers/balance_transaction_create_response.rb b/lib/orb/models/customers/balance_transaction_create_response.rb new file mode 100644 index 00000000..feb8477d --- /dev/null +++ b/lib/orb/models/customers/balance_transaction_create_response.rb @@ -0,0 +1,190 @@ +# frozen_string_literal: true + +module Orb + module Models + module Customers + class BalanceTransactionCreateResponse < Orb::BaseModel + # @!attribute id + # A unique id for this transaction. + # + # @return [String] + required :id, String + + # @!attribute action + # + # @return [Symbol, Orb::Models::Customers::BalanceTransactionCreateResponse::Action] + required :action, enum: -> { Orb::Models::Customers::BalanceTransactionCreateResponse::Action } + + # @!attribute amount + # The value of the amount changed in the transaction. + # + # @return [String] + required :amount, String + + # @!attribute created_at + # The creation time of this transaction. + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_note + # + # @return [Orb::Models::Customers::BalanceTransactionCreateResponse::CreditNote, nil] + required :credit_note, + -> { Orb::Models::Customers::BalanceTransactionCreateResponse::CreditNote }, + nil?: true + + # @!attribute description + # An optional description provided for manual customer balance adjustments. + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # The new value of the customer's balance prior to the transaction, in the + # customer's currency. + # + # @return [String] + required :ending_balance, String + + # @!attribute invoice + # + # @return [Orb::Models::Customers::BalanceTransactionCreateResponse::Invoice, nil] + required :invoice, -> { Orb::Models::Customers::BalanceTransactionCreateResponse::Invoice }, nil?: true + + # @!attribute starting_balance + # The original value of the customer's balance prior to the transaction, in the + # customer's currency. + # + # @return [String] + required :starting_balance, String + + # @!attribute type + # + # @return [Symbol, Orb::Models::Customers::BalanceTransactionCreateResponse::Type] + required :type, enum: -> { Orb::Models::Customers::BalanceTransactionCreateResponse::Type } + + # @!parse + # # @param id [String] + # # @param action [Symbol, Orb::Models::Customers::BalanceTransactionCreateResponse::Action] + # # @param amount [String] + # # @param created_at [Time] + # # @param credit_note [Orb::Models::Customers::BalanceTransactionCreateResponse::CreditNote, nil] + # # @param description [String, nil] + # # @param ending_balance [String] + # # @param invoice [Orb::Models::Customers::BalanceTransactionCreateResponse::Invoice, nil] + # # @param starting_balance [String] + # # @param type [Symbol, Orb::Models::Customers::BalanceTransactionCreateResponse::Type] + # # + # def initialize( + # id:, + # action:, + # amount:, + # created_at:, + # credit_note:, + # description:, + # ending_balance:, + # invoice:, + # starting_balance:, + # type:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case action + # in :applied_to_invoice + # # ... + # in :manual_adjustment + # # ... + # in :prorated_refund + # # ... + # in :revert_prorated_refund + # # ... + # in :return_from_voiding + # # ... + # in ... + # #... + # end + # ``` + class Action < Orb::Enum + APPLIED_TO_INVOICE = :applied_to_invoice + MANUAL_ADJUSTMENT = :manual_adjustment + PRORATED_REFUND = :prorated_refund + REVERT_PRORATED_REFUND = :revert_prorated_refund + RETURN_FROM_VOIDING = :return_from_voiding + CREDIT_NOTE_APPLIED = :credit_note_applied + CREDIT_NOTE_VOIDED = :credit_note_voided + OVERPAYMENT_REFUND = :overpayment_refund + EXTERNAL_PAYMENT = :external_payment + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class CreditNote < Orb::BaseModel + # @!attribute id + # The id of the Credit note + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Invoice < Orb::BaseModel + # @!attribute id + # The Invoice id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case type + # in :increment + # # ... + # in :decrement + # # ... + # end + # ``` + class Type < Orb::Enum + INCREMENT = :increment + DECREMENT = :decrement + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + end +end diff --git a/lib/orb/models/customers/balance_transaction_list_response.rb b/lib/orb/models/customers/balance_transaction_list_response.rb new file mode 100644 index 00000000..60af1576 --- /dev/null +++ b/lib/orb/models/customers/balance_transaction_list_response.rb @@ -0,0 +1,190 @@ +# frozen_string_literal: true + +module Orb + module Models + module Customers + class BalanceTransactionListResponse < Orb::BaseModel + # @!attribute id + # A unique id for this transaction. + # + # @return [String] + required :id, String + + # @!attribute action + # + # @return [Symbol, Orb::Models::Customers::BalanceTransactionListResponse::Action] + required :action, enum: -> { Orb::Models::Customers::BalanceTransactionListResponse::Action } + + # @!attribute amount + # The value of the amount changed in the transaction. + # + # @return [String] + required :amount, String + + # @!attribute created_at + # The creation time of this transaction. + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_note + # + # @return [Orb::Models::Customers::BalanceTransactionListResponse::CreditNote, nil] + required :credit_note, + -> { Orb::Models::Customers::BalanceTransactionListResponse::CreditNote }, + nil?: true + + # @!attribute description + # An optional description provided for manual customer balance adjustments. + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # The new value of the customer's balance prior to the transaction, in the + # customer's currency. + # + # @return [String] + required :ending_balance, String + + # @!attribute invoice + # + # @return [Orb::Models::Customers::BalanceTransactionListResponse::Invoice, nil] + required :invoice, -> { Orb::Models::Customers::BalanceTransactionListResponse::Invoice }, nil?: true + + # @!attribute starting_balance + # The original value of the customer's balance prior to the transaction, in the + # customer's currency. + # + # @return [String] + required :starting_balance, String + + # @!attribute type + # + # @return [Symbol, Orb::Models::Customers::BalanceTransactionListResponse::Type] + required :type, enum: -> { Orb::Models::Customers::BalanceTransactionListResponse::Type } + + # @!parse + # # @param id [String] + # # @param action [Symbol, Orb::Models::Customers::BalanceTransactionListResponse::Action] + # # @param amount [String] + # # @param created_at [Time] + # # @param credit_note [Orb::Models::Customers::BalanceTransactionListResponse::CreditNote, nil] + # # @param description [String, nil] + # # @param ending_balance [String] + # # @param invoice [Orb::Models::Customers::BalanceTransactionListResponse::Invoice, nil] + # # @param starting_balance [String] + # # @param type [Symbol, Orb::Models::Customers::BalanceTransactionListResponse::Type] + # # + # def initialize( + # id:, + # action:, + # amount:, + # created_at:, + # credit_note:, + # description:, + # ending_balance:, + # invoice:, + # starting_balance:, + # type:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case action + # in :applied_to_invoice + # # ... + # in :manual_adjustment + # # ... + # in :prorated_refund + # # ... + # in :revert_prorated_refund + # # ... + # in :return_from_voiding + # # ... + # in ... + # #... + # end + # ``` + class Action < Orb::Enum + APPLIED_TO_INVOICE = :applied_to_invoice + MANUAL_ADJUSTMENT = :manual_adjustment + PRORATED_REFUND = :prorated_refund + REVERT_PRORATED_REFUND = :revert_prorated_refund + RETURN_FROM_VOIDING = :return_from_voiding + CREDIT_NOTE_APPLIED = :credit_note_applied + CREDIT_NOTE_VOIDED = :credit_note_voided + OVERPAYMENT_REFUND = :overpayment_refund + EXTERNAL_PAYMENT = :external_payment + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class CreditNote < Orb::BaseModel + # @!attribute id + # The id of the Credit note + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Invoice < Orb::BaseModel + # @!attribute id + # The Invoice id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case type + # in :increment + # # ... + # in :decrement + # # ... + # end + # ``` + class Type < Orb::Enum + INCREMENT = :increment + DECREMENT = :decrement + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + end +end diff --git a/lib/orb/models/customers/cost_list_by_external_id_response.rb b/lib/orb/models/customers/cost_list_by_external_id_response.rb new file mode 100644 index 00000000..57b041d4 --- /dev/null +++ b/lib/orb/models/customers/cost_list_by_external_id_response.rb @@ -0,0 +1,105 @@ +# frozen_string_literal: true + +module Orb + module Models + module Customers + class CostListByExternalIDResponse < Orb::BaseModel + # @!attribute data + # + # @return [Array] + required :data, -> { Orb::ArrayOf[Orb::Models::Customers::CostListByExternalIDResponse::Data] } + + # @!parse + # # @param data [Array] + # # + # def initialize(data:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Data < Orb::BaseModel + # @!attribute per_price_costs + # + # @return [Array] + required :per_price_costs, + -> { Orb::ArrayOf[Orb::Models::Customers::CostListByExternalIDResponse::Data::PerPriceCost] } + + # @!attribute subtotal + # Total costs for the timeframe, excluding any minimums and discounts. + # + # @return [String] + required :subtotal, String + + # @!attribute timeframe_end + # + # @return [Time] + required :timeframe_end, Time + + # @!attribute timeframe_start + # + # @return [Time] + required :timeframe_start, Time + + # @!attribute total + # Total costs for the timeframe, including any minimums and discounts. + # + # @return [String] + required :total, String + + # @!parse + # # @param per_price_costs [Array] + # # @param subtotal [String] + # # @param timeframe_end [Time] + # # @param timeframe_start [Time] + # # @param total [String] + # # + # def initialize(per_price_costs:, subtotal:, timeframe_end:, timeframe_start:, total:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class PerPriceCost < Orb::BaseModel + # @!attribute price + # The price object + # + # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + required :price, union: -> { Orb::Models::Price } + + # @!attribute price_id + # The price the cost is associated with + # + # @return [String] + required :price_id, String + + # @!attribute subtotal + # Price's contributions for the timeframe, excluding any minimums and discounts. + # + # @return [String] + required :subtotal, String + + # @!attribute total + # Price's contributions for the timeframe, including minimums and discounts. + # + # @return [String] + required :total, String + + # @!attribute quantity + # The price's quantity for the timeframe + # + # @return [Float, nil] + optional :quantity, Float, nil?: true + + # @!parse + # # @param price [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + # # @param price_id [String] + # # @param subtotal [String] + # # @param total [String] + # # @param quantity [Float, nil] + # # + # def initialize(price:, price_id:, subtotal:, total:, quantity: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end + end + end +end diff --git a/lib/orb/models/customers/cost_list_response.rb b/lib/orb/models/customers/cost_list_response.rb new file mode 100644 index 00000000..a21bca75 --- /dev/null +++ b/lib/orb/models/customers/cost_list_response.rb @@ -0,0 +1,105 @@ +# frozen_string_literal: true + +module Orb + module Models + module Customers + class CostListResponse < Orb::BaseModel + # @!attribute data + # + # @return [Array] + required :data, -> { Orb::ArrayOf[Orb::Models::Customers::CostListResponse::Data] } + + # @!parse + # # @param data [Array] + # # + # def initialize(data:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Data < Orb::BaseModel + # @!attribute per_price_costs + # + # @return [Array] + required :per_price_costs, + -> { Orb::ArrayOf[Orb::Models::Customers::CostListResponse::Data::PerPriceCost] } + + # @!attribute subtotal + # Total costs for the timeframe, excluding any minimums and discounts. + # + # @return [String] + required :subtotal, String + + # @!attribute timeframe_end + # + # @return [Time] + required :timeframe_end, Time + + # @!attribute timeframe_start + # + # @return [Time] + required :timeframe_start, Time + + # @!attribute total + # Total costs for the timeframe, including any minimums and discounts. + # + # @return [String] + required :total, String + + # @!parse + # # @param per_price_costs [Array] + # # @param subtotal [String] + # # @param timeframe_end [Time] + # # @param timeframe_start [Time] + # # @param total [String] + # # + # def initialize(per_price_costs:, subtotal:, timeframe_end:, timeframe_start:, total:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class PerPriceCost < Orb::BaseModel + # @!attribute price + # The price object + # + # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + required :price, union: -> { Orb::Models::Price } + + # @!attribute price_id + # The price the cost is associated with + # + # @return [String] + required :price_id, String + + # @!attribute subtotal + # Price's contributions for the timeframe, excluding any minimums and discounts. + # + # @return [String] + required :subtotal, String + + # @!attribute total + # Price's contributions for the timeframe, including minimums and discounts. + # + # @return [String] + required :total, String + + # @!attribute quantity + # The price's quantity for the timeframe + # + # @return [Float, nil] + optional :quantity, Float, nil?: true + + # @!parse + # # @param price [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + # # @param price_id [String] + # # @param subtotal [String] + # # @param total [String] + # # @param quantity [Float, nil] + # # + # def initialize(price:, price_id:, subtotal:, total:, quantity: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end + end + end +end diff --git a/lib/orb/models/customer_credit_balances_model.rb b/lib/orb/models/customers/credit_list_by_external_id_response.rb similarity index 63% rename from lib/orb/models/customer_credit_balances_model.rb rename to lib/orb/models/customers/credit_list_by_external_id_response.rb index f0648a08..5a181d22 100644 --- a/lib/orb/models/customer_credit_balances_model.rb +++ b/lib/orb/models/customers/credit_list_by_external_id_response.rb @@ -2,26 +2,8 @@ module Orb module Models - class CustomerCreditBalancesModel < Orb::BaseModel - # @!attribute data - # - # @return [Array] - required :data, -> { Orb::ArrayOf[Orb::Models::CustomerCreditBalancesModel::Data] } - - # @!attribute pagination_metadata - # - # @return [Orb::Models::PaginationMetadata] - required :pagination_metadata, -> { Orb::Models::PaginationMetadata } - - # @!parse - # # @param data [Array] - # # @param pagination_metadata [Orb::Models::PaginationMetadata] - # # - # def initialize(data:, pagination_metadata:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - class Data < Orb::BaseModel + module Customers + class CreditListByExternalIDResponse < Orb::BaseModel # @!attribute id # # @return [String] @@ -54,8 +36,8 @@ class Data < Orb::BaseModel # @!attribute status # - # @return [Symbol, Orb::Models::CustomerCreditBalancesModel::Data::Status] - required :status, enum: -> { Orb::Models::CustomerCreditBalancesModel::Data::Status } + # @return [Symbol, Orb::Models::Customers::CreditListByExternalIDResponse::Status] + required :status, enum: -> { Orb::Models::Customers::CreditListByExternalIDResponse::Status } # @!parse # # @param id [String] @@ -64,7 +46,7 @@ class Data < Orb::BaseModel # # @param expiry_date [Time, nil] # # @param maximum_initial_balance [Float, nil] # # @param per_unit_cost_basis [String, nil] - # # @param status [Symbol, Orb::Models::CustomerCreditBalancesModel::Data::Status] + # # @param status [Symbol, Orb::Models::Customers::CreditListByExternalIDResponse::Status] # # # def initialize(id:, balance:, effective_date:, expiry_date:, maximum_initial_balance:, per_unit_cost_basis:, status:, **) = super diff --git a/lib/orb/models/customers/credit_list_response.rb b/lib/orb/models/customers/credit_list_response.rb new file mode 100644 index 00000000..3ad8dc03 --- /dev/null +++ b/lib/orb/models/customers/credit_list_response.rb @@ -0,0 +1,80 @@ +# frozen_string_literal: true + +module Orb + module Models + module Customers + class CreditListResponse < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute balance + # + # @return [Float] + required :balance, Float + + # @!attribute effective_date + # + # @return [Time, nil] + required :effective_date, Time, nil?: true + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute maximum_initial_balance + # + # @return [Float, nil] + required :maximum_initial_balance, Float, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!attribute status + # + # @return [Symbol, Orb::Models::Customers::CreditListResponse::Status] + required :status, enum: -> { Orb::Models::Customers::CreditListResponse::Status } + + # @!parse + # # @param id [String] + # # @param balance [Float] + # # @param effective_date [Time, nil] + # # @param expiry_date [Time, nil] + # # @param maximum_initial_balance [Float, nil] + # # @param per_unit_cost_basis [String, nil] + # # @param status [Symbol, Orb::Models::Customers::CreditListResponse::Status] + # # + # def initialize(id:, balance:, effective_date:, expiry_date:, maximum_initial_balance:, per_unit_cost_basis:, status:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case status + # in :active + # # ... + # in :pending_payment + # # ... + # end + # ``` + class Status < Orb::Enum + ACTIVE = :active + PENDING_PAYMENT = :pending_payment + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + end +end diff --git a/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb b/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb new file mode 100644 index 00000000..66400693 --- /dev/null +++ b/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb @@ -0,0 +1,1394 @@ +# frozen_string_literal: true + +module Orb + module Models + module Customers + module Credits + # @abstract + # + # The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid + # credits within Orb. + # + # @example + # ```ruby + # case ledger_create_entry_by_external_id_response + # in {entry_type: "increment", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry ... + # in {entry_type: "decrement", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry ... + # in {entry_type: "expiration_change", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry ... + # in {entry_type: "credit_block_expiry", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry ... + # in {entry_type: "void", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry ... + # in {entry_type: "void_initiated", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry ... + # in {entry_type: "amendment", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry ... + # end + # ``` + # + # @example + # ```ruby + # case ledger_create_entry_by_external_id_response + # in Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry + # # ... + # end + # ``` + class LedgerCreateEntryByExternalIDResponse < Orb::Union + discriminator :entry_type + + variant :increment, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry } + + variant :decrement, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry } + + variant :expiration_change, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry } + + variant :credit_block_expiry, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry } + + variant :void, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry } + + variant :void_initiated, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry } + + variant :amendment, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry } + + class IncrementLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :increment] + required :entry_type, const: :increment + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param starting_balance [Float] + # # @param entry_type [Symbol, :increment] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # starting_balance:, + # entry_type: :increment, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class DecrementLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :decrement] + required :entry_type, const: :decrement + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!attribute event_id + # + # @return [String, nil] + optional :event_id, String, nil?: true + + # @!attribute invoice_id + # + # @return [String, nil] + optional :invoice_id, String, nil?: true + + # @!attribute price_id + # + # @return [String, nil] + optional :price_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param starting_balance [Float] + # # @param event_id [String, nil] + # # @param invoice_id [String, nil] + # # @param price_id [String, nil] + # # @param entry_type [Symbol, :decrement] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # starting_balance:, + # event_id: nil, + # invoice_id: nil, + # price_id: nil, + # entry_type: :decrement, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class ExpirationChangeLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :expiration_change] + required :entry_type, const: :expiration_change + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute new_block_expiry_date + # + # @return [Time, nil] + required :new_block_expiry_date, Time, nil?: true + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param new_block_expiry_date [Time, nil] + # # @param starting_balance [Float] + # # @param entry_type [Symbol, :expiration_change] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # new_block_expiry_date:, + # starting_balance:, + # entry_type: :expiration_change, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class CreditBlockExpiryLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :credit_block_expiry] + required :entry_type, const: :credit_block_expiry + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param starting_balance [Float] + # # @param entry_type [Symbol, :credit_block_expiry] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # starting_balance:, + # entry_type: :credit_block_expiry, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class VoidLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :void] + required :entry_type, const: :void + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!attribute void_amount + # + # @return [Float] + required :void_amount, Float + + # @!attribute void_reason + # + # @return [String, nil] + required :void_reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param starting_balance [Float] + # # @param void_amount [Float] + # # @param void_reason [String, nil] + # # @param entry_type [Symbol, :void] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # starting_balance:, + # void_amount:, + # void_reason:, + # entry_type: :void, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class VoidInitiatedLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :void_initiated] + required :entry_type, const: :void_initiated + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute new_block_expiry_date + # + # @return [Time] + required :new_block_expiry_date, Time + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!attribute void_amount + # + # @return [Float] + required :void_amount, Float + + # @!attribute void_reason + # + # @return [String, nil] + required :void_reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param new_block_expiry_date [Time] + # # @param starting_balance [Float] + # # @param void_amount [Float] + # # @param void_reason [String, nil] + # # @param entry_type [Symbol, :void_initiated] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # new_block_expiry_date:, + # starting_balance:, + # void_amount:, + # void_reason:, + # entry_type: :void_initiated, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class AmendmentLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :amendment] + required :entry_type, const: :amendment + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param starting_balance [Float] + # # @param entry_type [Symbol, :amendment] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # starting_balance:, + # entry_type: :amendment, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + end + end + end +end diff --git a/lib/orb/models/customers/credits/ledger_create_entry_response.rb b/lib/orb/models/customers/credits/ledger_create_entry_response.rb new file mode 100644 index 00000000..a2746956 --- /dev/null +++ b/lib/orb/models/customers/credits/ledger_create_entry_response.rb @@ -0,0 +1,1393 @@ +# frozen_string_literal: true + +module Orb + module Models + module Customers + module Credits + # @abstract + # + # The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid + # credits within Orb. + # + # @example + # ```ruby + # case ledger_create_entry_response + # in {entry_type: "increment", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry ... + # in {entry_type: "decrement", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry ... + # in {entry_type: "expiration_change", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry ... + # in {entry_type: "credit_block_expiry", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry ... + # in {entry_type: "void", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry ... + # in {entry_type: "void_initiated", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry ... + # in {entry_type: "amendment", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry ... + # end + # ``` + # + # @example + # ```ruby + # case ledger_create_entry_response + # in Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry + # # ... + # end + # ``` + class LedgerCreateEntryResponse < Orb::Union + discriminator :entry_type + + variant :increment, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry } + + variant :decrement, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry } + + variant :expiration_change, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry } + + variant :credit_block_expiry, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry } + + variant :void, -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry } + + variant :void_initiated, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry } + + variant :amendment, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry } + + class IncrementLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :increment] + required :entry_type, const: :increment + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param starting_balance [Float] + # # @param entry_type [Symbol, :increment] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # starting_balance:, + # entry_type: :increment, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class DecrementLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :decrement] + required :entry_type, const: :decrement + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!attribute event_id + # + # @return [String, nil] + optional :event_id, String, nil?: true + + # @!attribute invoice_id + # + # @return [String, nil] + optional :invoice_id, String, nil?: true + + # @!attribute price_id + # + # @return [String, nil] + optional :price_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param starting_balance [Float] + # # @param event_id [String, nil] + # # @param invoice_id [String, nil] + # # @param price_id [String, nil] + # # @param entry_type [Symbol, :decrement] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # starting_balance:, + # event_id: nil, + # invoice_id: nil, + # price_id: nil, + # entry_type: :decrement, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class ExpirationChangeLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :expiration_change] + required :entry_type, const: :expiration_change + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute new_block_expiry_date + # + # @return [Time, nil] + required :new_block_expiry_date, Time, nil?: true + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param new_block_expiry_date [Time, nil] + # # @param starting_balance [Float] + # # @param entry_type [Symbol, :expiration_change] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # new_block_expiry_date:, + # starting_balance:, + # entry_type: :expiration_change, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class CreditBlockExpiryLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :credit_block_expiry] + required :entry_type, const: :credit_block_expiry + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param starting_balance [Float] + # # @param entry_type [Symbol, :credit_block_expiry] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # starting_balance:, + # entry_type: :credit_block_expiry, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class VoidLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :void] + required :entry_type, const: :void + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!attribute void_amount + # + # @return [Float] + required :void_amount, Float + + # @!attribute void_reason + # + # @return [String, nil] + required :void_reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param starting_balance [Float] + # # @param void_amount [Float] + # # @param void_reason [String, nil] + # # @param entry_type [Symbol, :void] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # starting_balance:, + # void_amount:, + # void_reason:, + # entry_type: :void, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class VoidInitiatedLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :void_initiated] + required :entry_type, const: :void_initiated + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute new_block_expiry_date + # + # @return [Time] + required :new_block_expiry_date, Time + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!attribute void_amount + # + # @return [Float] + required :void_amount, Float + + # @!attribute void_reason + # + # @return [String, nil] + required :void_reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param new_block_expiry_date [Time] + # # @param starting_balance [Float] + # # @param void_amount [Float] + # # @param void_reason [String, nil] + # # @param entry_type [Symbol, :void_initiated] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # new_block_expiry_date:, + # starting_balance:, + # void_amount:, + # void_reason:, + # entry_type: :void_initiated, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class AmendmentLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :amendment] + required :entry_type, const: :amendment + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param starting_balance [Float] + # # @param entry_type [Symbol, :amendment] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # starting_balance:, + # entry_type: :amendment, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + end + end + end +end diff --git a/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb b/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb new file mode 100644 index 00000000..34123314 --- /dev/null +++ b/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb @@ -0,0 +1,1393 @@ +# frozen_string_literal: true + +module Orb + module Models + module Customers + module Credits + # @abstract + # + # The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid + # credits within Orb. + # + # @example + # ```ruby + # case ledger_list_by_external_id_response + # in {entry_type: "increment", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry ... + # in {entry_type: "decrement", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry ... + # in {entry_type: "expiration_change", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry ... + # in {entry_type: "credit_block_expiry", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry ... + # in {entry_type: "void", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry ... + # in {entry_type: "void_initiated", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry ... + # in {entry_type: "amendment", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry ... + # end + # ``` + # + # @example + # ```ruby + # case ledger_list_by_external_id_response + # in Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry + # # ... + # end + # ``` + class LedgerListByExternalIDResponse < Orb::Union + discriminator :entry_type + + variant :increment, + -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry } + + variant :decrement, + -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry } + + variant :expiration_change, + -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry } + + variant :credit_block_expiry, + -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry } + + variant :void, -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry } + + variant :void_initiated, + -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry } + + variant :amendment, + -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry } + + class IncrementLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :increment] + required :entry_type, const: :increment + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param starting_balance [Float] + # # @param entry_type [Symbol, :increment] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # starting_balance:, + # entry_type: :increment, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class DecrementLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :decrement] + required :entry_type, const: :decrement + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!attribute event_id + # + # @return [String, nil] + optional :event_id, String, nil?: true + + # @!attribute invoice_id + # + # @return [String, nil] + optional :invoice_id, String, nil?: true + + # @!attribute price_id + # + # @return [String, nil] + optional :price_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param starting_balance [Float] + # # @param event_id [String, nil] + # # @param invoice_id [String, nil] + # # @param price_id [String, nil] + # # @param entry_type [Symbol, :decrement] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # starting_balance:, + # event_id: nil, + # invoice_id: nil, + # price_id: nil, + # entry_type: :decrement, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class ExpirationChangeLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :expiration_change] + required :entry_type, const: :expiration_change + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute new_block_expiry_date + # + # @return [Time, nil] + required :new_block_expiry_date, Time, nil?: true + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param new_block_expiry_date [Time, nil] + # # @param starting_balance [Float] + # # @param entry_type [Symbol, :expiration_change] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # new_block_expiry_date:, + # starting_balance:, + # entry_type: :expiration_change, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class CreditBlockExpiryLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :credit_block_expiry] + required :entry_type, const: :credit_block_expiry + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param starting_balance [Float] + # # @param entry_type [Symbol, :credit_block_expiry] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # starting_balance:, + # entry_type: :credit_block_expiry, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class VoidLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :void] + required :entry_type, const: :void + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!attribute void_amount + # + # @return [Float] + required :void_amount, Float + + # @!attribute void_reason + # + # @return [String, nil] + required :void_reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param starting_balance [Float] + # # @param void_amount [Float] + # # @param void_reason [String, nil] + # # @param entry_type [Symbol, :void] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # starting_balance:, + # void_amount:, + # void_reason:, + # entry_type: :void, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class VoidInitiatedLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :void_initiated] + required :entry_type, const: :void_initiated + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute new_block_expiry_date + # + # @return [Time] + required :new_block_expiry_date, Time + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!attribute void_amount + # + # @return [Float] + required :void_amount, Float + + # @!attribute void_reason + # + # @return [String, nil] + required :void_reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param new_block_expiry_date [Time] + # # @param starting_balance [Float] + # # @param void_amount [Float] + # # @param void_reason [String, nil] + # # @param entry_type [Symbol, :void_initiated] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # new_block_expiry_date:, + # starting_balance:, + # void_amount:, + # void_reason:, + # entry_type: :void_initiated, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class AmendmentLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :amendment] + required :entry_type, const: :amendment + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param starting_balance [Float] + # # @param entry_type [Symbol, :amendment] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # starting_balance:, + # entry_type: :amendment, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + end + end + end +end diff --git a/lib/orb/models/customers/credits/ledger_list_response.rb b/lib/orb/models/customers/credits/ledger_list_response.rb new file mode 100644 index 00000000..345e2f1f --- /dev/null +++ b/lib/orb/models/customers/credits/ledger_list_response.rb @@ -0,0 +1,1389 @@ +# frozen_string_literal: true + +module Orb + module Models + module Customers + module Credits + # @abstract + # + # The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid + # credits within Orb. + # + # @example + # ```ruby + # case ledger_list_response + # in {entry_type: "increment", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry ... + # in {entry_type: "decrement", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry ... + # in {entry_type: "expiration_change", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry ... + # in {entry_type: "credit_block_expiry", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry ... + # in {entry_type: "void", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry ... + # in {entry_type: "void_initiated", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry ... + # in {entry_type: "amendment", id: String, amount: Float, created_at: Time} + # # Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry ... + # end + # ``` + # + # @example + # ```ruby + # case ledger_list_response + # in Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry + # # ... + # in Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry + # # ... + # end + # ``` + class LedgerListResponse < Orb::Union + discriminator :entry_type + + variant :increment, -> { Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry } + + variant :decrement, -> { Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry } + + variant :expiration_change, + -> { Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry } + + variant :credit_block_expiry, + -> { Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry } + + variant :void, -> { Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry } + + variant :void_initiated, + -> { Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry } + + variant :amendment, -> { Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry } + + class IncrementLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :increment] + required :entry_type, const: :increment + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param starting_balance [Float] + # # @param entry_type [Symbol, :increment] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # starting_balance:, + # entry_type: :increment, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class DecrementLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :decrement] + required :entry_type, const: :decrement + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!attribute event_id + # + # @return [String, nil] + optional :event_id, String, nil?: true + + # @!attribute invoice_id + # + # @return [String, nil] + optional :invoice_id, String, nil?: true + + # @!attribute price_id + # + # @return [String, nil] + optional :price_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param starting_balance [Float] + # # @param event_id [String, nil] + # # @param invoice_id [String, nil] + # # @param price_id [String, nil] + # # @param entry_type [Symbol, :decrement] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # starting_balance:, + # event_id: nil, + # invoice_id: nil, + # price_id: nil, + # entry_type: :decrement, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class ExpirationChangeLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :expiration_change] + required :entry_type, const: :expiration_change + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute new_block_expiry_date + # + # @return [Time, nil] + required :new_block_expiry_date, Time, nil?: true + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param new_block_expiry_date [Time, nil] + # # @param starting_balance [Float] + # # @param entry_type [Symbol, :expiration_change] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # new_block_expiry_date:, + # starting_balance:, + # entry_type: :expiration_change, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class CreditBlockExpiryLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :credit_block_expiry] + required :entry_type, const: :credit_block_expiry + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param starting_balance [Float] + # # @param entry_type [Symbol, :credit_block_expiry] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # starting_balance:, + # entry_type: :credit_block_expiry, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class VoidLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::Customer] + required :customer, -> { Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :void] + required :entry_type, const: :void + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!attribute void_amount + # + # @return [Float] + required :void_amount, Float + + # @!attribute void_reason + # + # @return [String, nil] + required :void_reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param starting_balance [Float] + # # @param void_amount [Float] + # # @param void_reason [String, nil] + # # @param entry_type [Symbol, :void] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # starting_balance:, + # void_amount:, + # void_reason:, + # entry_type: :void, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class VoidInitiatedLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :void_initiated] + required :entry_type, const: :void_initiated + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute new_block_expiry_date + # + # @return [Time] + required :new_block_expiry_date, Time + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!attribute void_amount + # + # @return [Float] + required :void_amount, Float + + # @!attribute void_reason + # + # @return [String, nil] + required :void_reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param new_block_expiry_date [Time] + # # @param starting_balance [Float] + # # @param void_amount [Float] + # # @param void_reason [String, nil] + # # @param entry_type [Symbol, :void_initiated] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # new_block_expiry_date:, + # starting_balance:, + # void_amount:, + # void_reason:, + # entry_type: :void_initiated, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class AmendmentLedgerEntry < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # + # @return [Float] + required :amount, Float + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_block + # + # @return [Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::CreditBlock] + required :credit_block, + -> { Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::CreditBlock } + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute customer + # + # @return [Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::Customer] + required :customer, + -> { Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::Customer } + + # @!attribute description + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # + # @return [Float] + required :ending_balance, Float + + # @!attribute entry_status + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::EntryStatus] + required :entry_status, + enum: -> { Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::EntryStatus } + + # @!attribute entry_type + # + # @return [Symbol, :amendment] + required :entry_type, const: :amendment + + # @!attribute ledger_sequence_number + # + # @return [Integer] + required :ledger_sequence_number, Integer + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute starting_balance + # + # @return [Float] + required :starting_balance, Float + + # @!parse + # # @param id [String] + # # @param amount [Float] + # # @param created_at [Time] + # # @param credit_block [Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::CreditBlock] + # # @param currency [String] + # # @param customer [Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::Customer] + # # @param description [String, nil] + # # @param ending_balance [Float] + # # @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::EntryStatus] + # # @param ledger_sequence_number [Integer] + # # @param metadata [Hash{Symbol=>String}] + # # @param starting_balance [Float] + # # @param entry_type [Symbol, :amendment] + # # + # def initialize( + # id:, + # amount:, + # created_at:, + # credit_block:, + # currency:, + # customer:, + # description:, + # ending_balance:, + # entry_status:, + # ledger_sequence_number:, + # metadata:, + # starting_balance:, + # entry_type: :amendment, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class CreditBlock < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute expiry_date + # + # @return [Time, nil] + required :expiry_date, Time, nil?: true + + # @!attribute per_unit_cost_basis + # + # @return [String, nil] + required :per_unit_cost_basis, String, nil?: true + + # @!parse + # # @param id [String] + # # @param expiry_date [Time, nil] + # # @param per_unit_cost_basis [String, nil] + # # + # def initialize(id:, expiry_date:, per_unit_cost_basis:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case entry_status + # in :committed + # # ... + # in :pending + # # ... + # end + # ``` + class EntryStatus < Orb::Enum + COMMITTED = :committed + PENDING = :pending + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + end + end + end +end diff --git a/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb b/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb new file mode 100644 index 00000000..4b7bd4c9 --- /dev/null +++ b/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb @@ -0,0 +1,161 @@ +# frozen_string_literal: true + +module Orb + module Models + module Customers + module Credits + class TopUpCreateByExternalIDResponse < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # The amount to increment when the threshold is reached. + # + # @return [String] + required :amount, String + + # @!attribute currency + # The currency or custom pricing unit to use for this top-up. If this is a + # real-world currency, it must match the customer's invoicing currency. + # + # @return [String] + required :currency, String + + # @!attribute invoice_settings + # Settings for invoices generated by triggered top-ups. + # + # @return [Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::InvoiceSettings] + required :invoice_settings, + -> { Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::InvoiceSettings } + + # @!attribute per_unit_cost_basis + # How much, in the customer's currency, to charge for each unit. + # + # @return [String] + required :per_unit_cost_basis, String + + # @!attribute threshold + # The threshold at which to trigger the top-up. If the balance is at or below this + # threshold, the top-up will be triggered. + # + # @return [String] + required :threshold, String + + # @!attribute expires_after + # The number of days or months after which the top-up expires. If unspecified, it + # does not expire. + # + # @return [Integer, nil] + optional :expires_after, Integer, nil?: true + + # @!attribute expires_after_unit + # The unit of expires_after. + # + # @return [Symbol, Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::ExpiresAfterUnit, nil] + optional :expires_after_unit, + enum: -> { Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::ExpiresAfterUnit }, + nil?: true + + # @!parse + # # @param id [String] + # # @param amount [String] + # # @param currency [String] + # # @param invoice_settings [Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::InvoiceSettings] + # # @param per_unit_cost_basis [String] + # # @param threshold [String] + # # @param expires_after [Integer, nil] + # # @param expires_after_unit [Symbol, Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::ExpiresAfterUnit, nil] + # # + # def initialize( + # id:, + # amount:, + # currency:, + # invoice_settings:, + # per_unit_cost_basis:, + # threshold:, + # expires_after: nil, + # expires_after_unit: nil, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class InvoiceSettings < Orb::BaseModel + # @!attribute auto_collection + # Whether the credits purchase invoice should auto collect with the customer's + # saved payment method. + # + # @return [Boolean] + required :auto_collection, Orb::BooleanModel + + # @!attribute net_terms + # The net terms determines the difference between the invoice date and the issue + # date for the invoice. If you intend the invoice to be due on issue, set this + # to 0. + # + # @return [Integer] + required :net_terms, Integer + + # @!attribute memo + # An optional memo to display on the invoice. + # + # @return [String, nil] + optional :memo, String, nil?: true + + # @!attribute [r] require_successful_payment + # If true, new credit blocks created by this top-up will require that the + # corresponding invoice is paid before they can be drawn down from. + # + # @return [Boolean, nil] + optional :require_successful_payment, Orb::BooleanModel + + # @!parse + # # @return [Boolean] + # attr_writer :require_successful_payment + + # @!parse + # # Settings for invoices generated by triggered top-ups. + # # + # # @param auto_collection [Boolean] + # # @param net_terms [Integer] + # # @param memo [String, nil] + # # @param require_successful_payment [Boolean] + # # + # def initialize(auto_collection:, net_terms:, memo: nil, require_successful_payment: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # The unit of expires_after. + # + # @example + # ```ruby + # case expires_after_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class ExpiresAfterUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + end + end +end diff --git a/lib/orb/models/customers/credits/top_up_create_response.rb b/lib/orb/models/customers/credits/top_up_create_response.rb new file mode 100644 index 00000000..7c9a61af --- /dev/null +++ b/lib/orb/models/customers/credits/top_up_create_response.rb @@ -0,0 +1,160 @@ +# frozen_string_literal: true + +module Orb + module Models + module Customers + module Credits + class TopUpCreateResponse < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # The amount to increment when the threshold is reached. + # + # @return [String] + required :amount, String + + # @!attribute currency + # The currency or custom pricing unit to use for this top-up. If this is a + # real-world currency, it must match the customer's invoicing currency. + # + # @return [String] + required :currency, String + + # @!attribute invoice_settings + # Settings for invoices generated by triggered top-ups. + # + # @return [Orb::Models::Customers::Credits::TopUpCreateResponse::InvoiceSettings] + required :invoice_settings, -> { Orb::Models::Customers::Credits::TopUpCreateResponse::InvoiceSettings } + + # @!attribute per_unit_cost_basis + # How much, in the customer's currency, to charge for each unit. + # + # @return [String] + required :per_unit_cost_basis, String + + # @!attribute threshold + # The threshold at which to trigger the top-up. If the balance is at or below this + # threshold, the top-up will be triggered. + # + # @return [String] + required :threshold, String + + # @!attribute expires_after + # The number of days or months after which the top-up expires. If unspecified, it + # does not expire. + # + # @return [Integer, nil] + optional :expires_after, Integer, nil?: true + + # @!attribute expires_after_unit + # The unit of expires_after. + # + # @return [Symbol, Orb::Models::Customers::Credits::TopUpCreateResponse::ExpiresAfterUnit, nil] + optional :expires_after_unit, + enum: -> { Orb::Models::Customers::Credits::TopUpCreateResponse::ExpiresAfterUnit }, + nil?: true + + # @!parse + # # @param id [String] + # # @param amount [String] + # # @param currency [String] + # # @param invoice_settings [Orb::Models::Customers::Credits::TopUpCreateResponse::InvoiceSettings] + # # @param per_unit_cost_basis [String] + # # @param threshold [String] + # # @param expires_after [Integer, nil] + # # @param expires_after_unit [Symbol, Orb::Models::Customers::Credits::TopUpCreateResponse::ExpiresAfterUnit, nil] + # # + # def initialize( + # id:, + # amount:, + # currency:, + # invoice_settings:, + # per_unit_cost_basis:, + # threshold:, + # expires_after: nil, + # expires_after_unit: nil, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class InvoiceSettings < Orb::BaseModel + # @!attribute auto_collection + # Whether the credits purchase invoice should auto collect with the customer's + # saved payment method. + # + # @return [Boolean] + required :auto_collection, Orb::BooleanModel + + # @!attribute net_terms + # The net terms determines the difference between the invoice date and the issue + # date for the invoice. If you intend the invoice to be due on issue, set this + # to 0. + # + # @return [Integer] + required :net_terms, Integer + + # @!attribute memo + # An optional memo to display on the invoice. + # + # @return [String, nil] + optional :memo, String, nil?: true + + # @!attribute [r] require_successful_payment + # If true, new credit blocks created by this top-up will require that the + # corresponding invoice is paid before they can be drawn down from. + # + # @return [Boolean, nil] + optional :require_successful_payment, Orb::BooleanModel + + # @!parse + # # @return [Boolean] + # attr_writer :require_successful_payment + + # @!parse + # # Settings for invoices generated by triggered top-ups. + # # + # # @param auto_collection [Boolean] + # # @param net_terms [Integer] + # # @param memo [String, nil] + # # @param require_successful_payment [Boolean] + # # + # def initialize(auto_collection:, net_terms:, memo: nil, require_successful_payment: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # The unit of expires_after. + # + # @example + # ```ruby + # case expires_after_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class ExpiresAfterUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + end + end +end diff --git a/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb b/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb new file mode 100644 index 00000000..abb7207f --- /dev/null +++ b/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb @@ -0,0 +1,161 @@ +# frozen_string_literal: true + +module Orb + module Models + module Customers + module Credits + class TopUpListByExternalIDResponse < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # The amount to increment when the threshold is reached. + # + # @return [String] + required :amount, String + + # @!attribute currency + # The currency or custom pricing unit to use for this top-up. If this is a + # real-world currency, it must match the customer's invoicing currency. + # + # @return [String] + required :currency, String + + # @!attribute invoice_settings + # Settings for invoices generated by triggered top-ups. + # + # @return [Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::InvoiceSettings] + required :invoice_settings, + -> { Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::InvoiceSettings } + + # @!attribute per_unit_cost_basis + # How much, in the customer's currency, to charge for each unit. + # + # @return [String] + required :per_unit_cost_basis, String + + # @!attribute threshold + # The threshold at which to trigger the top-up. If the balance is at or below this + # threshold, the top-up will be triggered. + # + # @return [String] + required :threshold, String + + # @!attribute expires_after + # The number of days or months after which the top-up expires. If unspecified, it + # does not expire. + # + # @return [Integer, nil] + optional :expires_after, Integer, nil?: true + + # @!attribute expires_after_unit + # The unit of expires_after. + # + # @return [Symbol, Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::ExpiresAfterUnit, nil] + optional :expires_after_unit, + enum: -> { Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::ExpiresAfterUnit }, + nil?: true + + # @!parse + # # @param id [String] + # # @param amount [String] + # # @param currency [String] + # # @param invoice_settings [Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::InvoiceSettings] + # # @param per_unit_cost_basis [String] + # # @param threshold [String] + # # @param expires_after [Integer, nil] + # # @param expires_after_unit [Symbol, Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::ExpiresAfterUnit, nil] + # # + # def initialize( + # id:, + # amount:, + # currency:, + # invoice_settings:, + # per_unit_cost_basis:, + # threshold:, + # expires_after: nil, + # expires_after_unit: nil, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class InvoiceSettings < Orb::BaseModel + # @!attribute auto_collection + # Whether the credits purchase invoice should auto collect with the customer's + # saved payment method. + # + # @return [Boolean] + required :auto_collection, Orb::BooleanModel + + # @!attribute net_terms + # The net terms determines the difference between the invoice date and the issue + # date for the invoice. If you intend the invoice to be due on issue, set this + # to 0. + # + # @return [Integer] + required :net_terms, Integer + + # @!attribute memo + # An optional memo to display on the invoice. + # + # @return [String, nil] + optional :memo, String, nil?: true + + # @!attribute [r] require_successful_payment + # If true, new credit blocks created by this top-up will require that the + # corresponding invoice is paid before they can be drawn down from. + # + # @return [Boolean, nil] + optional :require_successful_payment, Orb::BooleanModel + + # @!parse + # # @return [Boolean] + # attr_writer :require_successful_payment + + # @!parse + # # Settings for invoices generated by triggered top-ups. + # # + # # @param auto_collection [Boolean] + # # @param net_terms [Integer] + # # @param memo [String, nil] + # # @param require_successful_payment [Boolean] + # # + # def initialize(auto_collection:, net_terms:, memo: nil, require_successful_payment: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # The unit of expires_after. + # + # @example + # ```ruby + # case expires_after_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class ExpiresAfterUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + end + end +end diff --git a/lib/orb/models/customers/credits/top_up_list_response.rb b/lib/orb/models/customers/credits/top_up_list_response.rb new file mode 100644 index 00000000..8043075b --- /dev/null +++ b/lib/orb/models/customers/credits/top_up_list_response.rb @@ -0,0 +1,160 @@ +# frozen_string_literal: true + +module Orb + module Models + module Customers + module Credits + class TopUpListResponse < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute amount + # The amount to increment when the threshold is reached. + # + # @return [String] + required :amount, String + + # @!attribute currency + # The currency or custom pricing unit to use for this top-up. If this is a + # real-world currency, it must match the customer's invoicing currency. + # + # @return [String] + required :currency, String + + # @!attribute invoice_settings + # Settings for invoices generated by triggered top-ups. + # + # @return [Orb::Models::Customers::Credits::TopUpListResponse::InvoiceSettings] + required :invoice_settings, -> { Orb::Models::Customers::Credits::TopUpListResponse::InvoiceSettings } + + # @!attribute per_unit_cost_basis + # How much, in the customer's currency, to charge for each unit. + # + # @return [String] + required :per_unit_cost_basis, String + + # @!attribute threshold + # The threshold at which to trigger the top-up. If the balance is at or below this + # threshold, the top-up will be triggered. + # + # @return [String] + required :threshold, String + + # @!attribute expires_after + # The number of days or months after which the top-up expires. If unspecified, it + # does not expire. + # + # @return [Integer, nil] + optional :expires_after, Integer, nil?: true + + # @!attribute expires_after_unit + # The unit of expires_after. + # + # @return [Symbol, Orb::Models::Customers::Credits::TopUpListResponse::ExpiresAfterUnit, nil] + optional :expires_after_unit, + enum: -> { Orb::Models::Customers::Credits::TopUpListResponse::ExpiresAfterUnit }, + nil?: true + + # @!parse + # # @param id [String] + # # @param amount [String] + # # @param currency [String] + # # @param invoice_settings [Orb::Models::Customers::Credits::TopUpListResponse::InvoiceSettings] + # # @param per_unit_cost_basis [String] + # # @param threshold [String] + # # @param expires_after [Integer, nil] + # # @param expires_after_unit [Symbol, Orb::Models::Customers::Credits::TopUpListResponse::ExpiresAfterUnit, nil] + # # + # def initialize( + # id:, + # amount:, + # currency:, + # invoice_settings:, + # per_unit_cost_basis:, + # threshold:, + # expires_after: nil, + # expires_after_unit: nil, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class InvoiceSettings < Orb::BaseModel + # @!attribute auto_collection + # Whether the credits purchase invoice should auto collect with the customer's + # saved payment method. + # + # @return [Boolean] + required :auto_collection, Orb::BooleanModel + + # @!attribute net_terms + # The net terms determines the difference between the invoice date and the issue + # date for the invoice. If you intend the invoice to be due on issue, set this + # to 0. + # + # @return [Integer] + required :net_terms, Integer + + # @!attribute memo + # An optional memo to display on the invoice. + # + # @return [String, nil] + optional :memo, String, nil?: true + + # @!attribute [r] require_successful_payment + # If true, new credit blocks created by this top-up will require that the + # corresponding invoice is paid before they can be drawn down from. + # + # @return [Boolean, nil] + optional :require_successful_payment, Orb::BooleanModel + + # @!parse + # # @return [Boolean] + # attr_writer :require_successful_payment + + # @!parse + # # Settings for invoices generated by triggered top-ups. + # # + # # @param auto_collection [Boolean] + # # @param net_terms [Integer] + # # @param memo [String, nil] + # # @param require_successful_payment [Boolean] + # # + # def initialize(auto_collection:, net_terms:, memo: nil, require_successful_payment: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # The unit of expires_after. + # + # @example + # ```ruby + # case expires_after_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class ExpiresAfterUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + end + end +end diff --git a/lib/orb/models/dimensional_price_configuration_model.rb b/lib/orb/models/dimensional_price_configuration_model.rb deleted file mode 100644 index 36851dbd..00000000 --- a/lib/orb/models/dimensional_price_configuration_model.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class DimensionalPriceConfigurationModel < Orb::BaseModel - # @!attribute dimension_values - # - # @return [Array] - required :dimension_values, Orb::ArrayOf[String] - - # @!attribute dimensional_price_group_id - # - # @return [String] - required :dimensional_price_group_id, String - - # @!parse - # # @param dimension_values [Array] - # # @param dimensional_price_group_id [String] - # # - # def initialize(dimension_values:, dimensional_price_group_id:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/dimensional_price_group_model.rb b/lib/orb/models/dimensional_price_group_model.rb deleted file mode 100644 index cf539c07..00000000 --- a/lib/orb/models/dimensional_price_group_model.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class DimensionalPriceGroupModel < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric_id - # The billable metric associated with this dimensional price group. All prices - # associated with this dimensional price group will be computed using this - # billable metric. - # - # @return [String] - required :billable_metric_id, String - - # @!attribute dimensions - # The dimensions that this dimensional price group is defined over - # - # @return [Array] - required :dimensions, Orb::ArrayOf[String] - - # @!attribute external_dimensional_price_group_id - # An alias for the dimensional price group - # - # @return [String, nil] - required :external_dimensional_price_group_id, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute name - # The name of the dimensional price group - # - # @return [String] - required :name, String - - # @!parse - # # A dimensional price group is used to partition the result of a billable metric - # # by a set of dimensions. Prices in a price group must specify the parition used - # # to derive their usage. - # # - # # @param id [String] - # # @param billable_metric_id [String] - # # @param dimensions [Array] - # # @param external_dimensional_price_group_id [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param name [String] - # # - # def initialize(id:, billable_metric_id:, dimensions:, external_dimensional_price_group_id:, metadata:, name:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/dimensional_price_groups.rb b/lib/orb/models/dimensional_price_groups.rb index 471ec964..d58492de 100644 --- a/lib/orb/models/dimensional_price_groups.rb +++ b/lib/orb/models/dimensional_price_groups.rb @@ -5,8 +5,8 @@ module Models class DimensionalPriceGroupsAPI < Orb::BaseModel # @!attribute data # - # @return [Array] - required :data, -> { Orb::ArrayOf[Orb::Models::DimensionalPriceGroupModel] } + # @return [Array] + required :data, -> { Orb::ArrayOf[Orb::Models::DimensionalPriceGroup] } # @!attribute pagination_metadata # @@ -14,7 +14,7 @@ class DimensionalPriceGroupsAPI < Orb::BaseModel required :pagination_metadata, -> { Orb::Models::PaginationMetadata } # @!parse - # # @param data [Array] + # # @param data [Array] # # @param pagination_metadata [Orb::Models::PaginationMetadata] # # # def initialize(data:, pagination_metadata:, **) = super diff --git a/lib/orb/models/discount_model.rb b/lib/orb/models/discount_model.rb deleted file mode 100644 index 815379d8..00000000 --- a/lib/orb/models/discount_model.rb +++ /dev/null @@ -1,92 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - # @abstract - # - # @example - # ```ruby - # case discount_model - # in { - # discount_type: "percentage", - # applies_to_price_ids: ^(Orb::ArrayOf[String]), - # percentage_discount: Float, - # reason: String - # } - # # Orb::Models::PercentageDiscount ... - # in { - # discount_type: "trial", - # applies_to_price_ids: ^(Orb::ArrayOf[String]), - # reason: String, - # trial_amount_discount: String - # } - # # Orb::Models::TrialDiscount ... - # in {discount_type: "usage", applies_to_price_ids: ^(Orb::ArrayOf[String]), usage_discount: Float, reason: String} - # # Orb::Models::DiscountModel::UsageDiscount ... - # in {discount_type: "amount", amount_discount: String, applies_to_price_ids: ^(Orb::ArrayOf[String]), reason: String} - # # Orb::Models::AmountDiscount ... - # end - # ``` - # - # @example - # ```ruby - # case discount_model - # in Orb::Models::PercentageDiscount - # # ... - # in Orb::Models::TrialDiscount - # # ... - # in Orb::Models::DiscountModel::UsageDiscount - # # ... - # in Orb::Models::AmountDiscount - # # ... - # end - # ``` - class DiscountModel < Orb::Union - discriminator :discount_type - - variant :percentage, -> { Orb::Models::PercentageDiscount } - - variant :trial, -> { Orb::Models::TrialDiscount } - - variant :usage, -> { Orb::Models::DiscountModel::UsageDiscount } - - variant :amount, -> { Orb::Models::AmountDiscount } - - class UsageDiscount < Orb::BaseModel - # @!attribute applies_to_price_ids - # List of price_ids that this discount applies to. For plan/plan phase discounts, - # this can be a subset of prices. - # - # @return [Array] - required :applies_to_price_ids, Orb::ArrayOf[String] - - # @!attribute discount_type - # - # @return [Symbol, :usage] - required :discount_type, const: :usage - - # @!attribute usage_discount - # Only available if discount_type is `usage`. Number of usage units that this - # discount is for - # - # @return [Float] - required :usage_discount, Float - - # @!attribute reason - # - # @return [String, nil] - optional :reason, String, nil?: true - - # @!parse - # # @param applies_to_price_ids [Array] - # # @param usage_discount [Float] - # # @param reason [String, nil] - # # @param discount_type [Symbol, :usage] - # # - # def initialize(applies_to_price_ids:, usage_discount:, reason: nil, discount_type: :usage, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end - end -end diff --git a/lib/orb/models/discount_override_model.rb b/lib/orb/models/discount_override_model.rb deleted file mode 100644 index 7306341b..00000000 --- a/lib/orb/models/discount_override_model.rb +++ /dev/null @@ -1,68 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class DiscountOverrideModel < Orb::BaseModel - # @!attribute discount_type - # - # @return [Symbol, Orb::Models::DiscountOverrideModel::DiscountType] - required :discount_type, enum: -> { Orb::Models::DiscountOverrideModel::DiscountType } - - # @!attribute amount_discount - # Only available if discount_type is `amount`. - # - # @return [String, nil] - optional :amount_discount, String, nil?: true - - # @!attribute percentage_discount - # Only available if discount_type is `percentage`. This is a number between 0 - # and 1. - # - # @return [Float, nil] - optional :percentage_discount, Float, nil?: true - - # @!attribute usage_discount - # Only available if discount_type is `usage`. Number of usage units that this - # discount is for - # - # @return [Float, nil] - optional :usage_discount, Float, nil?: true - - # @!parse - # # @param discount_type [Symbol, Orb::Models::DiscountOverrideModel::DiscountType] - # # @param amount_discount [String, nil] - # # @param percentage_discount [Float, nil] - # # @param usage_discount [Float, nil] - # # - # def initialize(discount_type:, amount_discount: nil, percentage_discount: nil, usage_discount: nil, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case discount_type - # in :percentage - # # ... - # in :usage - # # ... - # in :amount - # # ... - # end - # ``` - class DiscountType < Orb::Enum - PERCENTAGE = :percentage - USAGE = :usage - AMOUNT = :amount - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end -end diff --git a/lib/orb/models/edit_customer_model.rb b/lib/orb/models/edit_customer_model.rb deleted file mode 100644 index 687a0600..00000000 --- a/lib/orb/models/edit_customer_model.rb +++ /dev/null @@ -1,307 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class EditCustomerModel < Orb::BaseModel - # @!attribute accounting_sync_configuration - # - # @return [Orb::Models::NewAccountingSyncConfigurationModel, nil] - optional :accounting_sync_configuration, - -> { Orb::Models::NewAccountingSyncConfigurationModel }, - nil?: true - - # @!attribute additional_emails - # Additional email addresses for this customer. If populated, these email - # addresses will be CC'd for customer communications. - # - # @return [Array, nil] - optional :additional_emails, Orb::ArrayOf[String], nil?: true - - # @!attribute auto_collection - # Used to determine if invoices for this customer will automatically attempt to - # charge a saved payment method, if available. This parameter defaults to `True` - # when a payment provider is provided on customer creation. - # - # @return [Boolean, nil] - optional :auto_collection, Orb::BooleanModel, nil?: true - - # @!attribute billing_address - # - # @return [Orb::Models::AddressInputModel, nil] - optional :billing_address, -> { Orb::Models::AddressInputModel }, nil?: true - - # @!attribute currency - # An ISO 4217 currency string used for the customer's invoices and balance. If not - # set at creation time, will be set at subscription creation time. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute email - # A valid customer email, to be used for invoicing and notifications. - # - # @return [String, nil] - optional :email, String, nil?: true - - # @!attribute email_delivery - # - # @return [Boolean, nil] - optional :email_delivery, Orb::BooleanModel, nil?: true - - # @!attribute external_customer_id - # The external customer ID. This can only be set if empty and the customer has no - # past or current subscriptions. - # - # @return [String, nil] - optional :external_customer_id, String, nil?: true - - # @!attribute hierarchy - # The hierarchical relationships for this customer. - # - # @return [Orb::Models::CustomerHierarchyConfigModel, nil] - optional :hierarchy, -> { Orb::Models::CustomerHierarchyConfigModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute name - # The full name of the customer - # - # @return [String, nil] - optional :name, String, nil?: true - - # @!attribute payment_provider - # This is used for creating charges or invoices in an external system via Orb. - # When not in test mode: - # - # - the connection must first be configured in the Orb webapp. - # - if the provider is an invoicing provider (`stripe_invoice`, `quickbooks`, - # `bill.com`, `netsuite`), any product mappings must first be configured with - # the Orb team. - # - # @return [Symbol, Orb::Models::EditCustomerModel::PaymentProvider, nil] - optional :payment_provider, enum: -> { Orb::Models::EditCustomerModel::PaymentProvider }, nil?: true - - # @!attribute payment_provider_id - # The ID of this customer in an external payments solution, such as Stripe. This - # is used for creating charges or invoices in the external system via Orb. - # - # @return [String, nil] - optional :payment_provider_id, String, nil?: true - - # @!attribute reporting_configuration - # - # @return [Orb::Models::NewReportingConfigurationModel, nil] - optional :reporting_configuration, -> { Orb::Models::NewReportingConfigurationModel }, nil?: true - - # @!attribute shipping_address - # - # @return [Orb::Models::AddressInputModel, nil] - optional :shipping_address, -> { Orb::Models::AddressInputModel }, nil?: true - - # @!attribute tax_configuration - # - # @return [Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration, Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration, nil] - optional :tax_configuration, union: -> { Orb::Models::NewTaxConfigurationModel }, nil?: true - - # @!attribute tax_id - # Tax IDs are commonly required to be displayed on customer invoices, which are - # added to the headers of invoices. - # - # ### Supported Tax ID Countries and Types - # - # | Country | Type | Description | - # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | - # | Andorra | `ad_nrt` | Andorran NRT Number | - # | Argentina | `ar_cuit` | Argentinian Tax ID Number | - # | Australia | `au_abn` | Australian Business Number (AU ABN) | - # | Australia | `au_arn` | Australian Taxation Office Reference Number | - # | Austria | `eu_vat` | European VAT Number | - # | Bahrain | `bh_vat` | Bahraini VAT Number | - # | Belgium | `eu_vat` | European VAT Number | - # | Bolivia | `bo_tin` | Bolivian Tax ID | - # | Brazil | `br_cnpj` | Brazilian CNPJ Number | - # | Brazil | `br_cpf` | Brazilian CPF Number | - # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | - # | Bulgaria | `eu_vat` | European VAT Number | - # | Canada | `ca_bn` | Canadian BN | - # | Canada | `ca_gst_hst` | Canadian GST/HST Number | - # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | - # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | - # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | - # | Canada | `ca_qst` | Canadian QST Number (Québec) | - # | Chile | `cl_tin` | Chilean TIN | - # | China | `cn_tin` | Chinese Tax ID | - # | Colombia | `co_nit` | Colombian NIT Number | - # | Costa Rica | `cr_tin` | Costa Rican Tax ID | - # | Croatia | `eu_vat` | European VAT Number | - # | Cyprus | `eu_vat` | European VAT Number | - # | Czech Republic | `eu_vat` | European VAT Number | - # | Denmark | `eu_vat` | European VAT Number | - # | Dominican Republic | `do_rcn` | Dominican RCN Number | - # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | - # | Egypt | `eg_tin` | Egyptian Tax Identification Number | - # | El Salvador | `sv_nit` | El Salvadorian NIT Number | - # | Estonia | `eu_vat` | European VAT Number | - # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | - # | Finland | `eu_vat` | European VAT Number | - # | France | `eu_vat` | European VAT Number | - # | Georgia | `ge_vat` | Georgian VAT | - # | Germany | `eu_vat` | European VAT Number | - # | Greece | `eu_vat` | European VAT Number | - # | Hong Kong | `hk_br` | Hong Kong BR Number | - # | Hungary | `eu_vat` | European VAT Number | - # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | - # | Iceland | `is_vat` | Icelandic VAT | - # | India | `in_gst` | Indian GST Number | - # | Indonesia | `id_npwp` | Indonesian NPWP Number | - # | Ireland | `eu_vat` | European VAT Number | - # | Israel | `il_vat` | Israel VAT | - # | Italy | `eu_vat` | European VAT Number | - # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | - # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | - # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | - # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | - # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | - # | Latvia | `eu_vat` | European VAT Number | - # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | - # | Lithuania | `eu_vat` | European VAT Number | - # | Luxembourg | `eu_vat` | European VAT Number | - # | Malaysia | `my_frp` | Malaysian FRP Number | - # | Malaysia | `my_itn` | Malaysian ITN | - # | Malaysia | `my_sst` | Malaysian SST Number | - # | Malta | `eu_vat ` | European VAT Number | - # | Mexico | `mx_rfc` | Mexican RFC Number | - # | Netherlands | `eu_vat` | European VAT Number | - # | New Zealand | `nz_gst` | New Zealand GST Number | - # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | - # | Norway | `no_vat` | Norwegian VAT Number | - # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | - # | Oman | `om_vat` | Omani VAT Number | - # | Peru | `pe_ruc` | Peruvian RUC Number | - # | Philippines | `ph_tin ` | Philippines Tax Identification Number | - # | Poland | `eu_vat` | European VAT Number | - # | Portugal | `eu_vat` | European VAT Number | - # | Romania | `eu_vat` | European VAT Number | - # | Romania | `ro_tin` | Romanian Tax ID Number | - # | Russia | `ru_inn` | Russian INN | - # | Russia | `ru_kpp` | Russian KPP | - # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | - # | Serbia | `rs_pib` | Serbian PIB Number | - # | Singapore | `sg_gst` | Singaporean GST | - # | Singapore | `sg_uen` | Singaporean UEN | - # | Slovakia | `eu_vat` | European VAT Number | - # | Slovenia | `eu_vat` | European VAT Number | - # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | - # | South Africa | `za_vat` | South African VAT Number | - # | South Korea | `kr_brn` | Korean BRN | - # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | - # | Spain | `eu_vat` | European VAT Number | - # | Sweden | `eu_vat` | European VAT Number | - # | Switzerland | `ch_vat` | Switzerland VAT Number | - # | Taiwan | `tw_vat` | Taiwanese VAT | - # | Thailand | `th_vat` | Thai VAT | - # | Turkey | `tr_tin` | Turkish Tax Identification Number | - # | Ukraine | `ua_vat` | Ukrainian VAT | - # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | - # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | - # | United Kingdom | `gb_vat` | United Kingdom VAT Number | - # | United States | `us_ein` | United States EIN | - # | Uruguay | `uy_ruc` | Uruguayan RUC Number | - # | Venezuela | `ve_rif` | Venezuelan RIF Number | - # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | - # - # @return [Orb::Models::CustomerTaxIDModel, nil] - optional :tax_id, -> { Orb::Models::CustomerTaxIDModel }, nil?: true - - # @!parse - # # @param accounting_sync_configuration [Orb::Models::NewAccountingSyncConfigurationModel, nil] - # # @param additional_emails [Array, nil] - # # @param auto_collection [Boolean, nil] - # # @param billing_address [Orb::Models::AddressInputModel, nil] - # # @param currency [String, nil] - # # @param email [String, nil] - # # @param email_delivery [Boolean, nil] - # # @param external_customer_id [String, nil] - # # @param hierarchy [Orb::Models::CustomerHierarchyConfigModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param name [String, nil] - # # @param payment_provider [Symbol, Orb::Models::EditCustomerModel::PaymentProvider, nil] - # # @param payment_provider_id [String, nil] - # # @param reporting_configuration [Orb::Models::NewReportingConfigurationModel, nil] - # # @param shipping_address [Orb::Models::AddressInputModel, nil] - # # @param tax_configuration [Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration, Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration, nil] - # # @param tax_id [Orb::Models::CustomerTaxIDModel, nil] - # # - # def initialize( - # accounting_sync_configuration: nil, - # additional_emails: nil, - # auto_collection: nil, - # billing_address: nil, - # currency: nil, - # email: nil, - # email_delivery: nil, - # external_customer_id: nil, - # hierarchy: nil, - # metadata: nil, - # name: nil, - # payment_provider: nil, - # payment_provider_id: nil, - # reporting_configuration: nil, - # shipping_address: nil, - # tax_configuration: nil, - # tax_id: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # This is used for creating charges or invoices in an external system via Orb. - # When not in test mode: - # - # - the connection must first be configured in the Orb webapp. - # - if the provider is an invoicing provider (`stripe_invoice`, `quickbooks`, - # `bill.com`, `netsuite`), any product mappings must first be configured with - # the Orb team. - # - # @example - # ```ruby - # case payment_provider - # in :quickbooks - # # ... - # in :"bill.com" - # # ... - # in :stripe_charge - # # ... - # in :stripe_invoice - # # ... - # in :netsuite - # # ... - # end - # ``` - class PaymentProvider < Orb::Enum - QUICKBOOKS = :quickbooks - BILL_COM = :"bill.com" - STRIPE_CHARGE = :stripe_charge - STRIPE_INVOICE = :stripe_invoice - NETSUITE = :netsuite - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end -end diff --git a/lib/orb/models/edit_plan_model.rb b/lib/orb/models/edit_plan_model.rb deleted file mode 100644 index 60331c10..00000000 --- a/lib/orb/models/edit_plan_model.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class EditPlanModel < Orb::BaseModel - # @!attribute external_plan_id - # An optional user-defined ID for this plan resource, used throughout the system - # as an alias for this Plan. Use this field to identify a plan by an existing - # identifier in your system. - # - # @return [String, nil] - optional :external_plan_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param external_plan_id [String, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # - # def initialize(external_plan_id: nil, metadata: nil, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/events/backfill_close_response.rb b/lib/orb/models/events/backfill_close_response.rb new file mode 100644 index 00000000..06106b9f --- /dev/null +++ b/lib/orb/models/events/backfill_close_response.rb @@ -0,0 +1,143 @@ +# frozen_string_literal: true + +module Orb + module Models + module Events + class BackfillCloseResponse < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute close_time + # If in the future, the time at which the backfill will automatically close. If in + # the past, the time at which the backfill was closed. + # + # @return [Time, nil] + required :close_time, Time, nil?: true + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute customer_id + # The Orb-generated ID of the customer to which this backfill is scoped. If + # `null`, this backfill is scoped to all customers. + # + # @return [String, nil] + required :customer_id, String, nil?: true + + # @!attribute events_ingested + # The number of events ingested in this backfill. + # + # @return [Integer] + required :events_ingested, Integer + + # @!attribute replace_existing_events + # If `true`, existing events in the backfill's timeframe will be replaced with the + # newly ingested events associated with the backfill. If `false`, newly ingested + # events will be added to the existing events. + # + # @return [Boolean] + required :replace_existing_events, Orb::BooleanModel + + # @!attribute reverted_at + # The time at which this backfill was reverted. + # + # @return [Time, nil] + required :reverted_at, Time, nil?: true + + # @!attribute status + # The status of the backfill. + # + # @return [Symbol, Orb::Models::Events::BackfillCloseResponse::Status] + required :status, enum: -> { Orb::Models::Events::BackfillCloseResponse::Status } + + # @!attribute timeframe_end + # + # @return [Time] + required :timeframe_end, Time + + # @!attribute timeframe_start + # + # @return [Time] + required :timeframe_start, Time + + # @!attribute deprecation_filter + # A boolean + # [computed property](/extensibility/advanced-metrics#computed-properties) used to + # filter the set of events to deprecate + # + # @return [String, nil] + optional :deprecation_filter, String, nil?: true + + # @!parse + # # A backfill represents an update to historical usage data, adding or replacing + # # events in a timeframe. + # # + # # @param id [String] + # # @param close_time [Time, nil] + # # @param created_at [Time] + # # @param customer_id [String, nil] + # # @param events_ingested [Integer] + # # @param replace_existing_events [Boolean] + # # @param reverted_at [Time, nil] + # # @param status [Symbol, Orb::Models::Events::BackfillCloseResponse::Status] + # # @param timeframe_end [Time] + # # @param timeframe_start [Time] + # # @param deprecation_filter [String, nil] + # # + # def initialize( + # id:, + # close_time:, + # created_at:, + # customer_id:, + # events_ingested:, + # replace_existing_events:, + # reverted_at:, + # status:, + # timeframe_end:, + # timeframe_start:, + # deprecation_filter: nil, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The status of the backfill. + # + # @example + # ```ruby + # case status + # in :pending + # # ... + # in :reflected + # # ... + # in :pending_revert + # # ... + # in :reverted + # # ... + # end + # ``` + class Status < Orb::Enum + PENDING = :pending + REFLECTED = :reflected + PENDING_REVERT = :pending_revert + REVERTED = :reverted + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + end +end diff --git a/lib/orb/models/events/backfill_create_response.rb b/lib/orb/models/events/backfill_create_response.rb new file mode 100644 index 00000000..2a1525bf --- /dev/null +++ b/lib/orb/models/events/backfill_create_response.rb @@ -0,0 +1,143 @@ +# frozen_string_literal: true + +module Orb + module Models + module Events + class BackfillCreateResponse < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute close_time + # If in the future, the time at which the backfill will automatically close. If in + # the past, the time at which the backfill was closed. + # + # @return [Time, nil] + required :close_time, Time, nil?: true + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute customer_id + # The Orb-generated ID of the customer to which this backfill is scoped. If + # `null`, this backfill is scoped to all customers. + # + # @return [String, nil] + required :customer_id, String, nil?: true + + # @!attribute events_ingested + # The number of events ingested in this backfill. + # + # @return [Integer] + required :events_ingested, Integer + + # @!attribute replace_existing_events + # If `true`, existing events in the backfill's timeframe will be replaced with the + # newly ingested events associated with the backfill. If `false`, newly ingested + # events will be added to the existing events. + # + # @return [Boolean] + required :replace_existing_events, Orb::BooleanModel + + # @!attribute reverted_at + # The time at which this backfill was reverted. + # + # @return [Time, nil] + required :reverted_at, Time, nil?: true + + # @!attribute status + # The status of the backfill. + # + # @return [Symbol, Orb::Models::Events::BackfillCreateResponse::Status] + required :status, enum: -> { Orb::Models::Events::BackfillCreateResponse::Status } + + # @!attribute timeframe_end + # + # @return [Time] + required :timeframe_end, Time + + # @!attribute timeframe_start + # + # @return [Time] + required :timeframe_start, Time + + # @!attribute deprecation_filter + # A boolean + # [computed property](/extensibility/advanced-metrics#computed-properties) used to + # filter the set of events to deprecate + # + # @return [String, nil] + optional :deprecation_filter, String, nil?: true + + # @!parse + # # A backfill represents an update to historical usage data, adding or replacing + # # events in a timeframe. + # # + # # @param id [String] + # # @param close_time [Time, nil] + # # @param created_at [Time] + # # @param customer_id [String, nil] + # # @param events_ingested [Integer] + # # @param replace_existing_events [Boolean] + # # @param reverted_at [Time, nil] + # # @param status [Symbol, Orb::Models::Events::BackfillCreateResponse::Status] + # # @param timeframe_end [Time] + # # @param timeframe_start [Time] + # # @param deprecation_filter [String, nil] + # # + # def initialize( + # id:, + # close_time:, + # created_at:, + # customer_id:, + # events_ingested:, + # replace_existing_events:, + # reverted_at:, + # status:, + # timeframe_end:, + # timeframe_start:, + # deprecation_filter: nil, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The status of the backfill. + # + # @example + # ```ruby + # case status + # in :pending + # # ... + # in :reflected + # # ... + # in :pending_revert + # # ... + # in :reverted + # # ... + # end + # ``` + class Status < Orb::Enum + PENDING = :pending + REFLECTED = :reflected + PENDING_REVERT = :pending_revert + REVERTED = :reverted + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + end +end diff --git a/lib/orb/models/events/backfill_fetch_response.rb b/lib/orb/models/events/backfill_fetch_response.rb new file mode 100644 index 00000000..c8ba856b --- /dev/null +++ b/lib/orb/models/events/backfill_fetch_response.rb @@ -0,0 +1,143 @@ +# frozen_string_literal: true + +module Orb + module Models + module Events + class BackfillFetchResponse < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute close_time + # If in the future, the time at which the backfill will automatically close. If in + # the past, the time at which the backfill was closed. + # + # @return [Time, nil] + required :close_time, Time, nil?: true + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute customer_id + # The Orb-generated ID of the customer to which this backfill is scoped. If + # `null`, this backfill is scoped to all customers. + # + # @return [String, nil] + required :customer_id, String, nil?: true + + # @!attribute events_ingested + # The number of events ingested in this backfill. + # + # @return [Integer] + required :events_ingested, Integer + + # @!attribute replace_existing_events + # If `true`, existing events in the backfill's timeframe will be replaced with the + # newly ingested events associated with the backfill. If `false`, newly ingested + # events will be added to the existing events. + # + # @return [Boolean] + required :replace_existing_events, Orb::BooleanModel + + # @!attribute reverted_at + # The time at which this backfill was reverted. + # + # @return [Time, nil] + required :reverted_at, Time, nil?: true + + # @!attribute status + # The status of the backfill. + # + # @return [Symbol, Orb::Models::Events::BackfillFetchResponse::Status] + required :status, enum: -> { Orb::Models::Events::BackfillFetchResponse::Status } + + # @!attribute timeframe_end + # + # @return [Time] + required :timeframe_end, Time + + # @!attribute timeframe_start + # + # @return [Time] + required :timeframe_start, Time + + # @!attribute deprecation_filter + # A boolean + # [computed property](/extensibility/advanced-metrics#computed-properties) used to + # filter the set of events to deprecate + # + # @return [String, nil] + optional :deprecation_filter, String, nil?: true + + # @!parse + # # A backfill represents an update to historical usage data, adding or replacing + # # events in a timeframe. + # # + # # @param id [String] + # # @param close_time [Time, nil] + # # @param created_at [Time] + # # @param customer_id [String, nil] + # # @param events_ingested [Integer] + # # @param replace_existing_events [Boolean] + # # @param reverted_at [Time, nil] + # # @param status [Symbol, Orb::Models::Events::BackfillFetchResponse::Status] + # # @param timeframe_end [Time] + # # @param timeframe_start [Time] + # # @param deprecation_filter [String, nil] + # # + # def initialize( + # id:, + # close_time:, + # created_at:, + # customer_id:, + # events_ingested:, + # replace_existing_events:, + # reverted_at:, + # status:, + # timeframe_end:, + # timeframe_start:, + # deprecation_filter: nil, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The status of the backfill. + # + # @example + # ```ruby + # case status + # in :pending + # # ... + # in :reflected + # # ... + # in :pending_revert + # # ... + # in :reverted + # # ... + # end + # ``` + class Status < Orb::Enum + PENDING = :pending + REFLECTED = :reflected + PENDING_REVERT = :pending_revert + REVERTED = :reverted + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + end +end diff --git a/lib/orb/models/events/backfill_list_response.rb b/lib/orb/models/events/backfill_list_response.rb new file mode 100644 index 00000000..56eb74e2 --- /dev/null +++ b/lib/orb/models/events/backfill_list_response.rb @@ -0,0 +1,143 @@ +# frozen_string_literal: true + +module Orb + module Models + module Events + class BackfillListResponse < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute close_time + # If in the future, the time at which the backfill will automatically close. If in + # the past, the time at which the backfill was closed. + # + # @return [Time, nil] + required :close_time, Time, nil?: true + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute customer_id + # The Orb-generated ID of the customer to which this backfill is scoped. If + # `null`, this backfill is scoped to all customers. + # + # @return [String, nil] + required :customer_id, String, nil?: true + + # @!attribute events_ingested + # The number of events ingested in this backfill. + # + # @return [Integer] + required :events_ingested, Integer + + # @!attribute replace_existing_events + # If `true`, existing events in the backfill's timeframe will be replaced with the + # newly ingested events associated with the backfill. If `false`, newly ingested + # events will be added to the existing events. + # + # @return [Boolean] + required :replace_existing_events, Orb::BooleanModel + + # @!attribute reverted_at + # The time at which this backfill was reverted. + # + # @return [Time, nil] + required :reverted_at, Time, nil?: true + + # @!attribute status + # The status of the backfill. + # + # @return [Symbol, Orb::Models::Events::BackfillListResponse::Status] + required :status, enum: -> { Orb::Models::Events::BackfillListResponse::Status } + + # @!attribute timeframe_end + # + # @return [Time] + required :timeframe_end, Time + + # @!attribute timeframe_start + # + # @return [Time] + required :timeframe_start, Time + + # @!attribute deprecation_filter + # A boolean + # [computed property](/extensibility/advanced-metrics#computed-properties) used to + # filter the set of events to deprecate + # + # @return [String, nil] + optional :deprecation_filter, String, nil?: true + + # @!parse + # # A backfill represents an update to historical usage data, adding or replacing + # # events in a timeframe. + # # + # # @param id [String] + # # @param close_time [Time, nil] + # # @param created_at [Time] + # # @param customer_id [String, nil] + # # @param events_ingested [Integer] + # # @param replace_existing_events [Boolean] + # # @param reverted_at [Time, nil] + # # @param status [Symbol, Orb::Models::Events::BackfillListResponse::Status] + # # @param timeframe_end [Time] + # # @param timeframe_start [Time] + # # @param deprecation_filter [String, nil] + # # + # def initialize( + # id:, + # close_time:, + # created_at:, + # customer_id:, + # events_ingested:, + # replace_existing_events:, + # reverted_at:, + # status:, + # timeframe_end:, + # timeframe_start:, + # deprecation_filter: nil, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The status of the backfill. + # + # @example + # ```ruby + # case status + # in :pending + # # ... + # in :reflected + # # ... + # in :pending_revert + # # ... + # in :reverted + # # ... + # end + # ``` + class Status < Orb::Enum + PENDING = :pending + REFLECTED = :reflected + PENDING_REVERT = :pending_revert + REVERTED = :reverted + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + end +end diff --git a/lib/orb/models/events/backfill_revert_response.rb b/lib/orb/models/events/backfill_revert_response.rb new file mode 100644 index 00000000..dd2c7cb5 --- /dev/null +++ b/lib/orb/models/events/backfill_revert_response.rb @@ -0,0 +1,143 @@ +# frozen_string_literal: true + +module Orb + module Models + module Events + class BackfillRevertResponse < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute close_time + # If in the future, the time at which the backfill will automatically close. If in + # the past, the time at which the backfill was closed. + # + # @return [Time, nil] + required :close_time, Time, nil?: true + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute customer_id + # The Orb-generated ID of the customer to which this backfill is scoped. If + # `null`, this backfill is scoped to all customers. + # + # @return [String, nil] + required :customer_id, String, nil?: true + + # @!attribute events_ingested + # The number of events ingested in this backfill. + # + # @return [Integer] + required :events_ingested, Integer + + # @!attribute replace_existing_events + # If `true`, existing events in the backfill's timeframe will be replaced with the + # newly ingested events associated with the backfill. If `false`, newly ingested + # events will be added to the existing events. + # + # @return [Boolean] + required :replace_existing_events, Orb::BooleanModel + + # @!attribute reverted_at + # The time at which this backfill was reverted. + # + # @return [Time, nil] + required :reverted_at, Time, nil?: true + + # @!attribute status + # The status of the backfill. + # + # @return [Symbol, Orb::Models::Events::BackfillRevertResponse::Status] + required :status, enum: -> { Orb::Models::Events::BackfillRevertResponse::Status } + + # @!attribute timeframe_end + # + # @return [Time] + required :timeframe_end, Time + + # @!attribute timeframe_start + # + # @return [Time] + required :timeframe_start, Time + + # @!attribute deprecation_filter + # A boolean + # [computed property](/extensibility/advanced-metrics#computed-properties) used to + # filter the set of events to deprecate + # + # @return [String, nil] + optional :deprecation_filter, String, nil?: true + + # @!parse + # # A backfill represents an update to historical usage data, adding or replacing + # # events in a timeframe. + # # + # # @param id [String] + # # @param close_time [Time, nil] + # # @param created_at [Time] + # # @param customer_id [String, nil] + # # @param events_ingested [Integer] + # # @param replace_existing_events [Boolean] + # # @param reverted_at [Time, nil] + # # @param status [Symbol, Orb::Models::Events::BackfillRevertResponse::Status] + # # @param timeframe_end [Time] + # # @param timeframe_start [Time] + # # @param deprecation_filter [String, nil] + # # + # def initialize( + # id:, + # close_time:, + # created_at:, + # customer_id:, + # events_ingested:, + # replace_existing_events:, + # reverted_at:, + # status:, + # timeframe_end:, + # timeframe_start:, + # deprecation_filter: nil, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The status of the backfill. + # + # @example + # ```ruby + # case status + # in :pending + # # ... + # in :reflected + # # ... + # in :pending_revert + # # ... + # in :reverted + # # ... + # end + # ``` + class Status < Orb::Enum + PENDING = :pending + REFLECTED = :reflected + PENDING_REVERT = :pending_revert + REVERTED = :reverted + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + end +end diff --git a/lib/orb/models/fixed_fee_quantity_schedule_entry_model.rb b/lib/orb/models/fixed_fee_quantity_schedule_entry_model.rb deleted file mode 100644 index 1cc7c265..00000000 --- a/lib/orb/models/fixed_fee_quantity_schedule_entry_model.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class FixedFeeQuantityScheduleEntryModel < Orb::BaseModel - # @!attribute end_date - # - # @return [Time, nil] - required :end_date, Time, nil?: true - - # @!attribute price_id - # - # @return [String] - required :price_id, String - - # @!attribute quantity - # - # @return [Float] - required :quantity, Float - - # @!attribute start_date - # - # @return [Time] - required :start_date, Time - - # @!parse - # # @param end_date [Time, nil] - # # @param price_id [String] - # # @param quantity [Float] - # # @param start_date [Time] - # # - # def initialize(end_date:, price_id:, quantity:, start_date:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/invoice.rb b/lib/orb/models/invoice.rb index eba7683f..00a45591 100644 --- a/lib/orb/models/invoice.rb +++ b/lib/orb/models/invoice.rb @@ -17,13 +17,13 @@ class Invoice < Orb::BaseModel # @!attribute auto_collection # - # @return [Orb::Models::AutoCollectionModel] - required :auto_collection, -> { Orb::Models::AutoCollectionModel } + # @return [Orb::Models::Invoice::AutoCollection] + required :auto_collection, -> { Orb::Models::Invoice::AutoCollection } # @!attribute billing_address # - # @return [Orb::Models::AddressModel, nil] - required :billing_address, -> { Orb::Models::AddressModel }, nil?: true + # @return [Orb::Models::Invoice::BillingAddress, nil] + required :billing_address, -> { Orb::Models::Invoice::BillingAddress }, nil?: true # @!attribute created_at # The creation time of the resource in Orb. @@ -34,8 +34,8 @@ class Invoice < Orb::BaseModel # @!attribute credit_notes # A list of credit notes associated with the invoice # - # @return [Array] - required :credit_notes, -> { Orb::ArrayOf[Orb::Models::CreditNoteSummaryModel] } + # @return [Array] + required :credit_notes, -> { Orb::ArrayOf[Orb::Models::Invoice::CreditNote] } # @!attribute currency # An ISO 4217 currency string or `credits` @@ -45,13 +45,14 @@ class Invoice < Orb::BaseModel # @!attribute customer # - # @return [Orb::Models::CustomerMinifiedModel] - required :customer, -> { Orb::Models::CustomerMinifiedModel } + # @return [Orb::Models::Invoice::Customer] + required :customer, -> { Orb::Models::Invoice::Customer } # @!attribute customer_balance_transactions # - # @return [Array] - required :customer_balance_transactions, -> { Orb::ArrayOf[Orb::Models::CustomerBalanceTransactionModel] } + # @return [Array] + required :customer_balance_transactions, + -> { Orb::ArrayOf[Orb::Models::Invoice::CustomerBalanceTransaction] } # @!attribute customer_tax_id # Tax IDs are commonly required to be displayed on customer invoices, which are @@ -160,8 +161,8 @@ class Invoice < Orb::BaseModel # | Venezuela | `ve_rif` | Venezuelan RIF Number | # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | # - # @return [Orb::Models::CustomerTaxIDModel, nil] - required :customer_tax_id, -> { Orb::Models::CustomerTaxIDModel }, nil?: true + # @return [Orb::Models::Invoice::CustomerTaxID, nil] + required :customer_tax_id, -> { Orb::Models::Invoice::CustomerTaxID }, nil?: true # @!attribute discount # This field is deprecated in favor of `discounts`. If a `discounts` list is @@ -240,13 +241,13 @@ class Invoice < Orb::BaseModel # @!attribute line_items # The breakdown of prices in this invoice. # - # @return [Array] - required :line_items, -> { Orb::ArrayOf[Orb::Models::InvoiceLineItemModel] } + # @return [Array] + required :line_items, -> { Orb::ArrayOf[Orb::Models::Invoice::LineItem] } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Invoice::Maximum, nil] + required :maximum, -> { Orb::Models::Invoice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -270,8 +271,8 @@ class Invoice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Invoice::Minimum, nil] + required :minimum, -> { Orb::Models::Invoice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -288,8 +289,8 @@ class Invoice < Orb::BaseModel # @!attribute payment_attempts # A list of payment attempts associated with the invoice # - # @return [Array] - required :payment_attempts, -> { Orb::ArrayOf[Orb::Models::PaymentAttemptModel] } + # @return [Array] + required :payment_attempts, -> { Orb::ArrayOf[Orb::Models::Invoice::PaymentAttempt] } # @!attribute payment_failed_at # If payment was attempted on this invoice but failed, this will be the time of @@ -315,8 +316,8 @@ class Invoice < Orb::BaseModel # @!attribute shipping_address # - # @return [Orb::Models::AddressModel, nil] - required :shipping_address, -> { Orb::Models::AddressModel }, nil?: true + # @return [Orb::Models::Invoice::ShippingAddress, nil] + required :shipping_address, -> { Orb::Models::Invoice::ShippingAddress }, nil?: true # @!attribute status # @@ -325,8 +326,8 @@ class Invoice < Orb::BaseModel # @!attribute subscription # - # @return [Orb::Models::SubscriptionMinifiedModel, nil] - required :subscription, -> { Orb::Models::SubscriptionMinifiedModel }, nil?: true + # @return [Orb::Models::Invoice::Subscription, nil] + required :subscription, -> { Orb::Models::Invoice::Subscription }, nil?: true # @!attribute subtotal # The total before any discounts and minimums are applied. @@ -371,14 +372,14 @@ class Invoice < Orb::BaseModel # # # # @param id [String] # # @param amount_due [String] - # # @param auto_collection [Orb::Models::AutoCollectionModel] - # # @param billing_address [Orb::Models::AddressModel, nil] + # # @param auto_collection [Orb::Models::Invoice::AutoCollection] + # # @param billing_address [Orb::Models::Invoice::BillingAddress, nil] # # @param created_at [Time] - # # @param credit_notes [Array] + # # @param credit_notes [Array] # # @param currency [String] - # # @param customer [Orb::Models::CustomerMinifiedModel] - # # @param customer_balance_transactions [Array] - # # @param customer_tax_id [Orb::Models::CustomerTaxIDModel, nil] + # # @param customer [Orb::Models::Invoice::Customer] + # # @param customer_balance_transactions [Array] + # # @param customer_tax_id [Orb::Models::Invoice::CustomerTaxID, nil] # # @param discount [Object] # # @param discounts [Array] # # @param due_date [Time, nil] @@ -390,21 +391,21 @@ class Invoice < Orb::BaseModel # # @param invoice_source [Symbol, Orb::Models::Invoice::InvoiceSource] # # @param issue_failed_at [Time, nil] # # @param issued_at [Time, nil] - # # @param line_items [Array] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param line_items [Array] + # # @param maximum [Orb::Models::Invoice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param memo [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Invoice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param paid_at [Time, nil] - # # @param payment_attempts [Array] + # # @param payment_attempts [Array] # # @param payment_failed_at [Time, nil] # # @param payment_started_at [Time, nil] # # @param scheduled_issue_at [Time, nil] - # # @param shipping_address [Orb::Models::AddressModel, nil] + # # @param shipping_address [Orb::Models::Invoice::ShippingAddress, nil] # # @param status [Symbol, Orb::Models::Invoice::Status] - # # @param subscription [Orb::Models::SubscriptionMinifiedModel, nil] + # # @param subscription [Orb::Models::Invoice::Subscription, nil] # # @param subtotal [String] # # @param sync_failed_at [Time, nil] # # @param total [String] @@ -460,6 +461,686 @@ class Invoice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class AutoCollection < Orb::BaseModel + # @!attribute enabled + # True only if auto-collection is enabled for this invoice. + # + # @return [Boolean, nil] + required :enabled, Orb::BooleanModel, nil?: true + + # @!attribute next_attempt_at + # If the invoice is scheduled for auto-collection, this field will reflect when + # the next attempt will occur. If dunning has been exhausted, or auto-collection + # is not enabled for this invoice, this field will be `null`. + # + # @return [Time, nil] + required :next_attempt_at, Time, nil?: true + + # @!attribute num_attempts + # Number of auto-collection payment attempts. + # + # @return [Integer, nil] + required :num_attempts, Integer, nil?: true + + # @!attribute previously_attempted_at + # If Orb has ever attempted payment auto-collection for this invoice, this field + # will reflect when that attempt occurred. In conjunction with `next_attempt_at`, + # this can be used to tell whether the invoice is currently in dunning (that is, + # `previously_attempted_at` is non-null, and `next_attempt_time` is non-null), or + # if dunning has been exhausted (`previously_attempted_at` is non-null, but + # `next_attempt_time` is null). + # + # @return [Time, nil] + required :previously_attempted_at, Time, nil?: true + + # @!parse + # # @param enabled [Boolean, nil] + # # @param next_attempt_at [Time, nil] + # # @param num_attempts [Integer, nil] + # # @param previously_attempted_at [Time, nil] + # # + # def initialize(enabled:, next_attempt_at:, num_attempts:, previously_attempted_at:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingAddress < Orb::BaseModel + # @!attribute city + # + # @return [String, nil] + required :city, String, nil?: true + + # @!attribute country + # + # @return [String, nil] + required :country, String, nil?: true + + # @!attribute line1 + # + # @return [String, nil] + required :line1, String, nil?: true + + # @!attribute line2 + # + # @return [String, nil] + required :line2, String, nil?: true + + # @!attribute postal_code + # + # @return [String, nil] + required :postal_code, String, nil?: true + + # @!attribute state + # + # @return [String, nil] + required :state, String, nil?: true + + # @!parse + # # @param city [String, nil] + # # @param country [String, nil] + # # @param line1 [String, nil] + # # @param line2 [String, nil] + # # @param postal_code [String, nil] + # # @param state [String, nil] + # # + # def initialize(city:, country:, line1:, line2:, postal_code:, state:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class CreditNote < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute credit_note_number + # + # @return [String] + required :credit_note_number, String + + # @!attribute memo + # An optional memo supplied on the credit note. + # + # @return [String, nil] + required :memo, String, nil?: true + + # @!attribute reason + # + # @return [String] + required :reason, String + + # @!attribute total + # + # @return [String] + required :total, String + + # @!attribute type + # + # @return [String] + required :type, String + + # @!attribute voided_at + # If the credit note has a status of `void`, this gives a timestamp when the + # credit note was voided. + # + # @return [Time, nil] + required :voided_at, Time, nil?: true + + # @!parse + # # @param id [String] + # # @param credit_note_number [String] + # # @param memo [String, nil] + # # @param reason [String] + # # @param total [String] + # # @param type [String] + # # @param voided_at [Time, nil] + # # + # def initialize(id:, credit_note_number:, memo:, reason:, total:, type:, voided_at:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class CustomerBalanceTransaction < Orb::BaseModel + # @!attribute id + # A unique id for this transaction. + # + # @return [String] + required :id, String + + # @!attribute action + # + # @return [Symbol, Orb::Models::Invoice::CustomerBalanceTransaction::Action] + required :action, enum: -> { Orb::Models::Invoice::CustomerBalanceTransaction::Action } + + # @!attribute amount + # The value of the amount changed in the transaction. + # + # @return [String] + required :amount, String + + # @!attribute created_at + # The creation time of this transaction. + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_note + # + # @return [Orb::Models::Invoice::CustomerBalanceTransaction::CreditNote, nil] + required :credit_note, -> { Orb::Models::Invoice::CustomerBalanceTransaction::CreditNote }, nil?: true + + # @!attribute description + # An optional description provided for manual customer balance adjustments. + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # The new value of the customer's balance prior to the transaction, in the + # customer's currency. + # + # @return [String] + required :ending_balance, String + + # @!attribute invoice + # + # @return [Orb::Models::Invoice::CustomerBalanceTransaction::Invoice, nil] + required :invoice, -> { Orb::Models::Invoice::CustomerBalanceTransaction::Invoice }, nil?: true + + # @!attribute starting_balance + # The original value of the customer's balance prior to the transaction, in the + # customer's currency. + # + # @return [String] + required :starting_balance, String + + # @!attribute type + # + # @return [Symbol, Orb::Models::Invoice::CustomerBalanceTransaction::Type] + required :type, enum: -> { Orb::Models::Invoice::CustomerBalanceTransaction::Type } + + # @!parse + # # @param id [String] + # # @param action [Symbol, Orb::Models::Invoice::CustomerBalanceTransaction::Action] + # # @param amount [String] + # # @param created_at [Time] + # # @param credit_note [Orb::Models::Invoice::CustomerBalanceTransaction::CreditNote, nil] + # # @param description [String, nil] + # # @param ending_balance [String] + # # @param invoice [Orb::Models::Invoice::CustomerBalanceTransaction::Invoice, nil] + # # @param starting_balance [String] + # # @param type [Symbol, Orb::Models::Invoice::CustomerBalanceTransaction::Type] + # # + # def initialize( + # id:, + # action:, + # amount:, + # created_at:, + # credit_note:, + # description:, + # ending_balance:, + # invoice:, + # starting_balance:, + # type:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case action + # in :applied_to_invoice + # # ... + # in :manual_adjustment + # # ... + # in :prorated_refund + # # ... + # in :revert_prorated_refund + # # ... + # in :return_from_voiding + # # ... + # in ... + # #... + # end + # ``` + class Action < Orb::Enum + APPLIED_TO_INVOICE = :applied_to_invoice + MANUAL_ADJUSTMENT = :manual_adjustment + PRORATED_REFUND = :prorated_refund + REVERT_PRORATED_REFUND = :revert_prorated_refund + RETURN_FROM_VOIDING = :return_from_voiding + CREDIT_NOTE_APPLIED = :credit_note_applied + CREDIT_NOTE_VOIDED = :credit_note_voided + OVERPAYMENT_REFUND = :overpayment_refund + EXTERNAL_PAYMENT = :external_payment + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class CreditNote < Orb::BaseModel + # @!attribute id + # The id of the Credit note + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Invoice < Orb::BaseModel + # @!attribute id + # The Invoice id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case type + # in :increment + # # ... + # in :decrement + # # ... + # end + # ``` + class Type < Orb::Enum + INCREMENT = :increment + DECREMENT = :decrement + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class CustomerTaxID < Orb::BaseModel + # @!attribute country + # + # @return [Symbol, Orb::Models::Invoice::CustomerTaxID::Country] + required :country, enum: -> { Orb::Models::Invoice::CustomerTaxID::Country } + + # @!attribute type + # + # @return [Symbol, Orb::Models::Invoice::CustomerTaxID::Type] + required :type, enum: -> { Orb::Models::Invoice::CustomerTaxID::Type } + + # @!attribute value + # + # @return [String] + required :value, String + + # @!parse + # # Tax IDs are commonly required to be displayed on customer invoices, which are + # # added to the headers of invoices. + # # + # # ### Supported Tax ID Countries and Types + # # + # # | Country | Type | Description | + # # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | + # # | Andorra | `ad_nrt` | Andorran NRT Number | + # # | Argentina | `ar_cuit` | Argentinian Tax ID Number | + # # | Australia | `au_abn` | Australian Business Number (AU ABN) | + # # | Australia | `au_arn` | Australian Taxation Office Reference Number | + # # | Austria | `eu_vat` | European VAT Number | + # # | Bahrain | `bh_vat` | Bahraini VAT Number | + # # | Belgium | `eu_vat` | European VAT Number | + # # | Bolivia | `bo_tin` | Bolivian Tax ID | + # # | Brazil | `br_cnpj` | Brazilian CNPJ Number | + # # | Brazil | `br_cpf` | Brazilian CPF Number | + # # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | + # # | Bulgaria | `eu_vat` | European VAT Number | + # # | Canada | `ca_bn` | Canadian BN | + # # | Canada | `ca_gst_hst` | Canadian GST/HST Number | + # # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | + # # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | + # # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | + # # | Canada | `ca_qst` | Canadian QST Number (Québec) | + # # | Chile | `cl_tin` | Chilean TIN | + # # | China | `cn_tin` | Chinese Tax ID | + # # | Colombia | `co_nit` | Colombian NIT Number | + # # | Costa Rica | `cr_tin` | Costa Rican Tax ID | + # # | Croatia | `eu_vat` | European VAT Number | + # # | Cyprus | `eu_vat` | European VAT Number | + # # | Czech Republic | `eu_vat` | European VAT Number | + # # | Denmark | `eu_vat` | European VAT Number | + # # | Dominican Republic | `do_rcn` | Dominican RCN Number | + # # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | + # # | Egypt | `eg_tin` | Egyptian Tax Identification Number | + # # | El Salvador | `sv_nit` | El Salvadorian NIT Number | + # # | Estonia | `eu_vat` | European VAT Number | + # # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # # | Finland | `eu_vat` | European VAT Number | + # # | France | `eu_vat` | European VAT Number | + # # | Georgia | `ge_vat` | Georgian VAT | + # # | Germany | `eu_vat` | European VAT Number | + # # | Greece | `eu_vat` | European VAT Number | + # # | Hong Kong | `hk_br` | Hong Kong BR Number | + # # | Hungary | `eu_vat` | European VAT Number | + # # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | + # # | Iceland | `is_vat` | Icelandic VAT | + # # | India | `in_gst` | Indian GST Number | + # # | Indonesia | `id_npwp` | Indonesian NPWP Number | + # # | Ireland | `eu_vat` | European VAT Number | + # # | Israel | `il_vat` | Israel VAT | + # # | Italy | `eu_vat` | European VAT Number | + # # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | + # # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | + # # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | + # # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | + # # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | + # # | Latvia | `eu_vat` | European VAT Number | + # # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | + # # | Lithuania | `eu_vat` | European VAT Number | + # # | Luxembourg | `eu_vat` | European VAT Number | + # # | Malaysia | `my_frp` | Malaysian FRP Number | + # # | Malaysia | `my_itn` | Malaysian ITN | + # # | Malaysia | `my_sst` | Malaysian SST Number | + # # | Malta | `eu_vat ` | European VAT Number | + # # | Mexico | `mx_rfc` | Mexican RFC Number | + # # | Netherlands | `eu_vat` | European VAT Number | + # # | New Zealand | `nz_gst` | New Zealand GST Number | + # # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | + # # | Norway | `no_vat` | Norwegian VAT Number | + # # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | + # # | Oman | `om_vat` | Omani VAT Number | + # # | Peru | `pe_ruc` | Peruvian RUC Number | + # # | Philippines | `ph_tin ` | Philippines Tax Identification Number | + # # | Poland | `eu_vat` | European VAT Number | + # # | Portugal | `eu_vat` | European VAT Number | + # # | Romania | `eu_vat` | European VAT Number | + # # | Romania | `ro_tin` | Romanian Tax ID Number | + # # | Russia | `ru_inn` | Russian INN | + # # | Russia | `ru_kpp` | Russian KPP | + # # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | + # # | Serbia | `rs_pib` | Serbian PIB Number | + # # | Singapore | `sg_gst` | Singaporean GST | + # # | Singapore | `sg_uen` | Singaporean UEN | + # # | Slovakia | `eu_vat` | European VAT Number | + # # | Slovenia | `eu_vat` | European VAT Number | + # # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | + # # | South Africa | `za_vat` | South African VAT Number | + # # | South Korea | `kr_brn` | Korean BRN | + # # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | + # # | Spain | `eu_vat` | European VAT Number | + # # | Sweden | `eu_vat` | European VAT Number | + # # | Switzerland | `ch_vat` | Switzerland VAT Number | + # # | Taiwan | `tw_vat` | Taiwanese VAT | + # # | Thailand | `th_vat` | Thai VAT | + # # | Turkey | `tr_tin` | Turkish Tax Identification Number | + # # | Ukraine | `ua_vat` | Ukrainian VAT | + # # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | + # # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | + # # | United Kingdom | `gb_vat` | United Kingdom VAT Number | + # # | United States | `us_ein` | United States EIN | + # # | Uruguay | `uy_ruc` | Uruguayan RUC Number | + # # | Venezuela | `ve_rif` | Venezuelan RIF Number | + # # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | + # # + # # @param country [Symbol, Orb::Models::Invoice::CustomerTaxID::Country] + # # @param type [Symbol, Orb::Models::Invoice::CustomerTaxID::Type] + # # @param value [String] + # # + # def initialize(country:, type:, value:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case country + # in :AD + # # ... + # in :AE + # # ... + # in :AR + # # ... + # in :AT + # # ... + # in :AU + # # ... + # in ... + # #... + # end + # ``` + class Country < Orb::Enum + AD = :AD + AE = :AE + AR = :AR + AT = :AT + AU = :AU + BE = :BE + BG = :BG + BH = :BH + BO = :BO + BR = :BR + CA = :CA + CH = :CH + CL = :CL + CN = :CN + CO = :CO + CR = :CR + CY = :CY + CZ = :CZ + DE = :DE + DK = :DK + EE = :EE + DO = :DO + EC = :EC + EG = :EG + ES = :ES + EU = :EU + FI = :FI + FR = :FR + GB = :GB + GE = :GE + GR = :GR + HK = :HK + HR = :HR + HU = :HU + ID = :ID + IE = :IE + IL = :IL + IN = :IN + IS = :IS + IT = :IT + JP = :JP + KE = :KE + KR = :KR + KZ = :KZ + LI = :LI + LT = :LT + LU = :LU + LV = :LV + MT = :MT + MX = :MX + MY = :MY + NG = :NG + NL = :NL + NO = :NO + NZ = :NZ + OM = :OM + PE = :PE + PH = :PH + PL = :PL + PT = :PT + RO = :RO + RS = :RS + RU = :RU + SA = :SA + SE = :SE + SG = :SG + SI = :SI + SK = :SK + SV = :SV + TH = :TH + TR = :TR + TW = :TW + UA = :UA + US = :US + UY = :UY + VE = :VE + VN = :VN + ZA = :ZA + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + # @abstract + # + # @example + # ```ruby + # case type + # in :ad_nrt + # # ... + # in :ae_trn + # # ... + # in :ar_cuit + # # ... + # in :eu_vat + # # ... + # in :au_abn + # # ... + # in ... + # #... + # end + # ``` + class Type < Orb::Enum + AD_NRT = :ad_nrt + AE_TRN = :ae_trn + AR_CUIT = :ar_cuit + EU_VAT = :eu_vat + AU_ABN = :au_abn + AU_ARN = :au_arn + BG_UIC = :bg_uic + BH_VAT = :bh_vat + BO_TIN = :bo_tin + BR_CNPJ = :br_cnpj + BR_CPF = :br_cpf + CA_BN = :ca_bn + CA_GST_HST = :ca_gst_hst + CA_PST_BC = :ca_pst_bc + CA_PST_MB = :ca_pst_mb + CA_PST_SK = :ca_pst_sk + CA_QST = :ca_qst + CH_VAT = :ch_vat + CL_TIN = :cl_tin + CN_TIN = :cn_tin + CO_NIT = :co_nit + CR_TIN = :cr_tin + DO_RCN = :do_rcn + EC_RUC = :ec_ruc + EG_TIN = :eg_tin + ES_CIF = :es_cif + EU_OSS_VAT = :eu_oss_vat + GB_VAT = :gb_vat + GE_VAT = :ge_vat + HK_BR = :hk_br + HU_TIN = :hu_tin + ID_NPWP = :id_npwp + IL_VAT = :il_vat + IN_GST = :in_gst + IS_VAT = :is_vat + JP_CN = :jp_cn + JP_RN = :jp_rn + JP_TRN = :jp_trn + KE_PIN = :ke_pin + KR_BRN = :kr_brn + KZ_BIN = :kz_bin + LI_UID = :li_uid + MX_RFC = :mx_rfc + MY_FRP = :my_frp + MY_ITN = :my_itn + MY_SST = :my_sst + NG_TIN = :ng_tin + NO_VAT = :no_vat + NO_VOEC = :no_voec + NZ_GST = :nz_gst + OM_VAT = :om_vat + PE_RUC = :pe_ruc + PH_TIN = :ph_tin + RO_TIN = :ro_tin + RS_PIB = :rs_pib + RU_INN = :ru_inn + RU_KPP = :ru_kpp + SA_VAT = :sa_vat + SG_GST = :sg_gst + SG_UEN = :sg_uen + SI_TIN = :si_tin + SV_NIT = :sv_nit + TH_VAT = :th_vat + TR_TIN = :tr_tin + TW_VAT = :tw_vat + UA_VAT = :ua_vat + US_EIN = :us_ein + UY_RUC = :uy_ruc + VE_RIF = :ve_rif + VN_TIN = :vn_tin + ZA_VAT = :za_vat + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -486,6 +1167,1146 @@ class InvoiceSource < Orb::Enum # def self.values; end end + class LineItem < Orb::BaseModel + # @!attribute id + # A unique ID for this line item. + # + # @return [String] + required :id, String + + # @!attribute adjusted_subtotal + # The line amount after any adjustments and before overage conversion, credits and + # partial invoicing. + # + # @return [String] + required :adjusted_subtotal, String + + # @!attribute adjustments + # All adjustments (ie. maximums, minimums, discounts) applied to the line item. + # + # @return [Array] + required :adjustments, -> { Orb::ArrayOf[union: Orb::Models::Invoice::LineItem::Adjustment] } + + # @!attribute amount + # The final amount for a line item after all adjustments and pre paid credits have + # been applied. + # + # @return [String] + required :amount, String + + # @!attribute credits_applied + # The number of prepaid credits applied. + # + # @return [String] + required :credits_applied, String + + # @!attribute discount + # + # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] + required :discount, union: -> { Orb::Models::Discount }, nil?: true + + # @!attribute end_date + # The end date of the range of time applied for this line item's price. + # + # @return [Time] + required :end_date, Time + + # @!attribute filter + # An additional filter that was used to calculate the usage for this line item. + # + # @return [String, nil] + required :filter, String, nil?: true + + # @!attribute grouping + # [DEPRECATED] For configured prices that are split by a grouping key, this will + # be populated with the key and a value. The `amount` and `subtotal` will be the + # values for this particular grouping. + # + # @return [String, nil] + required :grouping, String, nil?: true + + # @!attribute maximum + # This field is deprecated in favor of `adjustments`. + # + # @return [Orb::Models::Invoice::LineItem::Maximum, nil] + required :maximum, -> { Orb::Models::Invoice::LineItem::Maximum }, nil?: true + + # @!attribute maximum_amount + # This field is deprecated in favor of `adjustments`. + # + # @return [String, nil] + required :maximum_amount, String, nil?: true + + # @!attribute minimum + # This field is deprecated in favor of `adjustments`. + # + # @return [Orb::Models::Invoice::LineItem::Minimum, nil] + required :minimum, -> { Orb::Models::Invoice::LineItem::Minimum }, nil?: true + + # @!attribute minimum_amount + # This field is deprecated in favor of `adjustments`. + # + # @return [String, nil] + required :minimum_amount, String, nil?: true + + # @!attribute name + # The name of the price associated with this line item. + # + # @return [String] + required :name, String + + # @!attribute partially_invoiced_amount + # Any amount applied from a partial invoice + # + # @return [String] + required :partially_invoiced_amount, String + + # @!attribute price + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) + # + # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice, nil] + required :price, union: -> { Orb::Models::Price }, nil?: true + + # @!attribute quantity + # Either the fixed fee quantity or the usage during the service period. + # + # @return [Float] + required :quantity, Float + + # @!attribute start_date + # The start date of the range of time applied for this line item's price. + # + # @return [Time] + required :start_date, Time + + # @!attribute sub_line_items + # For complex pricing structures, the line item can be broken down further in + # `sub_line_items`. + # + # @return [Array] + required :sub_line_items, -> { Orb::ArrayOf[union: Orb::Models::Invoice::LineItem::SubLineItem] } + + # @!attribute subtotal + # The line amount before before any adjustments. + # + # @return [String] + required :subtotal, String + + # @!attribute tax_amounts + # An array of tax rates and their incurred tax amounts. Empty if no tax + # integration is configured. + # + # @return [Array] + required :tax_amounts, -> { Orb::ArrayOf[Orb::Models::Invoice::LineItem::TaxAmount] } + + # @!attribute usage_customer_ids + # A list of customer ids that were used to calculate the usage for this line item. + # + # @return [Array, nil] + required :usage_customer_ids, Orb::ArrayOf[String], nil?: true + + # @!parse + # # @param id [String] + # # @param adjusted_subtotal [String] + # # @param adjustments [Array] + # # @param amount [String] + # # @param credits_applied [String] + # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] + # # @param end_date [Time] + # # @param filter [String, nil] + # # @param grouping [String, nil] + # # @param maximum [Orb::Models::Invoice::LineItem::Maximum, nil] + # # @param maximum_amount [String, nil] + # # @param minimum [Orb::Models::Invoice::LineItem::Minimum, nil] + # # @param minimum_amount [String, nil] + # # @param name [String] + # # @param partially_invoiced_amount [String] + # # @param price [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice, nil] + # # @param quantity [Float] + # # @param start_date [Time] + # # @param sub_line_items [Array] + # # @param subtotal [String] + # # @param tax_amounts [Array] + # # @param usage_customer_ids [Array, nil] + # # + # def initialize( + # id:, + # adjusted_subtotal:, + # adjustments:, + # amount:, + # credits_applied:, + # discount:, + # end_date:, + # filter:, + # grouping:, + # maximum:, + # maximum_amount:, + # minimum:, + # minimum_amount:, + # name:, + # partially_invoiced_amount:, + # price:, + # quantity:, + # start_date:, + # sub_line_items:, + # subtotal:, + # tax_amounts:, + # usage_customer_ids:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case adjustment + # in {adjustment_type: "usage_discount", id: String, amount: String, applies_to_price_ids: ^(Orb::ArrayOf[String])} + # # Orb::Models::Invoice::LineItem::Adjustment::MonetaryUsageDiscountAdjustment ... + # in {adjustment_type: "amount_discount", id: String, amount: String, amount_discount: String} + # # Orb::Models::Invoice::LineItem::Adjustment::MonetaryAmountDiscountAdjustment ... + # in { + # adjustment_type: "percentage_discount", + # id: String, + # amount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::Invoice::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment ... + # in {adjustment_type: "minimum", id: String, amount: String, applies_to_price_ids: ^(Orb::ArrayOf[String])} + # # Orb::Models::Invoice::LineItem::Adjustment::MonetaryMinimumAdjustment ... + # in {adjustment_type: "maximum", id: String, amount: String, applies_to_price_ids: ^(Orb::ArrayOf[String])} + # # Orb::Models::Invoice::LineItem::Adjustment::MonetaryMaximumAdjustment ... + # end + # ``` + # + # @example + # ```ruby + # case adjustment + # in Orb::Models::Invoice::LineItem::Adjustment::MonetaryUsageDiscountAdjustment + # # ... + # in Orb::Models::Invoice::LineItem::Adjustment::MonetaryAmountDiscountAdjustment + # # ... + # in Orb::Models::Invoice::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment + # # ... + # in Orb::Models::Invoice::LineItem::Adjustment::MonetaryMinimumAdjustment + # # ... + # in Orb::Models::Invoice::LineItem::Adjustment::MonetaryMaximumAdjustment + # # ... + # end + # ``` + class Adjustment < Orb::Union + discriminator :adjustment_type + + variant :usage_discount, + -> { Orb::Models::Invoice::LineItem::Adjustment::MonetaryUsageDiscountAdjustment } + + variant :amount_discount, + -> { Orb::Models::Invoice::LineItem::Adjustment::MonetaryAmountDiscountAdjustment } + + variant :percentage_discount, + -> { Orb::Models::Invoice::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment } + + variant :minimum, -> { Orb::Models::Invoice::LineItem::Adjustment::MonetaryMinimumAdjustment } + + variant :maximum, -> { Orb::Models::Invoice::LineItem::Adjustment::MonetaryMaximumAdjustment } + + class MonetaryUsageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :usage_discount] + required :adjustment_type, const: :usage_discount + + # @!attribute amount + # The value applied by an adjustment. + # + # @return [String] + required :amount, String + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!attribute usage_discount + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param id [String] + # # @param amount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param reason [String, nil] + # # @param usage_discount [Float] + # # @param adjustment_type [Symbol, :usage_discount] + # # + # def initialize( + # id:, + # amount:, + # applies_to_price_ids:, + # is_invoice_level:, + # reason:, + # usage_discount:, + # adjustment_type: :usage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MonetaryAmountDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :amount_discount] + required :adjustment_type, const: :amount_discount + + # @!attribute amount + # The value applied by an adjustment. + # + # @return [String] + required :amount, String + + # @!attribute amount_discount + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount [String] + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :amount_discount] + # # + # def initialize( + # id:, + # amount:, + # amount_discount:, + # applies_to_price_ids:, + # is_invoice_level:, + # reason:, + # adjustment_type: :amount_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MonetaryPercentageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :percentage_discount] + required :adjustment_type, const: :percentage_discount + + # @!attribute amount + # The value applied by an adjustment. + # + # @return [String] + required :amount, String + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute percentage_discount + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param percentage_discount [Float] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :percentage_discount] + # # + # def initialize( + # id:, + # amount:, + # applies_to_price_ids:, + # is_invoice_level:, + # percentage_discount:, + # reason:, + # adjustment_type: :percentage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MonetaryMinimumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :minimum] + required :adjustment_type, const: :minimum + + # @!attribute amount + # The value applied by an adjustment. + # + # @return [String] + required :amount, String + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute item_id + # The item ID that revenue from this minimum will be attributed to. + # + # @return [String] + required :item_id, String + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param item_id [String] + # # @param minimum_amount [String] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :minimum] + # # + # def initialize( + # id:, + # amount:, + # applies_to_price_ids:, + # is_invoice_level:, + # item_id:, + # minimum_amount:, + # reason:, + # adjustment_type: :minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MonetaryMaximumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :maximum] + required :adjustment_type, const: :maximum + + # @!attribute amount + # The value applied by an adjustment. + # + # @return [String] + required :amount, String + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param maximum_amount [String] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :maximum] + # # + # def initialize( + # id:, + # amount:, + # applies_to_price_ids:, + # is_invoice_level:, + # maximum_amount:, + # reason:, + # adjustment_type: :maximum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + # @deprecated + # + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # This field is deprecated in favor of `adjustments`. + # # + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @deprecated + # + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # This field is deprecated in favor of `adjustments`. + # # + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case sub_line_item + # in { + # type: "matrix", + # amount: String, + # grouping: Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::Grouping, + # matrix_config: Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig + # } + # # Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem ... + # in { + # type: "tier", + # amount: String, + # grouping: Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::Grouping, + # name: String + # } + # # Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem ... + # in { + # type: "'null'", + # amount: String, + # grouping: Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem::Grouping, + # name: String + # } + # # Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem ... + # end + # ``` + # + # @example + # ```ruby + # case sub_line_item + # in Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem + # # ... + # in Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem + # # ... + # in Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem + # # ... + # end + # ``` + class SubLineItem < Orb::Union + discriminator :type + + variant :matrix, -> { Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem } + + variant :tier, -> { Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem } + + variant :"'null'", -> { Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem } + + class MatrixSubLineItem < Orb::BaseModel + # @!attribute amount + # The total amount for this sub line item. + # + # @return [String] + required :amount, String + + # @!attribute grouping + # + # @return [Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::Grouping, nil] + required :grouping, + -> { Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::Grouping }, + nil?: true + + # @!attribute matrix_config + # + # @return [Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig] + required :matrix_config, + -> { Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig } + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute quantity + # + # @return [Float] + required :quantity, Float + + # @!attribute type + # + # @return [Symbol, :matrix] + required :type, const: :matrix + + # @!parse + # # @param amount [String] + # # @param grouping [Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::Grouping, nil] + # # @param matrix_config [Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig] + # # @param name [String] + # # @param quantity [Float] + # # @param type [Symbol, :matrix] + # # + # def initialize(amount:, grouping:, matrix_config:, name:, quantity:, type: :matrix, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Grouping < Orb::BaseModel + # @!attribute key + # + # @return [String] + required :key, String + + # @!attribute value + # No value indicates the default group + # + # @return [String, nil] + required :value, String, nil?: true + + # @!parse + # # @param key [String] + # # @param value [String, nil] + # # + # def initialize(key:, value:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MatrixConfig < Orb::BaseModel + # @!attribute dimension_values + # The ordered dimension values for this line item. + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String, nil?: true] + + # @!parse + # # @param dimension_values [Array] + # # + # def initialize(dimension_values:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class TierSubLineItem < Orb::BaseModel + # @!attribute amount + # The total amount for this sub line item. + # + # @return [String] + required :amount, String + + # @!attribute grouping + # + # @return [Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::Grouping, nil] + required :grouping, + -> { Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::Grouping }, + nil?: true + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute quantity + # + # @return [Float] + required :quantity, Float + + # @!attribute tier_config + # + # @return [Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::TierConfig] + required :tier_config, -> { Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::TierConfig } + + # @!attribute type + # + # @return [Symbol, :tier] + required :type, const: :tier + + # @!parse + # # @param amount [String] + # # @param grouping [Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::Grouping, nil] + # # @param name [String] + # # @param quantity [Float] + # # @param tier_config [Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::TierConfig] + # # @param type [Symbol, :tier] + # # + # def initialize(amount:, grouping:, name:, quantity:, tier_config:, type: :tier, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Grouping < Orb::BaseModel + # @!attribute key + # + # @return [String] + required :key, String + + # @!attribute value + # No value indicates the default group + # + # @return [String, nil] + required :value, String, nil?: true + + # @!parse + # # @param key [String] + # # @param value [String, nil] + # # + # def initialize(key:, value:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class TierConfig < Orb::BaseModel + # @!attribute first_unit + # + # @return [Float] + required :first_unit, Float + + # @!attribute last_unit + # + # @return [Float, nil] + required :last_unit, Float, nil?: true + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!parse + # # @param first_unit [Float] + # # @param last_unit [Float, nil] + # # @param unit_amount [String] + # # + # def initialize(first_unit:, last_unit:, unit_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class OtherSubLineItem < Orb::BaseModel + # @!attribute amount + # The total amount for this sub line item. + # + # @return [String] + required :amount, String + + # @!attribute grouping + # + # @return [Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem::Grouping, nil] + required :grouping, + -> { Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem::Grouping }, + nil?: true + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute quantity + # + # @return [Float] + required :quantity, Float + + # @!attribute type + # + # @return [Symbol, :"'null'"] + required :type, const: :"'null'" + + # @!parse + # # @param amount [String] + # # @param grouping [Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem::Grouping, nil] + # # @param name [String] + # # @param quantity [Float] + # # @param type [Symbol, :"'null'"] + # # + # def initialize(amount:, grouping:, name:, quantity:, type: :"'null'", **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Grouping < Orb::BaseModel + # @!attribute key + # + # @return [String] + required :key, String + + # @!attribute value + # No value indicates the default group + # + # @return [String, nil] + required :value, String, nil?: true + + # @!parse + # # @param key [String] + # # @param value [String, nil] + # # + # def initialize(key:, value:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end + + class TaxAmount < Orb::BaseModel + # @!attribute amount + # The amount of additional tax incurred by this tax rate. + # + # @return [String] + required :amount, String + + # @!attribute tax_rate_description + # The human-readable description of the applied tax rate. + # + # @return [String] + required :tax_rate_description, String + + # @!attribute tax_rate_percentage + # The tax rate percentage, out of 100. + # + # @return [String, nil] + required :tax_rate_percentage, String, nil?: true + + # @!parse + # # @param amount [String] + # # @param tax_rate_description [String] + # # @param tax_rate_percentage [String, nil] + # # + # def initialize(amount:, tax_rate_description:, tax_rate_percentage:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PaymentAttempt < Orb::BaseModel + # @!attribute id + # The ID of the payment attempt. + # + # @return [String] + required :id, String + + # @!attribute amount + # The amount of the payment attempt. + # + # @return [String] + required :amount, String + + # @!attribute created_at + # The time at which the payment attempt was created. + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_provider + # The payment provider that attempted to collect the payment. + # + # @return [Symbol, Orb::Models::Invoice::PaymentAttempt::PaymentProvider, nil] + required :payment_provider, enum: -> { Orb::Models::Invoice::PaymentAttempt::PaymentProvider }, nil?: true + + # @!attribute payment_provider_id + # The ID of the payment attempt in the payment provider. + # + # @return [String, nil] + required :payment_provider_id, String, nil?: true + + # @!attribute succeeded + # Whether the payment attempt succeeded. + # + # @return [Boolean] + required :succeeded, Orb::BooleanModel + + # @!parse + # # @param id [String] + # # @param amount [String] + # # @param created_at [Time] + # # @param payment_provider [Symbol, Orb::Models::Invoice::PaymentAttempt::PaymentProvider, nil] + # # @param payment_provider_id [String, nil] + # # @param succeeded [Boolean] + # # + # def initialize(id:, amount:, created_at:, payment_provider:, payment_provider_id:, succeeded:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The payment provider that attempted to collect the payment. + # + # @example + # ```ruby + # case payment_provider + # in :stripe + # # ... + # end + # ``` + class PaymentProvider < Orb::Enum + STRIPE = :stripe + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class ShippingAddress < Orb::BaseModel + # @!attribute city + # + # @return [String, nil] + required :city, String, nil?: true + + # @!attribute country + # + # @return [String, nil] + required :country, String, nil?: true + + # @!attribute line1 + # + # @return [String, nil] + required :line1, String, nil?: true + + # @!attribute line2 + # + # @return [String, nil] + required :line2, String, nil?: true + + # @!attribute postal_code + # + # @return [String, nil] + required :postal_code, String, nil?: true + + # @!attribute state + # + # @return [String, nil] + required :state, String, nil?: true + + # @!parse + # # @param city [String, nil] + # # @param country [String, nil] + # # @param line1 [String, nil] + # # @param line2 [String, nil] + # # @param postal_code [String, nil] + # # @param state [String, nil] + # # + # def initialize(city:, country:, line1:, line2:, postal_code:, state:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -517,6 +2338,20 @@ class Status < Orb::Enum # # # def self.values; end end + + class Subscription < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end end end diff --git a/lib/orb/models/invoice_create_params.rb b/lib/orb/models/invoice_create_params.rb index f5aee864..73894b77 100644 --- a/lib/orb/models/invoice_create_params.rb +++ b/lib/orb/models/invoice_create_params.rb @@ -149,8 +149,8 @@ class LineItem < Orb::BaseModel # @!attribute unit_config # - # @return [Orb::Models::UnitConfigModel] - required :unit_config, -> { Orb::Models::UnitConfigModel } + # @return [Orb::Models::InvoiceCreateParams::LineItem::UnitConfig] + required :unit_config, -> { Orb::Models::InvoiceCreateParams::LineItem::UnitConfig } # @!parse # # @param end_date [Date] @@ -159,7 +159,7 @@ class LineItem < Orb::BaseModel # # @param name [String] # # @param quantity [Float] # # @param start_date [Date] - # # @param unit_config [Orb::Models::UnitConfigModel] + # # @param unit_config [Orb::Models::InvoiceCreateParams::LineItem::UnitConfig] # # # def initialize(end_date:, item_id:, model_type:, name:, quantity:, start_date:, unit_config:, **) = super @@ -184,6 +184,21 @@ class ModelType < Orb::Enum # # # def self.values; end end + + class UnitConfig < Orb::BaseModel + # @!attribute unit_amount + # Rate per unit of usage + # + # @return [String] + required :unit_amount, String + + # @!parse + # # @param unit_amount [String] + # # + # def initialize(unit_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end end end diff --git a/lib/orb/models/invoice_fetch_upcoming_response.rb b/lib/orb/models/invoice_fetch_upcoming_response.rb index 9044048c..a6d5548c 100644 --- a/lib/orb/models/invoice_fetch_upcoming_response.rb +++ b/lib/orb/models/invoice_fetch_upcoming_response.rb @@ -17,13 +17,13 @@ class InvoiceFetchUpcomingResponse < Orb::BaseModel # @!attribute auto_collection # - # @return [Orb::Models::AutoCollectionModel] - required :auto_collection, -> { Orb::Models::AutoCollectionModel } + # @return [Orb::Models::InvoiceFetchUpcomingResponse::AutoCollection] + required :auto_collection, -> { Orb::Models::InvoiceFetchUpcomingResponse::AutoCollection } # @!attribute billing_address # - # @return [Orb::Models::AddressModel, nil] - required :billing_address, -> { Orb::Models::AddressModel }, nil?: true + # @return [Orb::Models::InvoiceFetchUpcomingResponse::BillingAddress, nil] + required :billing_address, -> { Orb::Models::InvoiceFetchUpcomingResponse::BillingAddress }, nil?: true # @!attribute created_at # The creation time of the resource in Orb. @@ -34,8 +34,8 @@ class InvoiceFetchUpcomingResponse < Orb::BaseModel # @!attribute credit_notes # A list of credit notes associated with the invoice # - # @return [Array] - required :credit_notes, -> { Orb::ArrayOf[Orb::Models::CreditNoteSummaryModel] } + # @return [Array] + required :credit_notes, -> { Orb::ArrayOf[Orb::Models::InvoiceFetchUpcomingResponse::CreditNote] } # @!attribute currency # An ISO 4217 currency string or `credits` @@ -45,13 +45,14 @@ class InvoiceFetchUpcomingResponse < Orb::BaseModel # @!attribute customer # - # @return [Orb::Models::CustomerMinifiedModel] - required :customer, -> { Orb::Models::CustomerMinifiedModel } + # @return [Orb::Models::InvoiceFetchUpcomingResponse::Customer] + required :customer, -> { Orb::Models::InvoiceFetchUpcomingResponse::Customer } # @!attribute customer_balance_transactions # - # @return [Array] - required :customer_balance_transactions, -> { Orb::ArrayOf[Orb::Models::CustomerBalanceTransactionModel] } + # @return [Array] + required :customer_balance_transactions, + -> { Orb::ArrayOf[Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction] } # @!attribute customer_tax_id # Tax IDs are commonly required to be displayed on customer invoices, which are @@ -160,8 +161,8 @@ class InvoiceFetchUpcomingResponse < Orb::BaseModel # | Venezuela | `ve_rif` | Venezuelan RIF Number | # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | # - # @return [Orb::Models::CustomerTaxIDModel, nil] - required :customer_tax_id, -> { Orb::Models::CustomerTaxIDModel }, nil?: true + # @return [Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID, nil] + required :customer_tax_id, -> { Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID }, nil?: true # @!attribute discount # This field is deprecated in favor of `discounts`. If a `discounts` list is @@ -234,13 +235,13 @@ class InvoiceFetchUpcomingResponse < Orb::BaseModel # @!attribute line_items # The breakdown of prices in this invoice. # - # @return [Array] - required :line_items, -> { Orb::ArrayOf[Orb::Models::InvoiceLineItemModel] } + # @return [Array] + required :line_items, -> { Orb::ArrayOf[Orb::Models::InvoiceFetchUpcomingResponse::LineItem] } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::InvoiceFetchUpcomingResponse::Maximum, nil] + required :maximum, -> { Orb::Models::InvoiceFetchUpcomingResponse::Maximum }, nil?: true # @!attribute maximum_amount # @@ -264,8 +265,8 @@ class InvoiceFetchUpcomingResponse < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::InvoiceFetchUpcomingResponse::Minimum, nil] + required :minimum, -> { Orb::Models::InvoiceFetchUpcomingResponse::Minimum }, nil?: true # @!attribute minimum_amount # @@ -282,8 +283,8 @@ class InvoiceFetchUpcomingResponse < Orb::BaseModel # @!attribute payment_attempts # A list of payment attempts associated with the invoice # - # @return [Array] - required :payment_attempts, -> { Orb::ArrayOf[Orb::Models::PaymentAttemptModel] } + # @return [Array] + required :payment_attempts, -> { Orb::ArrayOf[Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt] } # @!attribute payment_failed_at # If payment was attempted on this invoice but failed, this will be the time of @@ -309,8 +310,8 @@ class InvoiceFetchUpcomingResponse < Orb::BaseModel # @!attribute shipping_address # - # @return [Orb::Models::AddressModel, nil] - required :shipping_address, -> { Orb::Models::AddressModel }, nil?: true + # @return [Orb::Models::InvoiceFetchUpcomingResponse::ShippingAddress, nil] + required :shipping_address, -> { Orb::Models::InvoiceFetchUpcomingResponse::ShippingAddress }, nil?: true # @!attribute status # @@ -319,8 +320,8 @@ class InvoiceFetchUpcomingResponse < Orb::BaseModel # @!attribute subscription # - # @return [Orb::Models::SubscriptionMinifiedModel, nil] - required :subscription, -> { Orb::Models::SubscriptionMinifiedModel }, nil?: true + # @return [Orb::Models::InvoiceFetchUpcomingResponse::Subscription, nil] + required :subscription, -> { Orb::Models::InvoiceFetchUpcomingResponse::Subscription }, nil?: true # @!attribute subtotal # The total before any discounts and minimums are applied. @@ -365,14 +366,14 @@ class InvoiceFetchUpcomingResponse < Orb::BaseModel # @!parse # # @param id [String] # # @param amount_due [String] - # # @param auto_collection [Orb::Models::AutoCollectionModel] - # # @param billing_address [Orb::Models::AddressModel, nil] + # # @param auto_collection [Orb::Models::InvoiceFetchUpcomingResponse::AutoCollection] + # # @param billing_address [Orb::Models::InvoiceFetchUpcomingResponse::BillingAddress, nil] # # @param created_at [Time] - # # @param credit_notes [Array] + # # @param credit_notes [Array] # # @param currency [String] - # # @param customer [Orb::Models::CustomerMinifiedModel] - # # @param customer_balance_transactions [Array] - # # @param customer_tax_id [Orb::Models::CustomerTaxIDModel, nil] + # # @param customer [Orb::Models::InvoiceFetchUpcomingResponse::Customer] + # # @param customer_balance_transactions [Array] + # # @param customer_tax_id [Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID, nil] # # @param discount [Object] # # @param discounts [Array] # # @param due_date [Time, nil] @@ -383,21 +384,21 @@ class InvoiceFetchUpcomingResponse < Orb::BaseModel # # @param invoice_source [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::InvoiceSource] # # @param issue_failed_at [Time, nil] # # @param issued_at [Time, nil] - # # @param line_items [Array] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param line_items [Array] + # # @param maximum [Orb::Models::InvoiceFetchUpcomingResponse::Maximum, nil] # # @param maximum_amount [String, nil] # # @param memo [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::InvoiceFetchUpcomingResponse::Minimum, nil] # # @param minimum_amount [String, nil] # # @param paid_at [Time, nil] - # # @param payment_attempts [Array] + # # @param payment_attempts [Array] # # @param payment_failed_at [Time, nil] # # @param payment_started_at [Time, nil] # # @param scheduled_issue_at [Time, nil] - # # @param shipping_address [Orb::Models::AddressModel, nil] + # # @param shipping_address [Orb::Models::InvoiceFetchUpcomingResponse::ShippingAddress, nil] # # @param status [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::Status] - # # @param subscription [Orb::Models::SubscriptionMinifiedModel, nil] + # # @param subscription [Orb::Models::InvoiceFetchUpcomingResponse::Subscription, nil] # # @param subtotal [String] # # @param sync_failed_at [Time, nil] # # @param target_date [Time] @@ -454,6 +455,691 @@ class InvoiceFetchUpcomingResponse < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class AutoCollection < Orb::BaseModel + # @!attribute enabled + # True only if auto-collection is enabled for this invoice. + # + # @return [Boolean, nil] + required :enabled, Orb::BooleanModel, nil?: true + + # @!attribute next_attempt_at + # If the invoice is scheduled for auto-collection, this field will reflect when + # the next attempt will occur. If dunning has been exhausted, or auto-collection + # is not enabled for this invoice, this field will be `null`. + # + # @return [Time, nil] + required :next_attempt_at, Time, nil?: true + + # @!attribute num_attempts + # Number of auto-collection payment attempts. + # + # @return [Integer, nil] + required :num_attempts, Integer, nil?: true + + # @!attribute previously_attempted_at + # If Orb has ever attempted payment auto-collection for this invoice, this field + # will reflect when that attempt occurred. In conjunction with `next_attempt_at`, + # this can be used to tell whether the invoice is currently in dunning (that is, + # `previously_attempted_at` is non-null, and `next_attempt_time` is non-null), or + # if dunning has been exhausted (`previously_attempted_at` is non-null, but + # `next_attempt_time` is null). + # + # @return [Time, nil] + required :previously_attempted_at, Time, nil?: true + + # @!parse + # # @param enabled [Boolean, nil] + # # @param next_attempt_at [Time, nil] + # # @param num_attempts [Integer, nil] + # # @param previously_attempted_at [Time, nil] + # # + # def initialize(enabled:, next_attempt_at:, num_attempts:, previously_attempted_at:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingAddress < Orb::BaseModel + # @!attribute city + # + # @return [String, nil] + required :city, String, nil?: true + + # @!attribute country + # + # @return [String, nil] + required :country, String, nil?: true + + # @!attribute line1 + # + # @return [String, nil] + required :line1, String, nil?: true + + # @!attribute line2 + # + # @return [String, nil] + required :line2, String, nil?: true + + # @!attribute postal_code + # + # @return [String, nil] + required :postal_code, String, nil?: true + + # @!attribute state + # + # @return [String, nil] + required :state, String, nil?: true + + # @!parse + # # @param city [String, nil] + # # @param country [String, nil] + # # @param line1 [String, nil] + # # @param line2 [String, nil] + # # @param postal_code [String, nil] + # # @param state [String, nil] + # # + # def initialize(city:, country:, line1:, line2:, postal_code:, state:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class CreditNote < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute credit_note_number + # + # @return [String] + required :credit_note_number, String + + # @!attribute memo + # An optional memo supplied on the credit note. + # + # @return [String, nil] + required :memo, String, nil?: true + + # @!attribute reason + # + # @return [String] + required :reason, String + + # @!attribute total + # + # @return [String] + required :total, String + + # @!attribute type + # + # @return [String] + required :type, String + + # @!attribute voided_at + # If the credit note has a status of `void`, this gives a timestamp when the + # credit note was voided. + # + # @return [Time, nil] + required :voided_at, Time, nil?: true + + # @!parse + # # @param id [String] + # # @param credit_note_number [String] + # # @param memo [String, nil] + # # @param reason [String] + # # @param total [String] + # # @param type [String] + # # @param voided_at [Time, nil] + # # + # def initialize(id:, credit_note_number:, memo:, reason:, total:, type:, voided_at:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Customer < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute external_customer_id + # + # @return [String, nil] + required :external_customer_id, String, nil?: true + + # @!parse + # # @param id [String] + # # @param external_customer_id [String, nil] + # # + # def initialize(id:, external_customer_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class CustomerBalanceTransaction < Orb::BaseModel + # @!attribute id + # A unique id for this transaction. + # + # @return [String] + required :id, String + + # @!attribute action + # + # @return [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Action] + required :action, + enum: -> { Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Action } + + # @!attribute amount + # The value of the amount changed in the transaction. + # + # @return [String] + required :amount, String + + # @!attribute created_at + # The creation time of this transaction. + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_note + # + # @return [Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::CreditNote, nil] + required :credit_note, + -> { Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::CreditNote }, + nil?: true + + # @!attribute description + # An optional description provided for manual customer balance adjustments. + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute ending_balance + # The new value of the customer's balance prior to the transaction, in the + # customer's currency. + # + # @return [String] + required :ending_balance, String + + # @!attribute invoice + # + # @return [Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Invoice, nil] + required :invoice, + -> { Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Invoice }, + nil?: true + + # @!attribute starting_balance + # The original value of the customer's balance prior to the transaction, in the + # customer's currency. + # + # @return [String] + required :starting_balance, String + + # @!attribute type + # + # @return [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Type] + required :type, enum: -> { Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Type } + + # @!parse + # # @param id [String] + # # @param action [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Action] + # # @param amount [String] + # # @param created_at [Time] + # # @param credit_note [Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::CreditNote, nil] + # # @param description [String, nil] + # # @param ending_balance [String] + # # @param invoice [Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Invoice, nil] + # # @param starting_balance [String] + # # @param type [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Type] + # # + # def initialize( + # id:, + # action:, + # amount:, + # created_at:, + # credit_note:, + # description:, + # ending_balance:, + # invoice:, + # starting_balance:, + # type:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case action + # in :applied_to_invoice + # # ... + # in :manual_adjustment + # # ... + # in :prorated_refund + # # ... + # in :revert_prorated_refund + # # ... + # in :return_from_voiding + # # ... + # in ... + # #... + # end + # ``` + class Action < Orb::Enum + APPLIED_TO_INVOICE = :applied_to_invoice + MANUAL_ADJUSTMENT = :manual_adjustment + PRORATED_REFUND = :prorated_refund + REVERT_PRORATED_REFUND = :revert_prorated_refund + RETURN_FROM_VOIDING = :return_from_voiding + CREDIT_NOTE_APPLIED = :credit_note_applied + CREDIT_NOTE_VOIDED = :credit_note_voided + OVERPAYMENT_REFUND = :overpayment_refund + EXTERNAL_PAYMENT = :external_payment + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class CreditNote < Orb::BaseModel + # @!attribute id + # The id of the Credit note + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Invoice < Orb::BaseModel + # @!attribute id + # The Invoice id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case type + # in :increment + # # ... + # in :decrement + # # ... + # end + # ``` + class Type < Orb::Enum + INCREMENT = :increment + DECREMENT = :decrement + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class CustomerTaxID < Orb::BaseModel + # @!attribute country + # + # @return [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country] + required :country, enum: -> { Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country } + + # @!attribute type + # + # @return [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type] + required :type, enum: -> { Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type } + + # @!attribute value + # + # @return [String] + required :value, String + + # @!parse + # # Tax IDs are commonly required to be displayed on customer invoices, which are + # # added to the headers of invoices. + # # + # # ### Supported Tax ID Countries and Types + # # + # # | Country | Type | Description | + # # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | + # # | Andorra | `ad_nrt` | Andorran NRT Number | + # # | Argentina | `ar_cuit` | Argentinian Tax ID Number | + # # | Australia | `au_abn` | Australian Business Number (AU ABN) | + # # | Australia | `au_arn` | Australian Taxation Office Reference Number | + # # | Austria | `eu_vat` | European VAT Number | + # # | Bahrain | `bh_vat` | Bahraini VAT Number | + # # | Belgium | `eu_vat` | European VAT Number | + # # | Bolivia | `bo_tin` | Bolivian Tax ID | + # # | Brazil | `br_cnpj` | Brazilian CNPJ Number | + # # | Brazil | `br_cpf` | Brazilian CPF Number | + # # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | + # # | Bulgaria | `eu_vat` | European VAT Number | + # # | Canada | `ca_bn` | Canadian BN | + # # | Canada | `ca_gst_hst` | Canadian GST/HST Number | + # # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | + # # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | + # # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | + # # | Canada | `ca_qst` | Canadian QST Number (Québec) | + # # | Chile | `cl_tin` | Chilean TIN | + # # | China | `cn_tin` | Chinese Tax ID | + # # | Colombia | `co_nit` | Colombian NIT Number | + # # | Costa Rica | `cr_tin` | Costa Rican Tax ID | + # # | Croatia | `eu_vat` | European VAT Number | + # # | Cyprus | `eu_vat` | European VAT Number | + # # | Czech Republic | `eu_vat` | European VAT Number | + # # | Denmark | `eu_vat` | European VAT Number | + # # | Dominican Republic | `do_rcn` | Dominican RCN Number | + # # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | + # # | Egypt | `eg_tin` | Egyptian Tax Identification Number | + # # | El Salvador | `sv_nit` | El Salvadorian NIT Number | + # # | Estonia | `eu_vat` | European VAT Number | + # # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # # | Finland | `eu_vat` | European VAT Number | + # # | France | `eu_vat` | European VAT Number | + # # | Georgia | `ge_vat` | Georgian VAT | + # # | Germany | `eu_vat` | European VAT Number | + # # | Greece | `eu_vat` | European VAT Number | + # # | Hong Kong | `hk_br` | Hong Kong BR Number | + # # | Hungary | `eu_vat` | European VAT Number | + # # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | + # # | Iceland | `is_vat` | Icelandic VAT | + # # | India | `in_gst` | Indian GST Number | + # # | Indonesia | `id_npwp` | Indonesian NPWP Number | + # # | Ireland | `eu_vat` | European VAT Number | + # # | Israel | `il_vat` | Israel VAT | + # # | Italy | `eu_vat` | European VAT Number | + # # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | + # # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | + # # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | + # # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | + # # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | + # # | Latvia | `eu_vat` | European VAT Number | + # # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | + # # | Lithuania | `eu_vat` | European VAT Number | + # # | Luxembourg | `eu_vat` | European VAT Number | + # # | Malaysia | `my_frp` | Malaysian FRP Number | + # # | Malaysia | `my_itn` | Malaysian ITN | + # # | Malaysia | `my_sst` | Malaysian SST Number | + # # | Malta | `eu_vat ` | European VAT Number | + # # | Mexico | `mx_rfc` | Mexican RFC Number | + # # | Netherlands | `eu_vat` | European VAT Number | + # # | New Zealand | `nz_gst` | New Zealand GST Number | + # # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | + # # | Norway | `no_vat` | Norwegian VAT Number | + # # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | + # # | Oman | `om_vat` | Omani VAT Number | + # # | Peru | `pe_ruc` | Peruvian RUC Number | + # # | Philippines | `ph_tin ` | Philippines Tax Identification Number | + # # | Poland | `eu_vat` | European VAT Number | + # # | Portugal | `eu_vat` | European VAT Number | + # # | Romania | `eu_vat` | European VAT Number | + # # | Romania | `ro_tin` | Romanian Tax ID Number | + # # | Russia | `ru_inn` | Russian INN | + # # | Russia | `ru_kpp` | Russian KPP | + # # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | + # # | Serbia | `rs_pib` | Serbian PIB Number | + # # | Singapore | `sg_gst` | Singaporean GST | + # # | Singapore | `sg_uen` | Singaporean UEN | + # # | Slovakia | `eu_vat` | European VAT Number | + # # | Slovenia | `eu_vat` | European VAT Number | + # # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | + # # | South Africa | `za_vat` | South African VAT Number | + # # | South Korea | `kr_brn` | Korean BRN | + # # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | + # # | Spain | `eu_vat` | European VAT Number | + # # | Sweden | `eu_vat` | European VAT Number | + # # | Switzerland | `ch_vat` | Switzerland VAT Number | + # # | Taiwan | `tw_vat` | Taiwanese VAT | + # # | Thailand | `th_vat` | Thai VAT | + # # | Turkey | `tr_tin` | Turkish Tax Identification Number | + # # | Ukraine | `ua_vat` | Ukrainian VAT | + # # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | + # # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | + # # | United Kingdom | `gb_vat` | United Kingdom VAT Number | + # # | United States | `us_ein` | United States EIN | + # # | Uruguay | `uy_ruc` | Uruguayan RUC Number | + # # | Venezuela | `ve_rif` | Venezuelan RIF Number | + # # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | + # # + # # @param country [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country] + # # @param type [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type] + # # @param value [String] + # # + # def initialize(country:, type:, value:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case country + # in :AD + # # ... + # in :AE + # # ... + # in :AR + # # ... + # in :AT + # # ... + # in :AU + # # ... + # in ... + # #... + # end + # ``` + class Country < Orb::Enum + AD = :AD + AE = :AE + AR = :AR + AT = :AT + AU = :AU + BE = :BE + BG = :BG + BH = :BH + BO = :BO + BR = :BR + CA = :CA + CH = :CH + CL = :CL + CN = :CN + CO = :CO + CR = :CR + CY = :CY + CZ = :CZ + DE = :DE + DK = :DK + EE = :EE + DO = :DO + EC = :EC + EG = :EG + ES = :ES + EU = :EU + FI = :FI + FR = :FR + GB = :GB + GE = :GE + GR = :GR + HK = :HK + HR = :HR + HU = :HU + ID = :ID + IE = :IE + IL = :IL + IN = :IN + IS = :IS + IT = :IT + JP = :JP + KE = :KE + KR = :KR + KZ = :KZ + LI = :LI + LT = :LT + LU = :LU + LV = :LV + MT = :MT + MX = :MX + MY = :MY + NG = :NG + NL = :NL + NO = :NO + NZ = :NZ + OM = :OM + PE = :PE + PH = :PH + PL = :PL + PT = :PT + RO = :RO + RS = :RS + RU = :RU + SA = :SA + SE = :SE + SG = :SG + SI = :SI + SK = :SK + SV = :SV + TH = :TH + TR = :TR + TW = :TW + UA = :UA + US = :US + UY = :UY + VE = :VE + VN = :VN + ZA = :ZA + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + # @abstract + # + # @example + # ```ruby + # case type + # in :ad_nrt + # # ... + # in :ae_trn + # # ... + # in :ar_cuit + # # ... + # in :eu_vat + # # ... + # in :au_abn + # # ... + # in ... + # #... + # end + # ``` + class Type < Orb::Enum + AD_NRT = :ad_nrt + AE_TRN = :ae_trn + AR_CUIT = :ar_cuit + EU_VAT = :eu_vat + AU_ABN = :au_abn + AU_ARN = :au_arn + BG_UIC = :bg_uic + BH_VAT = :bh_vat + BO_TIN = :bo_tin + BR_CNPJ = :br_cnpj + BR_CPF = :br_cpf + CA_BN = :ca_bn + CA_GST_HST = :ca_gst_hst + CA_PST_BC = :ca_pst_bc + CA_PST_MB = :ca_pst_mb + CA_PST_SK = :ca_pst_sk + CA_QST = :ca_qst + CH_VAT = :ch_vat + CL_TIN = :cl_tin + CN_TIN = :cn_tin + CO_NIT = :co_nit + CR_TIN = :cr_tin + DO_RCN = :do_rcn + EC_RUC = :ec_ruc + EG_TIN = :eg_tin + ES_CIF = :es_cif + EU_OSS_VAT = :eu_oss_vat + GB_VAT = :gb_vat + GE_VAT = :ge_vat + HK_BR = :hk_br + HU_TIN = :hu_tin + ID_NPWP = :id_npwp + IL_VAT = :il_vat + IN_GST = :in_gst + IS_VAT = :is_vat + JP_CN = :jp_cn + JP_RN = :jp_rn + JP_TRN = :jp_trn + KE_PIN = :ke_pin + KR_BRN = :kr_brn + KZ_BIN = :kz_bin + LI_UID = :li_uid + MX_RFC = :mx_rfc + MY_FRP = :my_frp + MY_ITN = :my_itn + MY_SST = :my_sst + NG_TIN = :ng_tin + NO_VAT = :no_vat + NO_VOEC = :no_voec + NZ_GST = :nz_gst + OM_VAT = :om_vat + PE_RUC = :pe_ruc + PH_TIN = :ph_tin + RO_TIN = :ro_tin + RS_PIB = :rs_pib + RU_INN = :ru_inn + RU_KPP = :ru_kpp + SA_VAT = :sa_vat + SG_GST = :sg_gst + SG_UEN = :sg_uen + SI_TIN = :si_tin + SV_NIT = :sv_nit + TH_VAT = :th_vat + TR_TIN = :tr_tin + TW_VAT = :tw_vat + UA_VAT = :ua_vat + US_EIN = :us_ein + UY_RUC = :uy_ruc + VE_RIF = :ve_rif + VN_TIN = :vn_tin + ZA_VAT = :za_vat + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -480,6 +1166,1155 @@ class InvoiceSource < Orb::Enum # def self.values; end end + class LineItem < Orb::BaseModel + # @!attribute id + # A unique ID for this line item. + # + # @return [String] + required :id, String + + # @!attribute adjusted_subtotal + # The line amount after any adjustments and before overage conversion, credits and + # partial invoicing. + # + # @return [String] + required :adjusted_subtotal, String + + # @!attribute adjustments + # All adjustments (ie. maximums, minimums, discounts) applied to the line item. + # + # @return [Array] + required :adjustments, + -> { Orb::ArrayOf[union: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment] } + + # @!attribute amount + # The final amount for a line item after all adjustments and pre paid credits have + # been applied. + # + # @return [String] + required :amount, String + + # @!attribute credits_applied + # The number of prepaid credits applied. + # + # @return [String] + required :credits_applied, String + + # @!attribute discount + # + # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] + required :discount, union: -> { Orb::Models::Discount }, nil?: true + + # @!attribute end_date + # The end date of the range of time applied for this line item's price. + # + # @return [Time] + required :end_date, Time + + # @!attribute filter + # An additional filter that was used to calculate the usage for this line item. + # + # @return [String, nil] + required :filter, String, nil?: true + + # @!attribute grouping + # [DEPRECATED] For configured prices that are split by a grouping key, this will + # be populated with the key and a value. The `amount` and `subtotal` will be the + # values for this particular grouping. + # + # @return [String, nil] + required :grouping, String, nil?: true + + # @!attribute maximum + # This field is deprecated in favor of `adjustments`. + # + # @return [Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Maximum, nil] + required :maximum, -> { Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Maximum }, nil?: true + + # @!attribute maximum_amount + # This field is deprecated in favor of `adjustments`. + # + # @return [String, nil] + required :maximum_amount, String, nil?: true + + # @!attribute minimum + # This field is deprecated in favor of `adjustments`. + # + # @return [Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Minimum, nil] + required :minimum, -> { Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Minimum }, nil?: true + + # @!attribute minimum_amount + # This field is deprecated in favor of `adjustments`. + # + # @return [String, nil] + required :minimum_amount, String, nil?: true + + # @!attribute name + # The name of the price associated with this line item. + # + # @return [String] + required :name, String + + # @!attribute partially_invoiced_amount + # Any amount applied from a partial invoice + # + # @return [String] + required :partially_invoiced_amount, String + + # @!attribute price + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) + # + # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice, nil] + required :price, union: -> { Orb::Models::Price }, nil?: true + + # @!attribute quantity + # Either the fixed fee quantity or the usage during the service period. + # + # @return [Float] + required :quantity, Float + + # @!attribute start_date + # The start date of the range of time applied for this line item's price. + # + # @return [Time] + required :start_date, Time + + # @!attribute sub_line_items + # For complex pricing structures, the line item can be broken down further in + # `sub_line_items`. + # + # @return [Array] + required :sub_line_items, + -> { Orb::ArrayOf[union: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem] } + + # @!attribute subtotal + # The line amount before before any adjustments. + # + # @return [String] + required :subtotal, String + + # @!attribute tax_amounts + # An array of tax rates and their incurred tax amounts. Empty if no tax + # integration is configured. + # + # @return [Array] + required :tax_amounts, -> { Orb::ArrayOf[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::TaxAmount] } + + # @!attribute usage_customer_ids + # A list of customer ids that were used to calculate the usage for this line item. + # + # @return [Array, nil] + required :usage_customer_ids, Orb::ArrayOf[String], nil?: true + + # @!parse + # # @param id [String] + # # @param adjusted_subtotal [String] + # # @param adjustments [Array] + # # @param amount [String] + # # @param credits_applied [String] + # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] + # # @param end_date [Time] + # # @param filter [String, nil] + # # @param grouping [String, nil] + # # @param maximum [Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Maximum, nil] + # # @param maximum_amount [String, nil] + # # @param minimum [Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Minimum, nil] + # # @param minimum_amount [String, nil] + # # @param name [String] + # # @param partially_invoiced_amount [String] + # # @param price [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice, nil] + # # @param quantity [Float] + # # @param start_date [Time] + # # @param sub_line_items [Array] + # # @param subtotal [String] + # # @param tax_amounts [Array] + # # @param usage_customer_ids [Array, nil] + # # + # def initialize( + # id:, + # adjusted_subtotal:, + # adjustments:, + # amount:, + # credits_applied:, + # discount:, + # end_date:, + # filter:, + # grouping:, + # maximum:, + # maximum_amount:, + # minimum:, + # minimum_amount:, + # name:, + # partially_invoiced_amount:, + # price:, + # quantity:, + # start_date:, + # sub_line_items:, + # subtotal:, + # tax_amounts:, + # usage_customer_ids:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case adjustment + # in {adjustment_type: "usage_discount", id: String, amount: String, applies_to_price_ids: ^(Orb::ArrayOf[String])} + # # Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryUsageDiscountAdjustment ... + # in {adjustment_type: "amount_discount", id: String, amount: String, amount_discount: String} + # # Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryAmountDiscountAdjustment ... + # in { + # adjustment_type: "percentage_discount", + # id: String, + # amount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment ... + # in {adjustment_type: "minimum", id: String, amount: String, applies_to_price_ids: ^(Orb::ArrayOf[String])} + # # Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMinimumAdjustment ... + # in {adjustment_type: "maximum", id: String, amount: String, applies_to_price_ids: ^(Orb::ArrayOf[String])} + # # Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMaximumAdjustment ... + # end + # ``` + # + # @example + # ```ruby + # case adjustment + # in Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryUsageDiscountAdjustment + # # ... + # in Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryAmountDiscountAdjustment + # # ... + # in Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment + # # ... + # in Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMinimumAdjustment + # # ... + # in Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMaximumAdjustment + # # ... + # end + # ``` + class Adjustment < Orb::Union + discriminator :adjustment_type + + variant :usage_discount, + -> { Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryUsageDiscountAdjustment } + + variant :amount_discount, + -> { Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryAmountDiscountAdjustment } + + variant :percentage_discount, + -> { Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment } + + variant :minimum, + -> { Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMinimumAdjustment } + + variant :maximum, + -> { Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMaximumAdjustment } + + class MonetaryUsageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :usage_discount] + required :adjustment_type, const: :usage_discount + + # @!attribute amount + # The value applied by an adjustment. + # + # @return [String] + required :amount, String + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!attribute usage_discount + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param id [String] + # # @param amount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param reason [String, nil] + # # @param usage_discount [Float] + # # @param adjustment_type [Symbol, :usage_discount] + # # + # def initialize( + # id:, + # amount:, + # applies_to_price_ids:, + # is_invoice_level:, + # reason:, + # usage_discount:, + # adjustment_type: :usage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MonetaryAmountDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :amount_discount] + required :adjustment_type, const: :amount_discount + + # @!attribute amount + # The value applied by an adjustment. + # + # @return [String] + required :amount, String + + # @!attribute amount_discount + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount [String] + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :amount_discount] + # # + # def initialize( + # id:, + # amount:, + # amount_discount:, + # applies_to_price_ids:, + # is_invoice_level:, + # reason:, + # adjustment_type: :amount_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MonetaryPercentageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :percentage_discount] + required :adjustment_type, const: :percentage_discount + + # @!attribute amount + # The value applied by an adjustment. + # + # @return [String] + required :amount, String + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute percentage_discount + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param percentage_discount [Float] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :percentage_discount] + # # + # def initialize( + # id:, + # amount:, + # applies_to_price_ids:, + # is_invoice_level:, + # percentage_discount:, + # reason:, + # adjustment_type: :percentage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MonetaryMinimumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :minimum] + required :adjustment_type, const: :minimum + + # @!attribute amount + # The value applied by an adjustment. + # + # @return [String] + required :amount, String + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute item_id + # The item ID that revenue from this minimum will be attributed to. + # + # @return [String] + required :item_id, String + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param item_id [String] + # # @param minimum_amount [String] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :minimum] + # # + # def initialize( + # id:, + # amount:, + # applies_to_price_ids:, + # is_invoice_level:, + # item_id:, + # minimum_amount:, + # reason:, + # adjustment_type: :minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MonetaryMaximumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :maximum] + required :adjustment_type, const: :maximum + + # @!attribute amount + # The value applied by an adjustment. + # + # @return [String] + required :amount, String + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param maximum_amount [String] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :maximum] + # # + # def initialize( + # id:, + # amount:, + # applies_to_price_ids:, + # is_invoice_level:, + # maximum_amount:, + # reason:, + # adjustment_type: :maximum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + # @deprecated + # + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # This field is deprecated in favor of `adjustments`. + # # + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @deprecated + # + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # This field is deprecated in favor of `adjustments`. + # # + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case sub_line_item + # in { + # type: "matrix", + # amount: String, + # grouping: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::Grouping, + # matrix_config: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig + # } + # # Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem ... + # in { + # type: "tier", + # amount: String, + # grouping: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::Grouping, + # name: String + # } + # # Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem ... + # in { + # type: "'null'", + # amount: String, + # grouping: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem::Grouping, + # name: String + # } + # # Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem ... + # end + # ``` + # + # @example + # ```ruby + # case sub_line_item + # in Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem + # # ... + # in Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem + # # ... + # in Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem + # # ... + # end + # ``` + class SubLineItem < Orb::Union + discriminator :type + + variant :matrix, + -> { Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem } + + variant :tier, -> { Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem } + + variant :"'null'", + -> { Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem } + + class MatrixSubLineItem < Orb::BaseModel + # @!attribute amount + # The total amount for this sub line item. + # + # @return [String] + required :amount, String + + # @!attribute grouping + # + # @return [Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::Grouping, nil] + required :grouping, + -> { Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::Grouping }, + nil?: true + + # @!attribute matrix_config + # + # @return [Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig] + required :matrix_config, + -> { Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig } + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute quantity + # + # @return [Float] + required :quantity, Float + + # @!attribute type + # + # @return [Symbol, :matrix] + required :type, const: :matrix + + # @!parse + # # @param amount [String] + # # @param grouping [Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::Grouping, nil] + # # @param matrix_config [Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig] + # # @param name [String] + # # @param quantity [Float] + # # @param type [Symbol, :matrix] + # # + # def initialize(amount:, grouping:, matrix_config:, name:, quantity:, type: :matrix, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Grouping < Orb::BaseModel + # @!attribute key + # + # @return [String] + required :key, String + + # @!attribute value + # No value indicates the default group + # + # @return [String, nil] + required :value, String, nil?: true + + # @!parse + # # @param key [String] + # # @param value [String, nil] + # # + # def initialize(key:, value:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MatrixConfig < Orb::BaseModel + # @!attribute dimension_values + # The ordered dimension values for this line item. + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String, nil?: true] + + # @!parse + # # @param dimension_values [Array] + # # + # def initialize(dimension_values:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class TierSubLineItem < Orb::BaseModel + # @!attribute amount + # The total amount for this sub line item. + # + # @return [String] + required :amount, String + + # @!attribute grouping + # + # @return [Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::Grouping, nil] + required :grouping, + -> { Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::Grouping }, + nil?: true + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute quantity + # + # @return [Float] + required :quantity, Float + + # @!attribute tier_config + # + # @return [Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::TierConfig] + required :tier_config, + -> { Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::TierConfig } + + # @!attribute type + # + # @return [Symbol, :tier] + required :type, const: :tier + + # @!parse + # # @param amount [String] + # # @param grouping [Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::Grouping, nil] + # # @param name [String] + # # @param quantity [Float] + # # @param tier_config [Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::TierConfig] + # # @param type [Symbol, :tier] + # # + # def initialize(amount:, grouping:, name:, quantity:, tier_config:, type: :tier, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Grouping < Orb::BaseModel + # @!attribute key + # + # @return [String] + required :key, String + + # @!attribute value + # No value indicates the default group + # + # @return [String, nil] + required :value, String, nil?: true + + # @!parse + # # @param key [String] + # # @param value [String, nil] + # # + # def initialize(key:, value:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class TierConfig < Orb::BaseModel + # @!attribute first_unit + # + # @return [Float] + required :first_unit, Float + + # @!attribute last_unit + # + # @return [Float, nil] + required :last_unit, Float, nil?: true + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!parse + # # @param first_unit [Float] + # # @param last_unit [Float, nil] + # # @param unit_amount [String] + # # + # def initialize(first_unit:, last_unit:, unit_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class OtherSubLineItem < Orb::BaseModel + # @!attribute amount + # The total amount for this sub line item. + # + # @return [String] + required :amount, String + + # @!attribute grouping + # + # @return [Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem::Grouping, nil] + required :grouping, + -> { Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem::Grouping }, + nil?: true + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute quantity + # + # @return [Float] + required :quantity, Float + + # @!attribute type + # + # @return [Symbol, :"'null'"] + required :type, const: :"'null'" + + # @!parse + # # @param amount [String] + # # @param grouping [Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem::Grouping, nil] + # # @param name [String] + # # @param quantity [Float] + # # @param type [Symbol, :"'null'"] + # # + # def initialize(amount:, grouping:, name:, quantity:, type: :"'null'", **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Grouping < Orb::BaseModel + # @!attribute key + # + # @return [String] + required :key, String + + # @!attribute value + # No value indicates the default group + # + # @return [String, nil] + required :value, String, nil?: true + + # @!parse + # # @param key [String] + # # @param value [String, nil] + # # + # def initialize(key:, value:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end + + class TaxAmount < Orb::BaseModel + # @!attribute amount + # The amount of additional tax incurred by this tax rate. + # + # @return [String] + required :amount, String + + # @!attribute tax_rate_description + # The human-readable description of the applied tax rate. + # + # @return [String] + required :tax_rate_description, String + + # @!attribute tax_rate_percentage + # The tax rate percentage, out of 100. + # + # @return [String, nil] + required :tax_rate_percentage, String, nil?: true + + # @!parse + # # @param amount [String] + # # @param tax_rate_description [String] + # # @param tax_rate_percentage [String, nil] + # # + # def initialize(amount:, tax_rate_description:, tax_rate_percentage:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PaymentAttempt < Orb::BaseModel + # @!attribute id + # The ID of the payment attempt. + # + # @return [String] + required :id, String + + # @!attribute amount + # The amount of the payment attempt. + # + # @return [String] + required :amount, String + + # @!attribute created_at + # The time at which the payment attempt was created. + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_provider + # The payment provider that attempted to collect the payment. + # + # @return [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt::PaymentProvider, nil] + required :payment_provider, + enum: -> { Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt::PaymentProvider }, + nil?: true + + # @!attribute payment_provider_id + # The ID of the payment attempt in the payment provider. + # + # @return [String, nil] + required :payment_provider_id, String, nil?: true + + # @!attribute succeeded + # Whether the payment attempt succeeded. + # + # @return [Boolean] + required :succeeded, Orb::BooleanModel + + # @!parse + # # @param id [String] + # # @param amount [String] + # # @param created_at [Time] + # # @param payment_provider [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt::PaymentProvider, nil] + # # @param payment_provider_id [String, nil] + # # @param succeeded [Boolean] + # # + # def initialize(id:, amount:, created_at:, payment_provider:, payment_provider_id:, succeeded:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The payment provider that attempted to collect the payment. + # + # @example + # ```ruby + # case payment_provider + # in :stripe + # # ... + # end + # ``` + class PaymentProvider < Orb::Enum + STRIPE = :stripe + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class ShippingAddress < Orb::BaseModel + # @!attribute city + # + # @return [String, nil] + required :city, String, nil?: true + + # @!attribute country + # + # @return [String, nil] + required :country, String, nil?: true + + # @!attribute line1 + # + # @return [String, nil] + required :line1, String, nil?: true + + # @!attribute line2 + # + # @return [String, nil] + required :line2, String, nil?: true + + # @!attribute postal_code + # + # @return [String, nil] + required :postal_code, String, nil?: true + + # @!attribute state + # + # @return [String, nil] + required :state, String, nil?: true + + # @!parse + # # @param city [String, nil] + # # @param country [String, nil] + # # @param line1 [String, nil] + # # @param line2 [String, nil] + # # @param postal_code [String, nil] + # # @param state [String, nil] + # # + # def initialize(city:, country:, line1:, line2:, postal_code:, state:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -511,6 +2346,20 @@ class Status < Orb::Enum # # # def self.values; end end + + class Subscription < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end end end diff --git a/lib/orb/models/invoice_level_discount_model.rb b/lib/orb/models/invoice_level_discount_model.rb deleted file mode 100644 index 404cee7a..00000000 --- a/lib/orb/models/invoice_level_discount_model.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - # @abstract - # - # @example - # ```ruby - # case invoice_level_discount_model - # in { - # discount_type: "percentage", - # applies_to_price_ids: ^(Orb::ArrayOf[String]), - # percentage_discount: Float, - # reason: String - # } - # # Orb::Models::PercentageDiscount ... - # in {discount_type: "amount", amount_discount: String, applies_to_price_ids: ^(Orb::ArrayOf[String]), reason: String} - # # Orb::Models::AmountDiscount ... - # in { - # discount_type: "trial", - # applies_to_price_ids: ^(Orb::ArrayOf[String]), - # reason: String, - # trial_amount_discount: String - # } - # # Orb::Models::TrialDiscount ... - # end - # ``` - # - # @example - # ```ruby - # case invoice_level_discount_model - # in Orb::Models::PercentageDiscount - # # ... - # in Orb::Models::AmountDiscount - # # ... - # in Orb::Models::TrialDiscount - # # ... - # end - # ``` - class InvoiceLevelDiscountModel < Orb::Union - discriminator :discount_type - - variant :percentage, -> { Orb::Models::PercentageDiscount } - - variant :amount, -> { Orb::Models::AmountDiscount } - - variant :trial, -> { Orb::Models::TrialDiscount } - end - end -end diff --git a/lib/orb/models/invoice_line_item_model.rb b/lib/orb/models/invoice_line_item_create_response.rb similarity index 62% rename from lib/orb/models/invoice_line_item_model.rb rename to lib/orb/models/invoice_line_item_create_response.rb index c08d4147..0878e321 100644 --- a/lib/orb/models/invoice_line_item_model.rb +++ b/lib/orb/models/invoice_line_item_create_response.rb @@ -2,7 +2,7 @@ module Orb module Models - class InvoiceLineItemModel < Orb::BaseModel + class InvoiceLineItemCreateResponse < Orb::BaseModel # @!attribute id # A unique ID for this line item. # @@ -19,8 +19,8 @@ class InvoiceLineItemModel < Orb::BaseModel # @!attribute adjustments # All adjustments (ie. maximums, minimums, discounts) applied to the line item. # - # @return [Array] - required :adjustments, -> { Orb::ArrayOf[union: Orb::Models::InvoiceLineItemModel::Adjustment] } + # @return [Array] + required :adjustments, -> { Orb::ArrayOf[union: Orb::Models::InvoiceLineItemCreateResponse::Adjustment] } # @!attribute amount # The final amount for a line item after all adjustments and pre paid credits have @@ -63,8 +63,8 @@ class InvoiceLineItemModel < Orb::BaseModel # @!attribute maximum # This field is deprecated in favor of `adjustments`. # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::InvoiceLineItemCreateResponse::Maximum, nil] + required :maximum, -> { Orb::Models::InvoiceLineItemCreateResponse::Maximum }, nil?: true # @!attribute maximum_amount # This field is deprecated in favor of `adjustments`. @@ -75,8 +75,8 @@ class InvoiceLineItemModel < Orb::BaseModel # @!attribute minimum # This field is deprecated in favor of `adjustments`. # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::InvoiceLineItemCreateResponse::Minimum, nil] + required :minimum, -> { Orb::Models::InvoiceLineItemCreateResponse::Minimum }, nil?: true # @!attribute minimum_amount # This field is deprecated in favor of `adjustments`. @@ -108,8 +108,8 @@ class InvoiceLineItemModel < Orb::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::PriceModel::UnitPrice, Orb::Models::PriceModel::PackagePrice, Orb::Models::PriceModel::MatrixPrice, Orb::Models::PriceModel::TieredPrice, Orb::Models::PriceModel::TieredBpsPrice, Orb::Models::PriceModel::BpsPrice, Orb::Models::PriceModel::BulkBpsPrice, Orb::Models::PriceModel::BulkPrice, Orb::Models::PriceModel::ThresholdTotalAmountPrice, Orb::Models::PriceModel::TieredPackagePrice, Orb::Models::PriceModel::GroupedTieredPrice, Orb::Models::PriceModel::TieredWithMinimumPrice, Orb::Models::PriceModel::TieredPackageWithMinimumPrice, Orb::Models::PriceModel::PackageWithAllocationPrice, Orb::Models::PriceModel::UnitWithPercentPrice, Orb::Models::PriceModel::MatrixWithAllocationPrice, Orb::Models::PriceModel::TieredWithProrationPrice, Orb::Models::PriceModel::UnitWithProrationPrice, Orb::Models::PriceModel::GroupedAllocationPrice, Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, Orb::Models::PriceModel::MatrixWithDisplayNamePrice, Orb::Models::PriceModel::BulkWithProrationPrice, Orb::Models::PriceModel::GroupedTieredPackagePrice, Orb::Models::PriceModel::MaxGroupTieredPackagePrice, Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, Orb::Models::PriceModel::CumulativeGroupedBulkPrice, nil] - required :price, union: -> { Orb::Models::PriceModel }, nil?: true + # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice, nil] + required :price, union: -> { Orb::Models::Price }, nil?: true # @!attribute quantity # Either the fixed fee quantity or the usage during the service period. @@ -127,8 +127,9 @@ class InvoiceLineItemModel < Orb::BaseModel # For complex pricing structures, the line item can be broken down further in # `sub_line_items`. # - # @return [Array] - required :sub_line_items, -> { Orb::ArrayOf[union: Orb::Models::InvoiceLineItemModel::SubLineItem] } + # @return [Array] + required :sub_line_items, + -> { Orb::ArrayOf[union: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem] } # @!attribute subtotal # The line amount before before any adjustments. @@ -140,8 +141,8 @@ class InvoiceLineItemModel < Orb::BaseModel # An array of tax rates and their incurred tax amounts. Empty if no tax # integration is configured. # - # @return [Array] - required :tax_amounts, -> { Orb::ArrayOf[Orb::Models::TaxAmountModel] } + # @return [Array] + required :tax_amounts, -> { Orb::ArrayOf[Orb::Models::InvoiceLineItemCreateResponse::TaxAmount] } # @!attribute usage_customer_ids # A list of customer ids that were used to calculate the usage for this line item. @@ -152,25 +153,25 @@ class InvoiceLineItemModel < Orb::BaseModel # @!parse # # @param id [String] # # @param adjusted_subtotal [String] - # # @param adjustments [Array] + # # @param adjustments [Array] # # @param amount [String] # # @param credits_applied [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param end_date [Time] # # @param filter [String, nil] # # @param grouping [String, nil] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param maximum [Orb::Models::InvoiceLineItemCreateResponse::Maximum, nil] # # @param maximum_amount [String, nil] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::InvoiceLineItemCreateResponse::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param partially_invoiced_amount [String] - # # @param price [Orb::Models::PriceModel::UnitPrice, Orb::Models::PriceModel::PackagePrice, Orb::Models::PriceModel::MatrixPrice, Orb::Models::PriceModel::TieredPrice, Orb::Models::PriceModel::TieredBpsPrice, Orb::Models::PriceModel::BpsPrice, Orb::Models::PriceModel::BulkBpsPrice, Orb::Models::PriceModel::BulkPrice, Orb::Models::PriceModel::ThresholdTotalAmountPrice, Orb::Models::PriceModel::TieredPackagePrice, Orb::Models::PriceModel::GroupedTieredPrice, Orb::Models::PriceModel::TieredWithMinimumPrice, Orb::Models::PriceModel::TieredPackageWithMinimumPrice, Orb::Models::PriceModel::PackageWithAllocationPrice, Orb::Models::PriceModel::UnitWithPercentPrice, Orb::Models::PriceModel::MatrixWithAllocationPrice, Orb::Models::PriceModel::TieredWithProrationPrice, Orb::Models::PriceModel::UnitWithProrationPrice, Orb::Models::PriceModel::GroupedAllocationPrice, Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, Orb::Models::PriceModel::MatrixWithDisplayNamePrice, Orb::Models::PriceModel::BulkWithProrationPrice, Orb::Models::PriceModel::GroupedTieredPackagePrice, Orb::Models::PriceModel::MaxGroupTieredPackagePrice, Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, Orb::Models::PriceModel::CumulativeGroupedBulkPrice, nil] + # # @param price [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice, nil] # # @param quantity [Float] # # @param start_date [Time] - # # @param sub_line_items [Array] + # # @param sub_line_items [Array] # # @param subtotal [String] - # # @param tax_amounts [Array] + # # @param tax_amounts [Array] # # @param usage_customer_ids [Array, nil] # # # def initialize( @@ -209,35 +210,35 @@ class InvoiceLineItemModel < Orb::BaseModel # ```ruby # case adjustment # in {adjustment_type: "usage_discount", id: String, amount: String, applies_to_price_ids: ^(Orb::ArrayOf[String])} - # # Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryUsageDiscountAdjustment ... + # # Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryUsageDiscountAdjustment ... # in {adjustment_type: "amount_discount", id: String, amount: String, amount_discount: String} - # # Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryAmountDiscountAdjustment ... + # # Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryAmountDiscountAdjustment ... # in { # adjustment_type: "percentage_discount", # id: String, # amount: String, # applies_to_price_ids: ^(Orb::ArrayOf[String]) # } - # # Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryPercentageDiscountAdjustment ... + # # Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryPercentageDiscountAdjustment ... # in {adjustment_type: "minimum", id: String, amount: String, applies_to_price_ids: ^(Orb::ArrayOf[String])} - # # Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryMinimumAdjustment ... + # # Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMinimumAdjustment ... # in {adjustment_type: "maximum", id: String, amount: String, applies_to_price_ids: ^(Orb::ArrayOf[String])} - # # Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryMaximumAdjustment ... + # # Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMaximumAdjustment ... # end # ``` # # @example # ```ruby # case adjustment - # in Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryUsageDiscountAdjustment + # in Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryUsageDiscountAdjustment # # ... - # in Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryAmountDiscountAdjustment + # in Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryAmountDiscountAdjustment # # ... - # in Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryPercentageDiscountAdjustment + # in Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryPercentageDiscountAdjustment # # ... - # in Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryMinimumAdjustment + # in Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMinimumAdjustment # # ... - # in Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryMaximumAdjustment + # in Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMaximumAdjustment # # ... # end # ``` @@ -245,17 +246,17 @@ class Adjustment < Orb::Union discriminator :adjustment_type variant :usage_discount, - -> { Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryUsageDiscountAdjustment } + -> { Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryUsageDiscountAdjustment } variant :amount_discount, - -> { Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryAmountDiscountAdjustment } + -> { Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryAmountDiscountAdjustment } variant :percentage_discount, - -> { Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryPercentageDiscountAdjustment } + -> { Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryPercentageDiscountAdjustment } - variant :minimum, -> { Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryMinimumAdjustment } + variant :minimum, -> { Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMinimumAdjustment } - variant :maximum, -> { Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryMaximumAdjustment } + variant :maximum, -> { Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMaximumAdjustment } class MonetaryUsageDiscountAdjustment < Orb::BaseModel # @!attribute id @@ -606,6 +607,60 @@ class MonetaryMaximumAdjustment < Orb::BaseModel end end + # @deprecated + # + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # This field is deprecated in favor of `adjustments`. + # # + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @deprecated + # + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # This field is deprecated in favor of `adjustments`. + # # + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -614,36 +669,46 @@ class MonetaryMaximumAdjustment < Orb::BaseModel # in { # type: "matrix", # amount: String, - # grouping: Orb::Models::SubLineItemGroupingModel, - # matrix_config: Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem::MatrixConfig + # grouping: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::Grouping, + # matrix_config: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::MatrixConfig + # } + # # Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem ... + # in { + # type: "tier", + # amount: String, + # grouping: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::Grouping, + # name: String + # } + # # Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem ... + # in { + # type: "'null'", + # amount: String, + # grouping: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem::Grouping, + # name: String # } - # # Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem ... - # in {type: "tier", amount: String, grouping: Orb::Models::SubLineItemGroupingModel, name: String} - # # Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem ... - # in {type: "'null'", amount: String, grouping: Orb::Models::SubLineItemGroupingModel, name: String} - # # Orb::Models::InvoiceLineItemModel::SubLineItem::OtherSubLineItem ... + # # Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem ... # end # ``` # # @example # ```ruby # case sub_line_item - # in Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem + # in Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem # # ... - # in Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem + # in Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem # # ... - # in Orb::Models::InvoiceLineItemModel::SubLineItem::OtherSubLineItem + # in Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem # # ... # end # ``` class SubLineItem < Orb::Union discriminator :type - variant :matrix, -> { Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem } + variant :matrix, -> { Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem } - variant :tier, -> { Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem } + variant :tier, -> { Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem } - variant :"'null'", -> { Orb::Models::InvoiceLineItemModel::SubLineItem::OtherSubLineItem } + variant :"'null'", -> { Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem } class MatrixSubLineItem < Orb::BaseModel # @!attribute amount @@ -654,14 +719,16 @@ class MatrixSubLineItem < Orb::BaseModel # @!attribute grouping # - # @return [Orb::Models::SubLineItemGroupingModel, nil] - required :grouping, -> { Orb::Models::SubLineItemGroupingModel }, nil?: true + # @return [Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::Grouping, nil] + required :grouping, + -> { Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::Grouping }, + nil?: true # @!attribute matrix_config # - # @return [Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem::MatrixConfig] + # @return [Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::MatrixConfig] required :matrix_config, - -> { Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem::MatrixConfig } + -> { Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::MatrixConfig } # @!attribute name # @@ -680,8 +747,8 @@ class MatrixSubLineItem < Orb::BaseModel # @!parse # # @param amount [String] - # # @param grouping [Orb::Models::SubLineItemGroupingModel, nil] - # # @param matrix_config [Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem::MatrixConfig] + # # @param grouping [Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::Grouping, nil] + # # @param matrix_config [Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::MatrixConfig] # # @param name [String] # # @param quantity [Float] # # @param type [Symbol, :matrix] @@ -690,6 +757,27 @@ class MatrixSubLineItem < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class Grouping < Orb::BaseModel + # @!attribute key + # + # @return [String] + required :key, String + + # @!attribute value + # No value indicates the default group + # + # @return [String, nil] + required :value, String, nil?: true + + # @!parse + # # @param key [String] + # # @param value [String, nil] + # # + # def initialize(key:, value:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + class MatrixConfig < Orb::BaseModel # @!attribute dimension_values # The ordered dimension values for this line item. @@ -715,8 +803,10 @@ class TierSubLineItem < Orb::BaseModel # @!attribute grouping # - # @return [Orb::Models::SubLineItemGroupingModel, nil] - required :grouping, -> { Orb::Models::SubLineItemGroupingModel }, nil?: true + # @return [Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::Grouping, nil] + required :grouping, + -> { Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::Grouping }, + nil?: true # @!attribute name # @@ -730,8 +820,9 @@ class TierSubLineItem < Orb::BaseModel # @!attribute tier_config # - # @return [Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem::TierConfig] - required :tier_config, -> { Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem::TierConfig } + # @return [Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::TierConfig] + required :tier_config, + -> { Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::TierConfig } # @!attribute type # @@ -740,16 +831,37 @@ class TierSubLineItem < Orb::BaseModel # @!parse # # @param amount [String] - # # @param grouping [Orb::Models::SubLineItemGroupingModel, nil] + # # @param grouping [Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::Grouping, nil] # # @param name [String] # # @param quantity [Float] - # # @param tier_config [Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem::TierConfig] + # # @param tier_config [Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::TierConfig] # # @param type [Symbol, :tier] # # # def initialize(amount:, grouping:, name:, quantity:, tier_config:, type: :tier, **) = super # def initialize: (Hash | Orb::BaseModel) -> void + class Grouping < Orb::BaseModel + # @!attribute key + # + # @return [String] + required :key, String + + # @!attribute value + # No value indicates the default group + # + # @return [String, nil] + required :value, String, nil?: true + + # @!parse + # # @param key [String] + # # @param value [String, nil] + # # + # def initialize(key:, value:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + class TierConfig < Orb::BaseModel # @!attribute first_unit # @@ -786,8 +898,10 @@ class OtherSubLineItem < Orb::BaseModel # @!attribute grouping # - # @return [Orb::Models::SubLineItemGroupingModel, nil] - required :grouping, -> { Orb::Models::SubLineItemGroupingModel }, nil?: true + # @return [Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem::Grouping, nil] + required :grouping, + -> { Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem::Grouping }, + nil?: true # @!attribute name # @@ -806,7 +920,7 @@ class OtherSubLineItem < Orb::BaseModel # @!parse # # @param amount [String] - # # @param grouping [Orb::Models::SubLineItemGroupingModel, nil] + # # @param grouping [Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem::Grouping, nil] # # @param name [String] # # @param quantity [Float] # # @param type [Symbol, :"'null'"] @@ -814,8 +928,58 @@ class OtherSubLineItem < Orb::BaseModel # def initialize(amount:, grouping:, name:, quantity:, type: :"'null'", **) = super # def initialize: (Hash | Orb::BaseModel) -> void + + class Grouping < Orb::BaseModel + # @!attribute key + # + # @return [String] + required :key, String + + # @!attribute value + # No value indicates the default group + # + # @return [String, nil] + required :value, String, nil?: true + + # @!parse + # # @param key [String] + # # @param value [String, nil] + # # + # def initialize(key:, value:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end end + + class TaxAmount < Orb::BaseModel + # @!attribute amount + # The amount of additional tax incurred by this tax rate. + # + # @return [String] + required :amount, String + + # @!attribute tax_rate_description + # The human-readable description of the applied tax rate. + # + # @return [String] + required :tax_rate_description, String + + # @!attribute tax_rate_percentage + # The tax rate percentage, out of 100. + # + # @return [String, nil] + required :tax_rate_percentage, String, nil?: true + + # @!parse + # # @param amount [String] + # # @param tax_rate_description [String] + # # @param tax_rate_percentage [String, nil] + # # + # def initialize(amount:, tax_rate_description:, tax_rate_percentage:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end end end diff --git a/lib/orb/models/invoice_model.rb b/lib/orb/models/invoice_model.rb deleted file mode 100644 index 0c3eef1d..00000000 --- a/lib/orb/models/invoice_model.rb +++ /dev/null @@ -1,522 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class InvoiceModel < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute amount_due - # This is the final amount required to be charged to the customer and reflects the - # application of the customer balance to the `total` of the invoice. - # - # @return [String] - required :amount_due, String - - # @!attribute auto_collection - # - # @return [Orb::Models::AutoCollectionModel] - required :auto_collection, -> { Orb::Models::AutoCollectionModel } - - # @!attribute billing_address - # - # @return [Orb::Models::AddressModel, nil] - required :billing_address, -> { Orb::Models::AddressModel }, nil?: true - - # @!attribute created_at - # The creation time of the resource in Orb. - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_notes - # A list of credit notes associated with the invoice - # - # @return [Array] - required :credit_notes, -> { Orb::ArrayOf[Orb::Models::CreditNoteSummaryModel] } - - # @!attribute currency - # An ISO 4217 currency string or `credits` - # - # @return [String] - required :currency, String - - # @!attribute customer - # - # @return [Orb::Models::CustomerMinifiedModel] - required :customer, -> { Orb::Models::CustomerMinifiedModel } - - # @!attribute customer_balance_transactions - # - # @return [Array] - required :customer_balance_transactions, -> { Orb::ArrayOf[Orb::Models::CustomerBalanceTransactionModel] } - - # @!attribute customer_tax_id - # Tax IDs are commonly required to be displayed on customer invoices, which are - # added to the headers of invoices. - # - # ### Supported Tax ID Countries and Types - # - # | Country | Type | Description | - # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | - # | Andorra | `ad_nrt` | Andorran NRT Number | - # | Argentina | `ar_cuit` | Argentinian Tax ID Number | - # | Australia | `au_abn` | Australian Business Number (AU ABN) | - # | Australia | `au_arn` | Australian Taxation Office Reference Number | - # | Austria | `eu_vat` | European VAT Number | - # | Bahrain | `bh_vat` | Bahraini VAT Number | - # | Belgium | `eu_vat` | European VAT Number | - # | Bolivia | `bo_tin` | Bolivian Tax ID | - # | Brazil | `br_cnpj` | Brazilian CNPJ Number | - # | Brazil | `br_cpf` | Brazilian CPF Number | - # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | - # | Bulgaria | `eu_vat` | European VAT Number | - # | Canada | `ca_bn` | Canadian BN | - # | Canada | `ca_gst_hst` | Canadian GST/HST Number | - # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | - # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | - # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | - # | Canada | `ca_qst` | Canadian QST Number (Québec) | - # | Chile | `cl_tin` | Chilean TIN | - # | China | `cn_tin` | Chinese Tax ID | - # | Colombia | `co_nit` | Colombian NIT Number | - # | Costa Rica | `cr_tin` | Costa Rican Tax ID | - # | Croatia | `eu_vat` | European VAT Number | - # | Cyprus | `eu_vat` | European VAT Number | - # | Czech Republic | `eu_vat` | European VAT Number | - # | Denmark | `eu_vat` | European VAT Number | - # | Dominican Republic | `do_rcn` | Dominican RCN Number | - # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | - # | Egypt | `eg_tin` | Egyptian Tax Identification Number | - # | El Salvador | `sv_nit` | El Salvadorian NIT Number | - # | Estonia | `eu_vat` | European VAT Number | - # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | - # | Finland | `eu_vat` | European VAT Number | - # | France | `eu_vat` | European VAT Number | - # | Georgia | `ge_vat` | Georgian VAT | - # | Germany | `eu_vat` | European VAT Number | - # | Greece | `eu_vat` | European VAT Number | - # | Hong Kong | `hk_br` | Hong Kong BR Number | - # | Hungary | `eu_vat` | European VAT Number | - # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | - # | Iceland | `is_vat` | Icelandic VAT | - # | India | `in_gst` | Indian GST Number | - # | Indonesia | `id_npwp` | Indonesian NPWP Number | - # | Ireland | `eu_vat` | European VAT Number | - # | Israel | `il_vat` | Israel VAT | - # | Italy | `eu_vat` | European VAT Number | - # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | - # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | - # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | - # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | - # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | - # | Latvia | `eu_vat` | European VAT Number | - # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | - # | Lithuania | `eu_vat` | European VAT Number | - # | Luxembourg | `eu_vat` | European VAT Number | - # | Malaysia | `my_frp` | Malaysian FRP Number | - # | Malaysia | `my_itn` | Malaysian ITN | - # | Malaysia | `my_sst` | Malaysian SST Number | - # | Malta | `eu_vat ` | European VAT Number | - # | Mexico | `mx_rfc` | Mexican RFC Number | - # | Netherlands | `eu_vat` | European VAT Number | - # | New Zealand | `nz_gst` | New Zealand GST Number | - # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | - # | Norway | `no_vat` | Norwegian VAT Number | - # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | - # | Oman | `om_vat` | Omani VAT Number | - # | Peru | `pe_ruc` | Peruvian RUC Number | - # | Philippines | `ph_tin ` | Philippines Tax Identification Number | - # | Poland | `eu_vat` | European VAT Number | - # | Portugal | `eu_vat` | European VAT Number | - # | Romania | `eu_vat` | European VAT Number | - # | Romania | `ro_tin` | Romanian Tax ID Number | - # | Russia | `ru_inn` | Russian INN | - # | Russia | `ru_kpp` | Russian KPP | - # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | - # | Serbia | `rs_pib` | Serbian PIB Number | - # | Singapore | `sg_gst` | Singaporean GST | - # | Singapore | `sg_uen` | Singaporean UEN | - # | Slovakia | `eu_vat` | European VAT Number | - # | Slovenia | `eu_vat` | European VAT Number | - # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | - # | South Africa | `za_vat` | South African VAT Number | - # | South Korea | `kr_brn` | Korean BRN | - # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | - # | Spain | `eu_vat` | European VAT Number | - # | Sweden | `eu_vat` | European VAT Number | - # | Switzerland | `ch_vat` | Switzerland VAT Number | - # | Taiwan | `tw_vat` | Taiwanese VAT | - # | Thailand | `th_vat` | Thai VAT | - # | Turkey | `tr_tin` | Turkish Tax Identification Number | - # | Ukraine | `ua_vat` | Ukrainian VAT | - # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | - # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | - # | United Kingdom | `gb_vat` | United Kingdom VAT Number | - # | United States | `us_ein` | United States EIN | - # | Uruguay | `uy_ruc` | Uruguayan RUC Number | - # | Venezuela | `ve_rif` | Venezuelan RIF Number | - # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | - # - # @return [Orb::Models::CustomerTaxIDModel, nil] - required :customer_tax_id, -> { Orb::Models::CustomerTaxIDModel }, nil?: true - - # @!attribute discount - # This field is deprecated in favor of `discounts`. If a `discounts` list is - # provided, the first discount in the list will be returned. If the list is empty, - # `None` will be returned. - # - # @return [Object] - required :discount, Orb::Unknown - - # @!attribute discounts - # - # @return [Array] - required :discounts, -> { Orb::ArrayOf[union: Orb::Models::InvoiceLevelDiscount] } - - # @!attribute due_date - # When the invoice payment is due. The due date is null if the invoice is not yet - # finalized. - # - # @return [Time, nil] - required :due_date, Time, nil?: true - - # @!attribute eligible_to_issue_at - # If the invoice has a status of `draft`, this will be the time that the invoice - # will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is - # true, the invoice will automatically begin issuing at this time. - # - # @return [Time, nil] - required :eligible_to_issue_at, Time, nil?: true - - # @!attribute hosted_invoice_url - # A URL for the customer-facing invoice portal. This URL expires 30 days after the - # invoice's due date, or 60 days after being re-generated through the UI. - # - # @return [String, nil] - required :hosted_invoice_url, String, nil?: true - - # @!attribute invoice_date - # The scheduled date of the invoice - # - # @return [Time] - required :invoice_date, Time - - # @!attribute invoice_number - # Automatically generated invoice number to help track and reconcile invoices. - # Invoice numbers have a prefix such as `RFOBWG`. These can be sequential per - # account or customer. - # - # @return [String] - required :invoice_number, String - - # @!attribute invoice_pdf - # The link to download the PDF representation of the `Invoice`. - # - # @return [String, nil] - required :invoice_pdf, String, nil?: true - - # @!attribute invoice_source - # - # @return [Symbol, Orb::Models::InvoiceModel::InvoiceSource] - required :invoice_source, enum: -> { Orb::Models::InvoiceModel::InvoiceSource } - - # @!attribute issue_failed_at - # If the invoice failed to issue, this will be the last time it failed to issue - # (even if it is now in a different state.) - # - # @return [Time, nil] - required :issue_failed_at, Time, nil?: true - - # @!attribute issued_at - # If the invoice has been issued, this will be the time it transitioned to - # `issued` (even if it is now in a different state.) - # - # @return [Time, nil] - required :issued_at, Time, nil?: true - - # @!attribute line_items - # The breakdown of prices in this invoice. - # - # @return [Array] - required :line_items, -> { Orb::ArrayOf[Orb::Models::InvoiceLineItemModel] } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute memo - # Free-form text which is available on the invoice PDF and the Orb invoice portal. - # - # @return [String, nil] - required :memo, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute paid_at - # If the invoice has a status of `paid`, this gives a timestamp when the invoice - # was paid. - # - # @return [Time, nil] - required :paid_at, Time, nil?: true - - # @!attribute payment_attempts - # A list of payment attempts associated with the invoice - # - # @return [Array] - required :payment_attempts, -> { Orb::ArrayOf[Orb::Models::PaymentAttemptModel] } - - # @!attribute payment_failed_at - # If payment was attempted on this invoice but failed, this will be the time of - # the most recent attempt. - # - # @return [Time, nil] - required :payment_failed_at, Time, nil?: true - - # @!attribute payment_started_at - # If payment was attempted on this invoice, this will be the start time of the - # most recent attempt. This field is especially useful for delayed-notification - # payment mechanisms (like bank transfers), where payment can take 3 days or more. - # - # @return [Time, nil] - required :payment_started_at, Time, nil?: true - - # @!attribute scheduled_issue_at - # If the invoice is in draft, this timestamp will reflect when the invoice is - # scheduled to be issued. - # - # @return [Time, nil] - required :scheduled_issue_at, Time, nil?: true - - # @!attribute shipping_address - # - # @return [Orb::Models::AddressModel, nil] - required :shipping_address, -> { Orb::Models::AddressModel }, nil?: true - - # @!attribute status - # - # @return [Symbol, Orb::Models::InvoiceModel::Status] - required :status, enum: -> { Orb::Models::InvoiceModel::Status } - - # @!attribute subscription - # - # @return [Orb::Models::SubscriptionMinifiedModel, nil] - required :subscription, -> { Orb::Models::SubscriptionMinifiedModel }, nil?: true - - # @!attribute subtotal - # The total before any discounts and minimums are applied. - # - # @return [String] - required :subtotal, String - - # @!attribute sync_failed_at - # If the invoice failed to sync, this will be the last time an external invoicing - # provider sync was attempted. This field will always be `null` for invoices using - # Orb Invoicing. - # - # @return [Time, nil] - required :sync_failed_at, Time, nil?: true - - # @!attribute total - # The total after any minimums and discounts have been applied. - # - # @return [String] - required :total, String - - # @!attribute voided_at - # If the invoice has a status of `void`, this gives a timestamp when the invoice - # was voided. - # - # @return [Time, nil] - required :voided_at, Time, nil?: true - - # @!attribute will_auto_issue - # This is true if the invoice will be automatically issued in the future, and - # false otherwise. - # - # @return [Boolean] - required :will_auto_issue, Orb::BooleanModel - - # @!parse - # # An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, - # # representing the request for payment for a single subscription. This includes a - # # set of line items, which correspond to prices in the subscription's plan and can - # # represent fixed recurring fees or usage-based fees. They are generated at the - # # end of a billing period, or as the result of an action, such as a cancellation. - # # - # # @param id [String] - # # @param amount_due [String] - # # @param auto_collection [Orb::Models::AutoCollectionModel] - # # @param billing_address [Orb::Models::AddressModel, nil] - # # @param created_at [Time] - # # @param credit_notes [Array] - # # @param currency [String] - # # @param customer [Orb::Models::CustomerMinifiedModel] - # # @param customer_balance_transactions [Array] - # # @param customer_tax_id [Orb::Models::CustomerTaxIDModel, nil] - # # @param discount [Object] - # # @param discounts [Array] - # # @param due_date [Time, nil] - # # @param eligible_to_issue_at [Time, nil] - # # @param hosted_invoice_url [String, nil] - # # @param invoice_date [Time] - # # @param invoice_number [String] - # # @param invoice_pdf [String, nil] - # # @param invoice_source [Symbol, Orb::Models::InvoiceModel::InvoiceSource] - # # @param issue_failed_at [Time, nil] - # # @param issued_at [Time, nil] - # # @param line_items [Array] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param memo [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param paid_at [Time, nil] - # # @param payment_attempts [Array] - # # @param payment_failed_at [Time, nil] - # # @param payment_started_at [Time, nil] - # # @param scheduled_issue_at [Time, nil] - # # @param shipping_address [Orb::Models::AddressModel, nil] - # # @param status [Symbol, Orb::Models::InvoiceModel::Status] - # # @param subscription [Orb::Models::SubscriptionMinifiedModel, nil] - # # @param subtotal [String] - # # @param sync_failed_at [Time, nil] - # # @param total [String] - # # @param voided_at [Time, nil] - # # @param will_auto_issue [Boolean] - # # - # def initialize( - # id:, - # amount_due:, - # auto_collection:, - # billing_address:, - # created_at:, - # credit_notes:, - # currency:, - # customer:, - # customer_balance_transactions:, - # customer_tax_id:, - # discount:, - # discounts:, - # due_date:, - # eligible_to_issue_at:, - # hosted_invoice_url:, - # invoice_date:, - # invoice_number:, - # invoice_pdf:, - # invoice_source:, - # issue_failed_at:, - # issued_at:, - # line_items:, - # maximum:, - # maximum_amount:, - # memo:, - # metadata:, - # minimum:, - # minimum_amount:, - # paid_at:, - # payment_attempts:, - # payment_failed_at:, - # payment_started_at:, - # scheduled_issue_at:, - # shipping_address:, - # status:, - # subscription:, - # subtotal:, - # sync_failed_at:, - # total:, - # voided_at:, - # will_auto_issue:, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case invoice_source - # in :subscription - # # ... - # in :partial - # # ... - # in :one_off - # # ... - # end - # ``` - class InvoiceSource < Orb::Enum - SUBSCRIPTION = :subscription - PARTIAL = :partial - ONE_OFF = :one_off - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case status - # in :issued - # # ... - # in :paid - # # ... - # in :synced - # # ... - # in :void - # # ... - # in :draft - # # ... - # end - # ``` - class Status < Orb::Enum - ISSUED = :issued - PAID = :paid - SYNCED = :synced - VOID = :void - DRAFT = :draft - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end -end diff --git a/lib/orb/models/item.rb b/lib/orb/models/item.rb index bcc01d21..807a1c4d 100644 --- a/lib/orb/models/item.rb +++ b/lib/orb/models/item.rb @@ -15,8 +15,8 @@ class Item < Orb::BaseModel # @!attribute external_connections # - # @return [Array] - required :external_connections, -> { Orb::ArrayOf[Orb::Models::ItemExternalConnectionModel] } + # @return [Array] + required :external_connections, -> { Orb::ArrayOf[Orb::Models::Item::ExternalConnection] } # @!attribute name # @@ -30,12 +30,69 @@ class Item < Orb::BaseModel # # # # @param id [String] # # @param created_at [Time] - # # @param external_connections [Array] + # # @param external_connections [Array] # # @param name [String] # # # def initialize(id:, created_at:, external_connections:, name:, **) = super # def initialize: (Hash | Orb::BaseModel) -> void + + class ExternalConnection < Orb::BaseModel + # @!attribute external_connection_name + # + # @return [Symbol, Orb::Models::Item::ExternalConnection::ExternalConnectionName] + required :external_connection_name, + enum: -> { Orb::Models::Item::ExternalConnection::ExternalConnectionName } + + # @!attribute external_entity_id + # + # @return [String] + required :external_entity_id, String + + # @!parse + # # @param external_connection_name [Symbol, Orb::Models::Item::ExternalConnection::ExternalConnectionName] + # # @param external_entity_id [String] + # # + # def initialize(external_connection_name:, external_entity_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case external_connection_name + # in :stripe + # # ... + # in :quickbooks + # # ... + # in :"bill.com" + # # ... + # in :netsuite + # # ... + # in :taxjar + # # ... + # in ... + # #... + # end + # ``` + class ExternalConnectionName < Orb::Enum + STRIPE = :stripe + QUICKBOOKS = :quickbooks + BILL_COM = :"bill.com" + NETSUITE = :netsuite + TAXJAR = :taxjar + AVALARA = :avalara + ANROK = :anrok + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end end end diff --git a/lib/orb/models/item_external_connection_model.rb b/lib/orb/models/item_external_connection_model.rb deleted file mode 100644 index 1f3a3c7a..00000000 --- a/lib/orb/models/item_external_connection_model.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class ItemExternalConnectionModel < Orb::BaseModel - # @!attribute external_connection_name - # - # @return [Symbol, Orb::Models::ItemExternalConnectionModel::ExternalConnectionName] - required :external_connection_name, - enum: -> { Orb::Models::ItemExternalConnectionModel::ExternalConnectionName } - - # @!attribute external_entity_id - # - # @return [String] - required :external_entity_id, String - - # @!parse - # # @param external_connection_name [Symbol, Orb::Models::ItemExternalConnectionModel::ExternalConnectionName] - # # @param external_entity_id [String] - # # - # def initialize(external_connection_name:, external_entity_id:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case external_connection_name - # in :stripe - # # ... - # in :quickbooks - # # ... - # in :"bill.com" - # # ... - # in :netsuite - # # ... - # in :taxjar - # # ... - # in ... - # #... - # end - # ``` - class ExternalConnectionName < Orb::Enum - STRIPE = :stripe - QUICKBOOKS = :quickbooks - BILL_COM = :"bill.com" - NETSUITE = :netsuite - TAXJAR = :taxjar - AVALARA = :avalara - ANROK = :anrok - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end -end diff --git a/lib/orb/models/item_model.rb b/lib/orb/models/item_model.rb deleted file mode 100644 index f3bf9618..00000000 --- a/lib/orb/models/item_model.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class ItemModel < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute external_connections - # - # @return [Array] - required :external_connections, -> { Orb::ArrayOf[Orb::Models::ItemExternalConnectionModel] } - - # @!attribute name - # - # @return [String] - required :name, String - - # @!parse - # # The Item resource represents a sellable product or good. Items are associated - # # with all line items, billable metrics, and prices and are used for defining - # # external sync behavior for invoices and tax calculation purposes. - # # - # # @param id [String] - # # @param created_at [Time] - # # @param external_connections [Array] - # # @param name [String] - # # - # def initialize(id:, created_at:, external_connections:, name:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/item_slim_model.rb b/lib/orb/models/item_slim_model.rb deleted file mode 100644 index 417a43f7..00000000 --- a/lib/orb/models/item_slim_model.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class ItemSlimModel < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute name - # - # @return [String] - required :name, String - - # @!parse - # # @param id [String] - # # @param name [String] - # # - # def initialize(id:, name:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/item_update_params.rb b/lib/orb/models/item_update_params.rb index e2b38e46..ab125fd5 100644 --- a/lib/orb/models/item_update_params.rb +++ b/lib/orb/models/item_update_params.rb @@ -9,8 +9,10 @@ class ItemUpdateParams < Orb::BaseModel # @!attribute external_connections # - # @return [Array, nil] - optional :external_connections, -> { Orb::ArrayOf[Orb::Models::ItemExternalConnectionModel] }, nil?: true + # @return [Array, nil] + optional :external_connections, + -> { Orb::ArrayOf[Orb::Models::ItemUpdateParams::ExternalConnection] }, + nil?: true # @!attribute name # @@ -18,13 +20,70 @@ class ItemUpdateParams < Orb::BaseModel optional :name, String, nil?: true # @!parse - # # @param external_connections [Array, nil] + # # @param external_connections [Array, nil] # # @param name [String, nil] # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] # # # def initialize(external_connections: nil, name: nil, request_options: {}, **) = super # def initialize: (Hash | Orb::BaseModel) -> void + + class ExternalConnection < Orb::BaseModel + # @!attribute external_connection_name + # + # @return [Symbol, Orb::Models::ItemUpdateParams::ExternalConnection::ExternalConnectionName] + required :external_connection_name, + enum: -> { Orb::Models::ItemUpdateParams::ExternalConnection::ExternalConnectionName } + + # @!attribute external_entity_id + # + # @return [String] + required :external_entity_id, String + + # @!parse + # # @param external_connection_name [Symbol, Orb::Models::ItemUpdateParams::ExternalConnection::ExternalConnectionName] + # # @param external_entity_id [String] + # # + # def initialize(external_connection_name:, external_entity_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case external_connection_name + # in :stripe + # # ... + # in :quickbooks + # # ... + # in :"bill.com" + # # ... + # in :netsuite + # # ... + # in :taxjar + # # ... + # in ... + # #... + # end + # ``` + class ExternalConnectionName < Orb::Enum + STRIPE = :stripe + QUICKBOOKS = :quickbooks + BILL_COM = :"bill.com" + NETSUITE = :netsuite + TAXJAR = :taxjar + AVALARA = :avalara + ANROK = :anrok + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end end end diff --git a/lib/orb/models/matrix_config_model.rb b/lib/orb/models/matrix_config_model.rb deleted file mode 100644 index 7c178576..00000000 --- a/lib/orb/models/matrix_config_model.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class MatrixConfigModel < Orb::BaseModel - # @!attribute default_unit_amount - # Default per unit rate for any usage not bucketed into a specified matrix_value - # - # @return [String] - required :default_unit_amount, String - - # @!attribute dimensions - # One or two event property values to evaluate matrix groups by - # - # @return [Array] - required :dimensions, Orb::ArrayOf[String, nil?: true] - - # @!attribute matrix_values - # Matrix values for specified matrix grouping keys - # - # @return [Array] - required :matrix_values, -> { Orb::ArrayOf[Orb::Models::MatrixValueModel] } - - # @!parse - # # @param default_unit_amount [String] - # # @param dimensions [Array] - # # @param matrix_values [Array] - # # - # def initialize(default_unit_amount:, dimensions:, matrix_values:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/matrix_value_model.rb b/lib/orb/models/matrix_value_model.rb deleted file mode 100644 index 79a6ca34..00000000 --- a/lib/orb/models/matrix_value_model.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class MatrixValueModel < Orb::BaseModel - # @!attribute dimension_values - # One or two matrix keys to filter usage to this Matrix value by. For example, - # ["region", "tier"] could be used to filter cloud usage by a cloud region and an - # instance tier. - # - # @return [Array] - required :dimension_values, Orb::ArrayOf[String, nil?: true] - - # @!attribute unit_amount - # Unit price for the specified dimension_values - # - # @return [String] - required :unit_amount, String - - # @!parse - # # @param dimension_values [Array] - # # @param unit_amount [String] - # # - # def initialize(dimension_values:, unit_amount:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/matrix_with_allocation_config_model.rb b/lib/orb/models/matrix_with_allocation_config_model.rb deleted file mode 100644 index 46535c4a..00000000 --- a/lib/orb/models/matrix_with_allocation_config_model.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class MatrixWithAllocationConfigModel < Orb::BaseModel - # @!attribute allocation - # Allocation to be used to calculate the price - # - # @return [Float] - required :allocation, Float - - # @!attribute default_unit_amount - # Default per unit rate for any usage not bucketed into a specified matrix_value - # - # @return [String] - required :default_unit_amount, String - - # @!attribute dimensions - # One or two event property values to evaluate matrix groups by - # - # @return [Array] - required :dimensions, Orb::ArrayOf[String, nil?: true] - - # @!attribute matrix_values - # Matrix values for specified matrix grouping keys - # - # @return [Array] - required :matrix_values, -> { Orb::ArrayOf[Orb::Models::MatrixValueModel] } - - # @!parse - # # @param allocation [Float] - # # @param default_unit_amount [String] - # # @param dimensions [Array] - # # @param matrix_values [Array] - # # - # def initialize(allocation:, default_unit_amount:, dimensions:, matrix_values:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/maximum_interval_model.rb b/lib/orb/models/maximum_interval_model.rb deleted file mode 100644 index ce8d2202..00000000 --- a/lib/orb/models/maximum_interval_model.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class MaximumIntervalModel < Orb::BaseModel - # @!attribute applies_to_price_ids - # The price ids that this maximum interval applies to. - # - # @return [Array] - required :applies_to_price_ids, Orb::ArrayOf[String] - - # @!attribute applies_to_price_interval_ids - # The price interval ids that this maximum interval applies to. - # - # @return [Array] - required :applies_to_price_interval_ids, Orb::ArrayOf[String] - - # @!attribute end_date - # The end date of the maximum interval. - # - # @return [Time, nil] - required :end_date, Time, nil?: true - - # @!attribute maximum_amount - # The maximum amount to charge in a given billing period for the price intervals - # this transform applies to. - # - # @return [String] - required :maximum_amount, String - - # @!attribute start_date - # The start date of the maximum interval. - # - # @return [Time] - required :start_date, Time - - # @!parse - # # @param applies_to_price_ids [Array] - # # @param applies_to_price_interval_ids [Array] - # # @param end_date [Time, nil] - # # @param maximum_amount [String] - # # @param start_date [Time] - # # - # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, maximum_amount:, start_date:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/maximum_model.rb b/lib/orb/models/maximum_model.rb deleted file mode 100644 index 63b0828c..00000000 --- a/lib/orb/models/maximum_model.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class MaximumModel < Orb::BaseModel - # @!attribute applies_to_price_ids - # List of price_ids that this maximum amount applies to. For plan/plan phase - # maximums, this can be a subset of prices. - # - # @return [Array] - required :applies_to_price_ids, Orb::ArrayOf[String] - - # @!attribute maximum_amount - # Maximum amount applied - # - # @return [String] - required :maximum_amount, String - - # @!parse - # # @param applies_to_price_ids [Array] - # # @param maximum_amount [String] - # # - # def initialize(applies_to_price_ids:, maximum_amount:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/minimum_interval_model.rb b/lib/orb/models/minimum_interval_model.rb deleted file mode 100644 index 13c1ea11..00000000 --- a/lib/orb/models/minimum_interval_model.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class MinimumIntervalModel < Orb::BaseModel - # @!attribute applies_to_price_ids - # The price ids that this minimum interval applies to. - # - # @return [Array] - required :applies_to_price_ids, Orb::ArrayOf[String] - - # @!attribute applies_to_price_interval_ids - # The price interval ids that this minimum interval applies to. - # - # @return [Array] - required :applies_to_price_interval_ids, Orb::ArrayOf[String] - - # @!attribute end_date - # The end date of the minimum interval. - # - # @return [Time, nil] - required :end_date, Time, nil?: true - - # @!attribute minimum_amount - # The minimum amount to charge in a given billing period for the price intervals - # this minimum applies to. - # - # @return [String] - required :minimum_amount, String - - # @!attribute start_date - # The start date of the minimum interval. - # - # @return [Time] - required :start_date, Time - - # @!parse - # # @param applies_to_price_ids [Array] - # # @param applies_to_price_interval_ids [Array] - # # @param end_date [Time, nil] - # # @param minimum_amount [String] - # # @param start_date [Time] - # # - # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, minimum_amount:, start_date:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/minimum_model.rb b/lib/orb/models/minimum_model.rb deleted file mode 100644 index c3e7a846..00000000 --- a/lib/orb/models/minimum_model.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class MinimumModel < Orb::BaseModel - # @!attribute applies_to_price_ids - # List of price_ids that this minimum amount applies to. For plan/plan phase - # minimums, this can be a subset of prices. - # - # @return [Array] - required :applies_to_price_ids, Orb::ArrayOf[String] - - # @!attribute minimum_amount - # Minimum amount applied - # - # @return [String] - required :minimum_amount, String - - # @!parse - # # @param applies_to_price_ids [Array] - # # @param minimum_amount [String] - # # - # def initialize(applies_to_price_ids:, minimum_amount:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/mutated_subscription_model.rb b/lib/orb/models/mutated_subscription_model.rb deleted file mode 100644 index b71390fe..00000000 --- a/lib/orb/models/mutated_subscription_model.rb +++ /dev/null @@ -1,324 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class MutatedSubscriptionModel < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute active_plan_phase_order - # The current plan phase that is active, only if the subscription's plan has - # phases. - # - # @return [Integer, nil] - required :active_plan_phase_order, Integer, nil?: true - - # @!attribute adjustment_intervals - # The adjustment intervals for this subscription. - # - # @return [Array] - required :adjustment_intervals, -> { Orb::ArrayOf[Orb::Models::AdjustmentIntervalModel] } - - # @!attribute auto_collection - # Determines whether issued invoices for this subscription will automatically be - # charged with the saved payment method on the due date. This property defaults to - # the plan's behavior. If null, defaults to the customer's setting. - # - # @return [Boolean, nil] - required :auto_collection, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_anchor_configuration - # - # @return [Orb::Models::BillingCycleAnchorConfigurationModel] - required :billing_cycle_anchor_configuration, -> { Orb::Models::BillingCycleAnchorConfigurationModel } - - # @!attribute billing_cycle_day - # The day of the month on which the billing cycle is anchored. If the maximum - # number of days in a month is greater than this value, the last day of the month - # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing - # period begins on the 30th. - # - # @return [Integer] - required :billing_cycle_day, Integer - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute current_billing_period_end_date - # The end of the current billing period. This is an exclusive timestamp, such that - # the instant returned is not part of the billing period. Set to null for - # subscriptions that are not currently active. - # - # @return [Time, nil] - required :current_billing_period_end_date, Time, nil?: true - - # @!attribute current_billing_period_start_date - # The start date of the current billing period. This is an inclusive timestamp; - # the instant returned is exactly the beginning of the billing period. Set to null - # if the subscription is not currently active. - # - # @return [Time, nil] - required :current_billing_period_start_date, Time, nil?: true - - # @!attribute customer - # A customer is a buyer of your products, and the other party to the billing - # relationship. - # - # In Orb, customers are assigned system generated identifiers automatically, but - # it's often desirable to have these match existing identifiers in your system. To - # avoid having to denormalize Orb ID information, you can pass in an - # `external_customer_id` with your own identifier. See - # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further - # information about how these aliases work in Orb. - # - # In addition to having an identifier in your system, a customer may exist in a - # payment provider solution like Stripe. Use the `payment_provider_id` and the - # `payment_provider` enum field to express this mapping. - # - # A customer also has a timezone (from the standard - # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to - # your account's timezone. See [Timezone localization](/essentials/timezones) for - # information on what this timezone parameter influences within Orb. - # - # @return [Orb::Models::CustomerModel] - required :customer, -> { Orb::Models::CustomerModel } - - # @!attribute default_invoice_memo - # Determines the default memo on this subscriptions' invoices. Note that if this - # is not provided, it is determined by the plan configuration. - # - # @return [String, nil] - required :default_invoice_memo, String, nil?: true - - # @!attribute discount_intervals - # The discount intervals for this subscription. - # - # @return [Array] - required :discount_intervals, - -> { Orb::ArrayOf[union: Orb::Models::MutatedSubscriptionModel::DiscountInterval] } - - # @!attribute end_date - # The date Orb stops billing for this subscription. - # - # @return [Time, nil] - required :end_date, Time, nil?: true - - # @!attribute fixed_fee_quantity_schedule - # - # @return [Array] - required :fixed_fee_quantity_schedule, - -> { Orb::ArrayOf[Orb::Models::FixedFeeQuantityScheduleEntryModel] } - - # @!attribute invoicing_threshold - # - # @return [String, nil] - required :invoicing_threshold, String, nil?: true - - # @!attribute maximum_intervals - # The maximum intervals for this subscription. - # - # @return [Array] - required :maximum_intervals, -> { Orb::ArrayOf[Orb::Models::MaximumIntervalModel] } - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum_intervals - # The minimum intervals for this subscription. - # - # @return [Array] - required :minimum_intervals, -> { Orb::ArrayOf[Orb::Models::MinimumIntervalModel] } - - # @!attribute net_terms - # Determines the difference between the invoice issue date for subscription - # invoices as the date that they are due. A value of `0` here represents that the - # invoice is due on issue, whereas a value of `30` represents that the customer - # has a month to pay the invoice. - # - # @return [Integer] - required :net_terms, Integer - - # @!attribute plan - # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be - # subscribed to by a customer. Plans define the billing behavior of the - # subscription. You can see more about how to configure prices in the - # [Price resource](/reference/price). - # - # @return [Orb::Models::PlanModel] - required :plan, -> { Orb::Models::PlanModel } - - # @!attribute price_intervals - # The price intervals for this subscription. - # - # @return [Array] - required :price_intervals, -> { Orb::ArrayOf[Orb::Models::PriceIntervalModel] } - - # @!attribute redeemed_coupon - # - # @return [Orb::Models::CouponRedemptionModel, nil] - required :redeemed_coupon, -> { Orb::Models::CouponRedemptionModel }, nil?: true - - # @!attribute start_date - # The date Orb starts billing for this subscription. - # - # @return [Time] - required :start_date, Time - - # @!attribute status - # - # @return [Symbol, Orb::Models::MutatedSubscriptionModel::Status] - required :status, enum: -> { Orb::Models::MutatedSubscriptionModel::Status } - - # @!attribute trial_info - # - # @return [Orb::Models::SubscriptionTrialInfoModel] - required :trial_info, -> { Orb::Models::SubscriptionTrialInfoModel } - - # @!parse - # # @param id [String] - # # @param active_plan_phase_order [Integer, nil] - # # @param adjustment_intervals [Array] - # # @param auto_collection [Boolean, nil] - # # @param billing_cycle_anchor_configuration [Orb::Models::BillingCycleAnchorConfigurationModel] - # # @param billing_cycle_day [Integer] - # # @param created_at [Time] - # # @param current_billing_period_end_date [Time, nil] - # # @param current_billing_period_start_date [Time, nil] - # # @param customer [Orb::Models::CustomerModel] - # # @param default_invoice_memo [String, nil] - # # @param discount_intervals [Array] - # # @param end_date [Time, nil] - # # @param fixed_fee_quantity_schedule [Array] - # # @param invoicing_threshold [String, nil] - # # @param maximum_intervals [Array] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum_intervals [Array] - # # @param net_terms [Integer] - # # @param plan [Orb::Models::PlanModel] - # # @param price_intervals [Array] - # # @param redeemed_coupon [Orb::Models::CouponRedemptionModel, nil] - # # @param start_date [Time] - # # @param status [Symbol, Orb::Models::MutatedSubscriptionModel::Status] - # # @param trial_info [Orb::Models::SubscriptionTrialInfoModel] - # # - # def initialize( - # id:, - # active_plan_phase_order:, - # adjustment_intervals:, - # auto_collection:, - # billing_cycle_anchor_configuration:, - # billing_cycle_day:, - # created_at:, - # current_billing_period_end_date:, - # current_billing_period_start_date:, - # customer:, - # default_invoice_memo:, - # discount_intervals:, - # end_date:, - # fixed_fee_quantity_schedule:, - # invoicing_threshold:, - # maximum_intervals:, - # metadata:, - # minimum_intervals:, - # net_terms:, - # plan:, - # price_intervals:, - # redeemed_coupon:, - # start_date:, - # status:, - # trial_info:, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case discount_interval - # in { - # discount_type: "amount", - # amount_discount: String, - # applies_to_price_ids: ^(Orb::ArrayOf[String]), - # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]) - # } - # # Orb::Models::AmountDiscountIntervalModel ... - # in { - # discount_type: "percentage", - # applies_to_price_ids: ^(Orb::ArrayOf[String]), - # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), - # end_date: Time - # } - # # Orb::Models::PercentageDiscountIntervalModel ... - # in { - # discount_type: "usage", - # applies_to_price_ids: ^(Orb::ArrayOf[String]), - # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), - # end_date: Time - # } - # # Orb::Models::UsageDiscountIntervalModel ... - # end - # ``` - # - # @example - # ```ruby - # case discount_interval - # in Orb::Models::AmountDiscountIntervalModel - # # ... - # in Orb::Models::PercentageDiscountIntervalModel - # # ... - # in Orb::Models::UsageDiscountIntervalModel - # # ... - # end - # ``` - class DiscountInterval < Orb::Union - discriminator :discount_type - - variant :amount, -> { Orb::Models::AmountDiscountIntervalModel } - - variant :percentage, -> { Orb::Models::PercentageDiscountIntervalModel } - - variant :usage, -> { Orb::Models::UsageDiscountIntervalModel } - end - - # @abstract - # - # @example - # ```ruby - # case status - # in :active - # # ... - # in :ended - # # ... - # in :upcoming - # # ... - # end - # ``` - class Status < Orb::Enum - ACTIVE = :active - ENDED = :ended - UPCOMING = :upcoming - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end -end diff --git a/lib/orb/models/new_accounting_sync_configuration_model.rb b/lib/orb/models/new_accounting_sync_configuration_model.rb deleted file mode 100644 index 0d107f69..00000000 --- a/lib/orb/models/new_accounting_sync_configuration_model.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class NewAccountingSyncConfigurationModel < Orb::BaseModel - # @!attribute accounting_providers - # - # @return [Array, nil] - optional :accounting_providers, - -> { Orb::ArrayOf[Orb::Models::NewAccountingSyncConfigurationModel::AccountingProvider] }, - nil?: true - - # @!attribute excluded - # - # @return [Boolean, nil] - optional :excluded, Orb::BooleanModel, nil?: true - - # @!parse - # # @param accounting_providers [Array, nil] - # # @param excluded [Boolean, nil] - # # - # def initialize(accounting_providers: nil, excluded: nil, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - class AccountingProvider < Orb::BaseModel - # @!attribute external_provider_id - # - # @return [String] - required :external_provider_id, String - - # @!attribute provider_type - # - # @return [String] - required :provider_type, String - - # @!parse - # # @param external_provider_id [String] - # # @param provider_type [String] - # # - # def initialize(external_provider_id:, provider_type:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end - end -end diff --git a/lib/orb/models/new_adjustment_model.rb b/lib/orb/models/new_adjustment_model.rb deleted file mode 100644 index 951baadb..00000000 --- a/lib/orb/models/new_adjustment_model.rb +++ /dev/null @@ -1,287 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - # @abstract - # - # @example - # ```ruby - # case new_adjustment_model - # in { - # adjustment_type: "percentage_discount", - # applies_to_price_ids: ^(Orb::ArrayOf[String]), - # percentage_discount: Float, - # is_invoice_level: Orb::BooleanModel - # } - # # Orb::Models::NewAdjustmentModel::NewPercentageDiscount ... - # in { - # adjustment_type: "usage_discount", - # applies_to_price_ids: ^(Orb::ArrayOf[String]), - # usage_discount: Float, - # is_invoice_level: Orb::BooleanModel - # } - # # Orb::Models::NewAdjustmentModel::NewUsageDiscount ... - # in { - # adjustment_type: "amount_discount", - # amount_discount: String, - # applies_to_price_ids: ^(Orb::ArrayOf[String]), - # is_invoice_level: Orb::BooleanModel - # } - # # Orb::Models::NewAdjustmentModel::NewAmountDiscount ... - # in { - # adjustment_type: "minimum", - # applies_to_price_ids: ^(Orb::ArrayOf[String]), - # item_id: String, - # minimum_amount: String - # } - # # Orb::Models::NewAdjustmentModel::NewMinimum ... - # in { - # adjustment_type: "maximum", - # applies_to_price_ids: ^(Orb::ArrayOf[String]), - # maximum_amount: String, - # is_invoice_level: Orb::BooleanModel - # } - # # Orb::Models::NewAdjustmentModel::NewMaximum ... - # end - # ``` - # - # @example - # ```ruby - # case new_adjustment_model - # in Orb::Models::NewAdjustmentModel::NewPercentageDiscount - # # ... - # in Orb::Models::NewAdjustmentModel::NewUsageDiscount - # # ... - # in Orb::Models::NewAdjustmentModel::NewAmountDiscount - # # ... - # in Orb::Models::NewAdjustmentModel::NewMinimum - # # ... - # in Orb::Models::NewAdjustmentModel::NewMaximum - # # ... - # end - # ``` - class NewAdjustmentModel < Orb::Union - discriminator :adjustment_type - - variant :percentage_discount, -> { Orb::Models::NewAdjustmentModel::NewPercentageDiscount } - - variant :usage_discount, -> { Orb::Models::NewAdjustmentModel::NewUsageDiscount } - - variant :amount_discount, -> { Orb::Models::NewAdjustmentModel::NewAmountDiscount } - - variant :minimum, -> { Orb::Models::NewAdjustmentModel::NewMinimum } - - variant :maximum, -> { Orb::Models::NewAdjustmentModel::NewMaximum } - - class NewPercentageDiscount < Orb::BaseModel - # @!attribute adjustment_type - # - # @return [Symbol, :percentage_discount] - required :adjustment_type, const: :percentage_discount - - # @!attribute applies_to_price_ids - # The set of price IDs to which this adjustment applies. - # - # @return [Array] - required :applies_to_price_ids, Orb::ArrayOf[String] - - # @!attribute percentage_discount - # - # @return [Float] - required :percentage_discount, Float - - # @!attribute [r] is_invoice_level - # When false, this adjustment will be applied to a single price. Otherwise, it - # will be applied at the invoice level, possibly to multiple prices. - # - # @return [Boolean, nil] - optional :is_invoice_level, Orb::BooleanModel - - # @!parse - # # @return [Boolean] - # attr_writer :is_invoice_level - - # @!parse - # # @param applies_to_price_ids [Array] - # # @param percentage_discount [Float] - # # @param is_invoice_level [Boolean] - # # @param adjustment_type [Symbol, :percentage_discount] - # # - # def initialize( - # applies_to_price_ids:, - # percentage_discount:, - # is_invoice_level: nil, - # adjustment_type: :percentage_discount, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - end - - class NewUsageDiscount < Orb::BaseModel - # @!attribute adjustment_type - # - # @return [Symbol, :usage_discount] - required :adjustment_type, const: :usage_discount - - # @!attribute applies_to_price_ids - # The set of price IDs to which this adjustment applies. - # - # @return [Array] - required :applies_to_price_ids, Orb::ArrayOf[String] - - # @!attribute usage_discount - # - # @return [Float] - required :usage_discount, Float - - # @!attribute [r] is_invoice_level - # When false, this adjustment will be applied to a single price. Otherwise, it - # will be applied at the invoice level, possibly to multiple prices. - # - # @return [Boolean, nil] - optional :is_invoice_level, Orb::BooleanModel - - # @!parse - # # @return [Boolean] - # attr_writer :is_invoice_level - - # @!parse - # # @param applies_to_price_ids [Array] - # # @param usage_discount [Float] - # # @param is_invoice_level [Boolean] - # # @param adjustment_type [Symbol, :usage_discount] - # # - # def initialize(applies_to_price_ids:, usage_discount:, is_invoice_level: nil, adjustment_type: :usage_discount, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - - class NewAmountDiscount < Orb::BaseModel - # @!attribute adjustment_type - # - # @return [Symbol, :amount_discount] - required :adjustment_type, const: :amount_discount - - # @!attribute amount_discount - # - # @return [String] - required :amount_discount, String - - # @!attribute applies_to_price_ids - # The set of price IDs to which this adjustment applies. - # - # @return [Array] - required :applies_to_price_ids, Orb::ArrayOf[String] - - # @!attribute [r] is_invoice_level - # When false, this adjustment will be applied to a single price. Otherwise, it - # will be applied at the invoice level, possibly to multiple prices. - # - # @return [Boolean, nil] - optional :is_invoice_level, Orb::BooleanModel - - # @!parse - # # @return [Boolean] - # attr_writer :is_invoice_level - - # @!parse - # # @param amount_discount [String] - # # @param applies_to_price_ids [Array] - # # @param is_invoice_level [Boolean] - # # @param adjustment_type [Symbol, :amount_discount] - # # - # def initialize(amount_discount:, applies_to_price_ids:, is_invoice_level: nil, adjustment_type: :amount_discount, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - - class NewMinimum < Orb::BaseModel - # @!attribute adjustment_type - # - # @return [Symbol, :minimum] - required :adjustment_type, const: :minimum - - # @!attribute applies_to_price_ids - # The set of price IDs to which this adjustment applies. - # - # @return [Array] - required :applies_to_price_ids, Orb::ArrayOf[String] - - # @!attribute item_id - # The item ID that revenue from this minimum will be attributed to. - # - # @return [String] - required :item_id, String - - # @!attribute minimum_amount - # - # @return [String] - required :minimum_amount, String - - # @!attribute [r] is_invoice_level - # When false, this adjustment will be applied to a single price. Otherwise, it - # will be applied at the invoice level, possibly to multiple prices. - # - # @return [Boolean, nil] - optional :is_invoice_level, Orb::BooleanModel - - # @!parse - # # @return [Boolean] - # attr_writer :is_invoice_level - - # @!parse - # # @param applies_to_price_ids [Array] - # # @param item_id [String] - # # @param minimum_amount [String] - # # @param is_invoice_level [Boolean] - # # @param adjustment_type [Symbol, :minimum] - # # - # def initialize(applies_to_price_ids:, item_id:, minimum_amount:, is_invoice_level: nil, adjustment_type: :minimum, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - - class NewMaximum < Orb::BaseModel - # @!attribute adjustment_type - # - # @return [Symbol, :maximum] - required :adjustment_type, const: :maximum - - # @!attribute applies_to_price_ids - # The set of price IDs to which this adjustment applies. - # - # @return [Array] - required :applies_to_price_ids, Orb::ArrayOf[String] - - # @!attribute maximum_amount - # - # @return [String] - required :maximum_amount, String - - # @!attribute [r] is_invoice_level - # When false, this adjustment will be applied to a single price. Otherwise, it - # will be applied at the invoice level, possibly to multiple prices. - # - # @return [Boolean, nil] - optional :is_invoice_level, Orb::BooleanModel - - # @!parse - # # @return [Boolean] - # attr_writer :is_invoice_level - - # @!parse - # # @param applies_to_price_ids [Array] - # # @param maximum_amount [String] - # # @param is_invoice_level [Boolean] - # # @param adjustment_type [Symbol, :maximum] - # # - # def initialize(applies_to_price_ids:, maximum_amount:, is_invoice_level: nil, adjustment_type: :maximum, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end - end -end diff --git a/lib/orb/models/new_allocation_price_model.rb b/lib/orb/models/new_allocation_price_model.rb deleted file mode 100644 index 28f6e83f..00000000 --- a/lib/orb/models/new_allocation_price_model.rb +++ /dev/null @@ -1,80 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class NewAllocationPriceModel < Orb::BaseModel - # @!attribute amount - # An amount of the currency to allocate to the customer at the specified cadence. - # - # @return [String] - required :amount, String - - # @!attribute cadence - # The cadence at which to allocate the amount to the customer. - # - # @return [Symbol, Orb::Models::NewAllocationPriceModel::Cadence] - required :cadence, enum: -> { Orb::Models::NewAllocationPriceModel::Cadence } - - # @!attribute currency - # An ISO 4217 currency string or a custom pricing unit identifier in which to bill - # this price. - # - # @return [String] - required :currency, String - - # @!attribute expires_at_end_of_cadence - # Whether the allocated amount should expire at the end of the cadence or roll - # over to the next period. - # - # @return [Boolean] - required :expires_at_end_of_cadence, Orb::BooleanModel - - # @!parse - # # @param amount [String] - # # @param cadence [Symbol, Orb::Models::NewAllocationPriceModel::Cadence] - # # @param currency [String] - # # @param expires_at_end_of_cadence [Boolean] - # # - # def initialize(amount:, cadence:, currency:, expires_at_end_of_cadence:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence at which to allocate the amount to the customer. - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end -end diff --git a/lib/orb/models/new_billing_cycle_configuration_model.rb b/lib/orb/models/new_billing_cycle_configuration_model.rb deleted file mode 100644 index b8fed65e..00000000 --- a/lib/orb/models/new_billing_cycle_configuration_model.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class NewBillingCycleConfigurationModel < Orb::BaseModel - # @!attribute duration - # The duration of the billing period. - # - # @return [Integer] - required :duration, Integer - - # @!attribute duration_unit - # The unit of billing period duration. - # - # @return [Symbol, Orb::Models::NewBillingCycleConfigurationModel::DurationUnit] - required :duration_unit, enum: -> { Orb::Models::NewBillingCycleConfigurationModel::DurationUnit } - - # @!parse - # # @param duration [Integer] - # # @param duration_unit [Symbol, Orb::Models::NewBillingCycleConfigurationModel::DurationUnit] - # # - # def initialize(duration:, duration_unit:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The unit of billing period duration. - # - # @example - # ```ruby - # case duration_unit - # in :day - # # ... - # in :month - # # ... - # end - # ``` - class DurationUnit < Orb::Enum - DAY = :day - MONTH = :month - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end -end diff --git a/lib/orb/models/new_floating_price_model.rb b/lib/orb/models/new_floating_price_model.rb deleted file mode 100644 index 84d51878..00000000 --- a/lib/orb/models/new_floating_price_model.rb +++ /dev/null @@ -1,5233 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - # @abstract - # - # @example - # ```ruby - # case new_floating_price_model - # in { - # model_type: "unit", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice::Cadence, - # currency: String, - # item_id: String - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice ... - # in { - # model_type: "package", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice::Cadence, - # currency: String, - # item_id: String - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice ... - # in { - # model_type: "matrix", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice::Cadence, - # currency: String, - # item_id: String - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice ... - # in { - # model_type: "matrix_with_allocation", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice::Cadence, - # currency: String, - # item_id: String - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice ... - # in { - # model_type: "tiered", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice::Cadence, - # currency: String, - # item_id: String - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice ... - # in { - # model_type: "tiered_bps", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice::Cadence, - # currency: String, - # item_id: String - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice ... - # in { - # model_type: "bps", - # bps_config: Orb::Models::BpsConfigModel, - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice::Cadence, - # currency: String - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice ... - # in { - # model_type: "bulk_bps", - # bulk_bps_config: Orb::Models::BulkBpsConfigModel, - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice::Cadence, - # currency: String - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice ... - # in { - # model_type: "bulk", - # bulk_config: Orb::Models::BulkConfigModel, - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice::Cadence, - # currency: String - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice ... - # in { - # model_type: "threshold_total_amount", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice::Cadence, - # currency: String, - # item_id: String - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice ... - # in { - # model_type: "tiered_package", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice::Cadence, - # currency: String, - # item_id: String - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice ... - # in { - # model_type: "grouped_tiered", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice::Cadence, - # currency: String, - # grouped_tiered_config: ^(Orb::HashOf[Orb::Unknown]) - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice ... - # in { - # model_type: "max_group_tiered_package", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice::Cadence, - # currency: String, - # item_id: String - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice ... - # in { - # model_type: "tiered_with_minimum", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice::Cadence, - # currency: String, - # item_id: String - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice ... - # in { - # model_type: "package_with_allocation", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice::Cadence, - # currency: String, - # item_id: String - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice ... - # in { - # model_type: "tiered_package_with_minimum", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice::Cadence, - # currency: String, - # item_id: String - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice ... - # in { - # model_type: "unit_with_percent", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice::Cadence, - # currency: String, - # item_id: String - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice ... - # in { - # model_type: "tiered_with_proration", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice::Cadence, - # currency: String, - # item_id: String - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice ... - # in { - # model_type: "unit_with_proration", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice::Cadence, - # currency: String, - # item_id: String - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice ... - # in { - # model_type: "grouped_allocation", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice::Cadence, - # currency: String, - # grouped_allocation_config: ^(Orb::HashOf[Orb::Unknown]) - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice ... - # in { - # model_type: "grouped_with_prorated_minimum", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice::Cadence, - # currency: String, - # grouped_with_prorated_minimum_config: ^(Orb::HashOf[Orb::Unknown]) - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice ... - # in { - # model_type: "grouped_with_metered_minimum", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice::Cadence, - # currency: String, - # grouped_with_metered_minimum_config: ^(Orb::HashOf[Orb::Unknown]) - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice ... - # in { - # model_type: "matrix_with_display_name", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice::Cadence, - # currency: String, - # item_id: String - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice ... - # in { - # model_type: "bulk_with_proration", - # bulk_with_proration_config: ^(Orb::HashOf[Orb::Unknown]), - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice::Cadence, - # currency: String - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice ... - # in { - # model_type: "grouped_tiered_package", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice::Cadence, - # currency: String, - # grouped_tiered_package_config: ^(Orb::HashOf[Orb::Unknown]) - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice ... - # in { - # model_type: "scalable_matrix_with_unit_pricing", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice::Cadence, - # currency: String, - # item_id: String - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice ... - # in { - # model_type: "scalable_matrix_with_tiered_pricing", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice::Cadence, - # currency: String, - # item_id: String - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice ... - # in { - # model_type: "cumulative_grouped_bulk", - # cadence: Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice::Cadence, - # cumulative_grouped_bulk_config: ^(Orb::HashOf[Orb::Unknown]), - # currency: String - # } - # # Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice ... - # end - # ``` - # - # @example - # ```ruby - # case new_floating_price_model - # in Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice - # # ... - # in Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice - # # ... - # end - # ``` - class NewFloatingPriceModel < Orb::Union - discriminator :model_type - - variant :unit, -> { Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice } - - variant :package, -> { Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice } - - variant :matrix, -> { Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice } - - variant :matrix_with_allocation, - -> { Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice } - - variant :tiered, -> { Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice } - - variant :tiered_bps, -> { Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice } - - variant :bps, -> { Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice } - - variant :bulk_bps, -> { Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice } - - variant :bulk, -> { Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice } - - variant :threshold_total_amount, - -> { Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice } - - variant :tiered_package, -> { Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice } - - variant :grouped_tiered, -> { Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice } - - variant :max_group_tiered_package, - -> { Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice } - - variant :tiered_with_minimum, -> { Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice } - - variant :package_with_allocation, - -> { Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice } - - variant :tiered_package_with_minimum, - -> { Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice } - - variant :unit_with_percent, -> { Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice } - - variant :tiered_with_proration, - -> { Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice } - - variant :unit_with_proration, -> { Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice } - - variant :grouped_allocation, -> { Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice } - - variant :grouped_with_prorated_minimum, - -> { Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice } - - variant :grouped_with_metered_minimum, - -> { Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice } - - variant :matrix_with_display_name, - -> { Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice } - - variant :bulk_with_proration, -> { Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice } - - variant :grouped_tiered_package, - -> { Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice } - - variant :scalable_matrix_with_unit_pricing, - -> { Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice } - - variant :scalable_matrix_with_tiered_pricing, - -> { Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice } - - variant :cumulative_grouped_bulk, - -> { Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice } - - class NewFloatingUnitPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice::Cadence] - required :cadence, enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :unit] - required :model_type, const: :unit - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_config - # - # @return [Orb::Models::UnitConfigModel] - required :unit_config, -> { Orb::Models::UnitConfigModel } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice::Cadence] - # # @param currency [String] - # # @param item_id [String] - # # @param name [String] - # # @param unit_config [Orb::Models::UnitConfigModel] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :unit] - # # - # def initialize( - # cadence:, - # currency:, - # item_id:, - # name:, - # unit_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :unit, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingPackagePrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice::Cadence] - required :cadence, enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :package] - required :model_type, const: :package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute package_config - # - # @return [Orb::Models::PackageConfigModel] - required :package_config, -> { Orb::Models::PackageConfigModel } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice::Cadence] - # # @param currency [String] - # # @param item_id [String] - # # @param name [String] - # # @param package_config [Orb::Models::PackageConfigModel] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :package] - # # - # def initialize( - # cadence:, - # currency:, - # item_id:, - # name:, - # package_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :package, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingMatrixPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice::Cadence] - required :cadence, enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute matrix_config - # - # @return [Orb::Models::MatrixConfigModel] - required :matrix_config, -> { Orb::Models::MatrixConfigModel } - - # @!attribute model_type - # - # @return [Symbol, :matrix] - required :model_type, const: :matrix - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice::Cadence] - # # @param currency [String] - # # @param item_id [String] - # # @param matrix_config [Orb::Models::MatrixConfigModel] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :matrix] - # # - # def initialize( - # cadence:, - # currency:, - # item_id:, - # matrix_config:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :matrix, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingMatrixWithAllocationPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute matrix_with_allocation_config - # - # @return [Orb::Models::MatrixWithAllocationConfigModel] - required :matrix_with_allocation_config, -> { Orb::Models::MatrixWithAllocationConfigModel } - - # @!attribute model_type - # - # @return [Symbol, :matrix_with_allocation] - required :model_type, const: :matrix_with_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice::Cadence] - # # @param currency [String] - # # @param item_id [String] - # # @param matrix_with_allocation_config [Orb::Models::MatrixWithAllocationConfigModel] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :matrix_with_allocation] - # # - # def initialize( - # cadence:, - # currency:, - # item_id:, - # matrix_with_allocation_config:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :matrix_with_allocation, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingTieredPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice::Cadence] - required :cadence, enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :tiered] - required :model_type, const: :tiered - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_config - # - # @return [Orb::Models::TieredConfigModel] - required :tiered_config, -> { Orb::Models::TieredConfigModel } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice::Cadence] - # # @param currency [String] - # # @param item_id [String] - # # @param name [String] - # # @param tiered_config [Orb::Models::TieredConfigModel] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :tiered] - # # - # def initialize( - # cadence:, - # currency:, - # item_id:, - # name:, - # tiered_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :tiered, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingTieredBpsPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice::Cadence] - required :cadence, enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :tiered_bps] - required :model_type, const: :tiered_bps - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_bps_config - # - # @return [Orb::Models::TieredBpsConfigModel] - required :tiered_bps_config, -> { Orb::Models::TieredBpsConfigModel } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice::Cadence] - # # @param currency [String] - # # @param item_id [String] - # # @param name [String] - # # @param tiered_bps_config [Orb::Models::TieredBpsConfigModel] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :tiered_bps] - # # - # def initialize( - # cadence:, - # currency:, - # item_id:, - # name:, - # tiered_bps_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :tiered_bps, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingBpsPrice < Orb::BaseModel - # @!attribute bps_config - # - # @return [Orb::Models::BpsConfigModel] - required :bps_config, -> { Orb::Models::BpsConfigModel } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice::Cadence] - required :cadence, enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :bps] - required :model_type, const: :bps - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param bps_config [Orb::Models::BpsConfigModel] - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice::Cadence] - # # @param currency [String] - # # @param item_id [String] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :bps] - # # - # def initialize( - # bps_config:, - # cadence:, - # currency:, - # item_id:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :bps, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingBulkBpsPrice < Orb::BaseModel - # @!attribute bulk_bps_config - # - # @return [Orb::Models::BulkBpsConfigModel] - required :bulk_bps_config, -> { Orb::Models::BulkBpsConfigModel } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice::Cadence] - required :cadence, enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :bulk_bps] - required :model_type, const: :bulk_bps - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param bulk_bps_config [Orb::Models::BulkBpsConfigModel] - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice::Cadence] - # # @param currency [String] - # # @param item_id [String] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :bulk_bps] - # # - # def initialize( - # bulk_bps_config:, - # cadence:, - # currency:, - # item_id:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :bulk_bps, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingBulkPrice < Orb::BaseModel - # @!attribute bulk_config - # - # @return [Orb::Models::BulkConfigModel] - required :bulk_config, -> { Orb::Models::BulkConfigModel } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice::Cadence] - required :cadence, enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :bulk] - required :model_type, const: :bulk - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param bulk_config [Orb::Models::BulkConfigModel] - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice::Cadence] - # # @param currency [String] - # # @param item_id [String] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :bulk] - # # - # def initialize( - # bulk_config:, - # cadence:, - # currency:, - # item_id:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :bulk, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingThresholdTotalAmountPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :threshold_total_amount] - required :model_type, const: :threshold_total_amount - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute threshold_total_amount_config - # - # @return [Hash{Symbol=>Object}] - required :threshold_total_amount_config, Orb::HashOf[Orb::Unknown] - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice::Cadence] - # # @param currency [String] - # # @param item_id [String] - # # @param name [String] - # # @param threshold_total_amount_config [Hash{Symbol=>Object}] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :threshold_total_amount] - # # - # def initialize( - # cadence:, - # currency:, - # item_id:, - # name:, - # threshold_total_amount_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :threshold_total_amount, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingTieredPackagePrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice::Cadence] - required :cadence, enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :tiered_package] - required :model_type, const: :tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_package_config - # - # @return [Hash{Symbol=>Object}] - required :tiered_package_config, Orb::HashOf[Orb::Unknown] - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice::Cadence] - # # @param currency [String] - # # @param item_id [String] - # # @param name [String] - # # @param tiered_package_config [Hash{Symbol=>Object}] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :tiered_package] - # # - # def initialize( - # cadence:, - # currency:, - # item_id:, - # name:, - # tiered_package_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :tiered_package, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingGroupedTieredPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice::Cadence] - required :cadence, enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute grouped_tiered_config - # - # @return [Hash{Symbol=>Object}] - required :grouped_tiered_config, Orb::HashOf[Orb::Unknown] - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :grouped_tiered] - required :model_type, const: :grouped_tiered - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice::Cadence] - # # @param currency [String] - # # @param grouped_tiered_config [Hash{Symbol=>Object}] - # # @param item_id [String] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :grouped_tiered] - # # - # def initialize( - # cadence:, - # currency:, - # grouped_tiered_config:, - # item_id:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :grouped_tiered, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingMaxGroupTieredPackagePrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute max_group_tiered_package_config - # - # @return [Hash{Symbol=>Object}] - required :max_group_tiered_package_config, Orb::HashOf[Orb::Unknown] - - # @!attribute model_type - # - # @return [Symbol, :max_group_tiered_package] - required :model_type, const: :max_group_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice::Cadence] - # # @param currency [String] - # # @param item_id [String] - # # @param max_group_tiered_package_config [Hash{Symbol=>Object}] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :max_group_tiered_package] - # # - # def initialize( - # cadence:, - # currency:, - # item_id:, - # max_group_tiered_package_config:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :max_group_tiered_package, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingTieredWithMinimumPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :tiered_with_minimum] - required :model_type, const: :tiered_with_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_minimum_config - # - # @return [Hash{Symbol=>Object}] - required :tiered_with_minimum_config, Orb::HashOf[Orb::Unknown] - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice::Cadence] - # # @param currency [String] - # # @param item_id [String] - # # @param name [String] - # # @param tiered_with_minimum_config [Hash{Symbol=>Object}] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :tiered_with_minimum] - # # - # def initialize( - # cadence:, - # currency:, - # item_id:, - # name:, - # tiered_with_minimum_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :tiered_with_minimum, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingPackageWithAllocationPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :package_with_allocation] - required :model_type, const: :package_with_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute package_with_allocation_config - # - # @return [Hash{Symbol=>Object}] - required :package_with_allocation_config, Orb::HashOf[Orb::Unknown] - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice::Cadence] - # # @param currency [String] - # # @param item_id [String] - # # @param name [String] - # # @param package_with_allocation_config [Hash{Symbol=>Object}] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :package_with_allocation] - # # - # def initialize( - # cadence:, - # currency:, - # item_id:, - # name:, - # package_with_allocation_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :package_with_allocation, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingTieredPackageWithMinimumPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :tiered_package_with_minimum] - required :model_type, const: :tiered_package_with_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_package_with_minimum_config - # - # @return [Hash{Symbol=>Object}] - required :tiered_package_with_minimum_config, Orb::HashOf[Orb::Unknown] - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice::Cadence] - # # @param currency [String] - # # @param item_id [String] - # # @param name [String] - # # @param tiered_package_with_minimum_config [Hash{Symbol=>Object}] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :tiered_package_with_minimum] - # # - # def initialize( - # cadence:, - # currency:, - # item_id:, - # name:, - # tiered_package_with_minimum_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :tiered_package_with_minimum, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingUnitWithPercentPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :unit_with_percent] - required :model_type, const: :unit_with_percent - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_percent_config - # - # @return [Hash{Symbol=>Object}] - required :unit_with_percent_config, Orb::HashOf[Orb::Unknown] - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice::Cadence] - # # @param currency [String] - # # @param item_id [String] - # # @param name [String] - # # @param unit_with_percent_config [Hash{Symbol=>Object}] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :unit_with_percent] - # # - # def initialize( - # cadence:, - # currency:, - # item_id:, - # name:, - # unit_with_percent_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :unit_with_percent, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingTieredWithProrationPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :tiered_with_proration] - required :model_type, const: :tiered_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_proration_config - # - # @return [Hash{Symbol=>Object}] - required :tiered_with_proration_config, Orb::HashOf[Orb::Unknown] - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice::Cadence] - # # @param currency [String] - # # @param item_id [String] - # # @param name [String] - # # @param tiered_with_proration_config [Hash{Symbol=>Object}] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :tiered_with_proration] - # # - # def initialize( - # cadence:, - # currency:, - # item_id:, - # name:, - # tiered_with_proration_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :tiered_with_proration, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingUnitWithProrationPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :unit_with_proration] - required :model_type, const: :unit_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_proration_config - # - # @return [Hash{Symbol=>Object}] - required :unit_with_proration_config, Orb::HashOf[Orb::Unknown] - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice::Cadence] - # # @param currency [String] - # # @param item_id [String] - # # @param name [String] - # # @param unit_with_proration_config [Hash{Symbol=>Object}] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :unit_with_proration] - # # - # def initialize( - # cadence:, - # currency:, - # item_id:, - # name:, - # unit_with_proration_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :unit_with_proration, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingGroupedAllocationPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute grouped_allocation_config - # - # @return [Hash{Symbol=>Object}] - required :grouped_allocation_config, Orb::HashOf[Orb::Unknown] - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :grouped_allocation] - required :model_type, const: :grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice::Cadence] - # # @param currency [String] - # # @param grouped_allocation_config [Hash{Symbol=>Object}] - # # @param item_id [String] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :grouped_allocation] - # # - # def initialize( - # cadence:, - # currency:, - # grouped_allocation_config:, - # item_id:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :grouped_allocation, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingGroupedWithProratedMinimumPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute grouped_with_prorated_minimum_config - # - # @return [Hash{Symbol=>Object}] - required :grouped_with_prorated_minimum_config, Orb::HashOf[Orb::Unknown] - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :grouped_with_prorated_minimum] - required :model_type, const: :grouped_with_prorated_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice::Cadence] - # # @param currency [String] - # # @param grouped_with_prorated_minimum_config [Hash{Symbol=>Object}] - # # @param item_id [String] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :grouped_with_prorated_minimum] - # # - # def initialize( - # cadence:, - # currency:, - # grouped_with_prorated_minimum_config:, - # item_id:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :grouped_with_prorated_minimum, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingGroupedWithMeteredMinimumPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute grouped_with_metered_minimum_config - # - # @return [Hash{Symbol=>Object}] - required :grouped_with_metered_minimum_config, Orb::HashOf[Orb::Unknown] - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :grouped_with_metered_minimum] - required :model_type, const: :grouped_with_metered_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice::Cadence] - # # @param currency [String] - # # @param grouped_with_metered_minimum_config [Hash{Symbol=>Object}] - # # @param item_id [String] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :grouped_with_metered_minimum] - # # - # def initialize( - # cadence:, - # currency:, - # grouped_with_metered_minimum_config:, - # item_id:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :grouped_with_metered_minimum, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingMatrixWithDisplayNamePrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute matrix_with_display_name_config - # - # @return [Hash{Symbol=>Object}] - required :matrix_with_display_name_config, Orb::HashOf[Orb::Unknown] - - # @!attribute model_type - # - # @return [Symbol, :matrix_with_display_name] - required :model_type, const: :matrix_with_display_name - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice::Cadence] - # # @param currency [String] - # # @param item_id [String] - # # @param matrix_with_display_name_config [Hash{Symbol=>Object}] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :matrix_with_display_name] - # # - # def initialize( - # cadence:, - # currency:, - # item_id:, - # matrix_with_display_name_config:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :matrix_with_display_name, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingBulkWithProrationPrice < Orb::BaseModel - # @!attribute bulk_with_proration_config - # - # @return [Hash{Symbol=>Object}] - required :bulk_with_proration_config, Orb::HashOf[Orb::Unknown] - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :bulk_with_proration] - required :model_type, const: :bulk_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param bulk_with_proration_config [Hash{Symbol=>Object}] - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice::Cadence] - # # @param currency [String] - # # @param item_id [String] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :bulk_with_proration] - # # - # def initialize( - # bulk_with_proration_config:, - # cadence:, - # currency:, - # item_id:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :bulk_with_proration, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingGroupedTieredPackagePrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute grouped_tiered_package_config - # - # @return [Hash{Symbol=>Object}] - required :grouped_tiered_package_config, Orb::HashOf[Orb::Unknown] - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :grouped_tiered_package] - required :model_type, const: :grouped_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice::Cadence] - # # @param currency [String] - # # @param grouped_tiered_package_config [Hash{Symbol=>Object}] - # # @param item_id [String] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :grouped_tiered_package] - # # - # def initialize( - # cadence:, - # currency:, - # grouped_tiered_package_config:, - # item_id:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :grouped_tiered_package, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingScalableMatrixWithUnitPricingPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :scalable_matrix_with_unit_pricing] - required :model_type, const: :scalable_matrix_with_unit_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_unit_pricing_config - # - # @return [Hash{Symbol=>Object}] - required :scalable_matrix_with_unit_pricing_config, Orb::HashOf[Orb::Unknown] - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice::Cadence] - # # @param currency [String] - # # @param item_id [String] - # # @param name [String] - # # @param scalable_matrix_with_unit_pricing_config [Hash{Symbol=>Object}] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :scalable_matrix_with_unit_pricing] - # # - # def initialize( - # cadence:, - # currency:, - # item_id:, - # name:, - # scalable_matrix_with_unit_pricing_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :scalable_matrix_with_unit_pricing, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingScalableMatrixWithTieredPricingPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice::Cadence } - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :scalable_matrix_with_tiered_pricing] - required :model_type, const: :scalable_matrix_with_tiered_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_tiered_pricing_config - # - # @return [Hash{Symbol=>Object}] - required :scalable_matrix_with_tiered_pricing_config, Orb::HashOf[Orb::Unknown] - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice::Cadence] - # # @param currency [String] - # # @param item_id [String] - # # @param name [String] - # # @param scalable_matrix_with_tiered_pricing_config [Hash{Symbol=>Object}] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :scalable_matrix_with_tiered_pricing] - # # - # def initialize( - # cadence:, - # currency:, - # item_id:, - # name:, - # scalable_matrix_with_tiered_pricing_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :scalable_matrix_with_tiered_pricing, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewFloatingCumulativeGroupedBulkPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice::Cadence } - - # @!attribute cumulative_grouped_bulk_config - # - # @return [Hash{Symbol=>Object}] - required :cumulative_grouped_bulk_config, Orb::HashOf[Orb::Unknown] - - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. - # - # @return [String] - required :currency, String - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :cumulative_grouped_bulk] - required :model_type, const: :cumulative_grouped_bulk - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice::Cadence] - # # @param cumulative_grouped_bulk_config [Hash{Symbol=>Object}] - # # @param currency [String] - # # @param item_id [String] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param model_type [Symbol, :cumulative_grouped_bulk] - # # - # def initialize( - # cadence:, - # cumulative_grouped_bulk_config:, - # currency:, - # item_id:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # model_type: :cumulative_grouped_bulk, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end - end -end diff --git a/lib/orb/models/new_reporting_configuration_model.rb b/lib/orb/models/new_reporting_configuration_model.rb deleted file mode 100644 index 410b9526..00000000 --- a/lib/orb/models/new_reporting_configuration_model.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class NewReportingConfigurationModel < Orb::BaseModel - # @!attribute exempt - # - # @return [Boolean] - required :exempt, Orb::BooleanModel - - # @!parse - # # @param exempt [Boolean] - # # - # def initialize(exempt:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/new_subscription_price_model.rb b/lib/orb/models/new_subscription_price_model.rb deleted file mode 100644 index 0b2c0acc..00000000 --- a/lib/orb/models/new_subscription_price_model.rb +++ /dev/null @@ -1,4935 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - # @abstract - # - # @example - # ```ruby - # case new_subscription_price_model - # in { - # model_type: "unit", - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice::Cadence, - # item_id: String, - # name: String - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice ... - # in { - # model_type: "package", - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice::Cadence, - # item_id: String, - # name: String - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice ... - # in { - # model_type: "matrix", - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice::Cadence, - # item_id: String, - # matrix_config: Orb::Models::MatrixConfigModel - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice ... - # in { - # model_type: "tiered", - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice::Cadence, - # item_id: String, - # name: String - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice ... - # in { - # model_type: "tiered_bps", - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice::Cadence, - # item_id: String, - # name: String - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice ... - # in { - # model_type: "bps", - # bps_config: Orb::Models::BpsConfigModel, - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice::Cadence, - # item_id: String - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice ... - # in { - # model_type: "bulk_bps", - # bulk_bps_config: Orb::Models::BulkBpsConfigModel, - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice::Cadence, - # item_id: String - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice ... - # in { - # model_type: "bulk", - # bulk_config: Orb::Models::BulkConfigModel, - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice::Cadence, - # item_id: String - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice ... - # in { - # model_type: "threshold_total_amount", - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice::Cadence, - # item_id: String, - # name: String - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice ... - # in { - # model_type: "tiered_package", - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice::Cadence, - # item_id: String, - # name: String - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice ... - # in { - # model_type: "tiered_with_minimum", - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice::Cadence, - # item_id: String, - # name: String - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice ... - # in { - # model_type: "unit_with_percent", - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice::Cadence, - # item_id: String, - # name: String - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice ... - # in { - # model_type: "package_with_allocation", - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice::Cadence, - # item_id: String, - # name: String - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice ... - # in { - # model_type: "tiered_with_proration", - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice::Cadence, - # item_id: String, - # name: String - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice ... - # in { - # model_type: "unit_with_proration", - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice::Cadence, - # item_id: String, - # name: String - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice ... - # in { - # model_type: "grouped_allocation", - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice::Cadence, - # grouped_allocation_config: ^(Orb::HashOf[Orb::Unknown]), - # item_id: String - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice ... - # in { - # model_type: "grouped_with_prorated_minimum", - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice::Cadence, - # grouped_with_prorated_minimum_config: ^(Orb::HashOf[Orb::Unknown]), - # item_id: String - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice ... - # in { - # model_type: "bulk_with_proration", - # bulk_with_proration_config: ^(Orb::HashOf[Orb::Unknown]), - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice::Cadence, - # item_id: String - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice ... - # in { - # model_type: "scalable_matrix_with_unit_pricing", - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice::Cadence, - # item_id: String, - # name: String - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice ... - # in { - # model_type: "scalable_matrix_with_tiered_pricing", - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice::Cadence, - # item_id: String, - # name: String - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice ... - # in { - # model_type: "cumulative_grouped_bulk", - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice::Cadence, - # cumulative_grouped_bulk_config: ^(Orb::HashOf[Orb::Unknown]), - # item_id: String - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice ... - # in { - # model_type: "max_group_tiered_package", - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice::Cadence, - # item_id: String, - # max_group_tiered_package_config: ^(Orb::HashOf[Orb::Unknown]) - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice ... - # in { - # model_type: "grouped_with_metered_minimum", - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice::Cadence, - # grouped_with_metered_minimum_config: ^(Orb::HashOf[Orb::Unknown]), - # item_id: String - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice ... - # in { - # model_type: "matrix_with_display_name", - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice::Cadence, - # item_id: String, - # matrix_with_display_name_config: ^(Orb::HashOf[Orb::Unknown]) - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice ... - # in { - # model_type: "grouped_tiered_package", - # cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice::Cadence, - # grouped_tiered_package_config: ^(Orb::HashOf[Orb::Unknown]), - # item_id: String - # } - # # Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice ... - # end - # ``` - # - # @example - # ```ruby - # case new_subscription_price_model - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice - # # ... - # in Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice - # # ... - # end - # ``` - class NewSubscriptionPriceModel < Orb::Union - discriminator :model_type - - variant :unit, -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice } - - variant :package, -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice } - - variant :matrix, -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice } - - variant :tiered, -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice } - - variant :tiered_bps, -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice } - - variant :bps, -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice } - - variant :bulk_bps, -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice } - - variant :bulk, -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice } - - variant :threshold_total_amount, - -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice } - - variant :tiered_package, -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice } - - variant :tiered_with_minimum, - -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice } - - variant :unit_with_percent, - -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice } - - variant :package_with_allocation, - -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice } - - variant :tiered_with_proration, - -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice } - - variant :unit_with_proration, - -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice } - - variant :grouped_allocation, - -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice } - - variant :grouped_with_prorated_minimum, - -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice } - - variant :bulk_with_proration, - -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice } - - variant :scalable_matrix_with_unit_pricing, - -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice } - - variant :scalable_matrix_with_tiered_pricing, - -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice } - - variant :cumulative_grouped_bulk, - -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice } - - variant :max_group_tiered_package, - -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice } - - variant :grouped_with_metered_minimum, - -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice } - - variant :matrix_with_display_name, - -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice } - - variant :grouped_tiered_package, - -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice } - - class NewSubscriptionUnitPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice::Cadence] - required :cadence, enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :unit] - required :model_type, const: :unit - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_config - # - # @return [Orb::Models::UnitConfigModel] - required :unit_config, -> { Orb::Models::UnitConfigModel } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice::Cadence] - # # @param item_id [String] - # # @param name [String] - # # @param unit_config [Orb::Models::UnitConfigModel] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :unit] - # # - # def initialize( - # cadence:, - # item_id:, - # name:, - # unit_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :unit, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionPackagePrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :package] - required :model_type, const: :package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute package_config - # - # @return [Orb::Models::PackageConfigModel] - required :package_config, -> { Orb::Models::PackageConfigModel } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice::Cadence] - # # @param item_id [String] - # # @param name [String] - # # @param package_config [Orb::Models::PackageConfigModel] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :package] - # # - # def initialize( - # cadence:, - # item_id:, - # name:, - # package_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :package, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionMatrixPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute matrix_config - # - # @return [Orb::Models::MatrixConfigModel] - required :matrix_config, -> { Orb::Models::MatrixConfigModel } - - # @!attribute model_type - # - # @return [Symbol, :matrix] - required :model_type, const: :matrix - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice::Cadence] - # # @param item_id [String] - # # @param matrix_config [Orb::Models::MatrixConfigModel] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :matrix] - # # - # def initialize( - # cadence:, - # item_id:, - # matrix_config:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :matrix, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionTieredPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :tiered] - required :model_type, const: :tiered - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_config - # - # @return [Orb::Models::TieredConfigModel] - required :tiered_config, -> { Orb::Models::TieredConfigModel } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice::Cadence] - # # @param item_id [String] - # # @param name [String] - # # @param tiered_config [Orb::Models::TieredConfigModel] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :tiered] - # # - # def initialize( - # cadence:, - # item_id:, - # name:, - # tiered_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :tiered, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionTieredBpsPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :tiered_bps] - required :model_type, const: :tiered_bps - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_bps_config - # - # @return [Orb::Models::TieredBpsConfigModel] - required :tiered_bps_config, -> { Orb::Models::TieredBpsConfigModel } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice::Cadence] - # # @param item_id [String] - # # @param name [String] - # # @param tiered_bps_config [Orb::Models::TieredBpsConfigModel] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :tiered_bps] - # # - # def initialize( - # cadence:, - # item_id:, - # name:, - # tiered_bps_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :tiered_bps, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionBpsPrice < Orb::BaseModel - # @!attribute bps_config - # - # @return [Orb::Models::BpsConfigModel] - required :bps_config, -> { Orb::Models::BpsConfigModel } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice::Cadence] - required :cadence, enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :bps] - required :model_type, const: :bps - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param bps_config [Orb::Models::BpsConfigModel] - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice::Cadence] - # # @param item_id [String] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :bps] - # # - # def initialize( - # bps_config:, - # cadence:, - # item_id:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :bps, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionBulkBpsPrice < Orb::BaseModel - # @!attribute bulk_bps_config - # - # @return [Orb::Models::BulkBpsConfigModel] - required :bulk_bps_config, -> { Orb::Models::BulkBpsConfigModel } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :bulk_bps] - required :model_type, const: :bulk_bps - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param bulk_bps_config [Orb::Models::BulkBpsConfigModel] - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice::Cadence] - # # @param item_id [String] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :bulk_bps] - # # - # def initialize( - # bulk_bps_config:, - # cadence:, - # item_id:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :bulk_bps, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionBulkPrice < Orb::BaseModel - # @!attribute bulk_config - # - # @return [Orb::Models::BulkConfigModel] - required :bulk_config, -> { Orb::Models::BulkConfigModel } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice::Cadence] - required :cadence, enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :bulk] - required :model_type, const: :bulk - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param bulk_config [Orb::Models::BulkConfigModel] - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice::Cadence] - # # @param item_id [String] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :bulk] - # # - # def initialize( - # bulk_config:, - # cadence:, - # item_id:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :bulk, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionThresholdTotalAmountPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :threshold_total_amount] - required :model_type, const: :threshold_total_amount - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute threshold_total_amount_config - # - # @return [Hash{Symbol=>Object}] - required :threshold_total_amount_config, Orb::HashOf[Orb::Unknown] - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice::Cadence] - # # @param item_id [String] - # # @param name [String] - # # @param threshold_total_amount_config [Hash{Symbol=>Object}] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :threshold_total_amount] - # # - # def initialize( - # cadence:, - # item_id:, - # name:, - # threshold_total_amount_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :threshold_total_amount, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionTieredPackagePrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :tiered_package] - required :model_type, const: :tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_package_config - # - # @return [Hash{Symbol=>Object}] - required :tiered_package_config, Orb::HashOf[Orb::Unknown] - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice::Cadence] - # # @param item_id [String] - # # @param name [String] - # # @param tiered_package_config [Hash{Symbol=>Object}] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :tiered_package] - # # - # def initialize( - # cadence:, - # item_id:, - # name:, - # tiered_package_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :tiered_package, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionTieredWithMinimumPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :tiered_with_minimum] - required :model_type, const: :tiered_with_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_minimum_config - # - # @return [Hash{Symbol=>Object}] - required :tiered_with_minimum_config, Orb::HashOf[Orb::Unknown] - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice::Cadence] - # # @param item_id [String] - # # @param name [String] - # # @param tiered_with_minimum_config [Hash{Symbol=>Object}] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :tiered_with_minimum] - # # - # def initialize( - # cadence:, - # item_id:, - # name:, - # tiered_with_minimum_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :tiered_with_minimum, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionUnitWithPercentPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :unit_with_percent] - required :model_type, const: :unit_with_percent - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_percent_config - # - # @return [Hash{Symbol=>Object}] - required :unit_with_percent_config, Orb::HashOf[Orb::Unknown] - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice::Cadence] - # # @param item_id [String] - # # @param name [String] - # # @param unit_with_percent_config [Hash{Symbol=>Object}] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :unit_with_percent] - # # - # def initialize( - # cadence:, - # item_id:, - # name:, - # unit_with_percent_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :unit_with_percent, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionPackageWithAllocationPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :package_with_allocation] - required :model_type, const: :package_with_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute package_with_allocation_config - # - # @return [Hash{Symbol=>Object}] - required :package_with_allocation_config, Orb::HashOf[Orb::Unknown] - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice::Cadence] - # # @param item_id [String] - # # @param name [String] - # # @param package_with_allocation_config [Hash{Symbol=>Object}] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :package_with_allocation] - # # - # def initialize( - # cadence:, - # item_id:, - # name:, - # package_with_allocation_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :package_with_allocation, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionTierWithProrationPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :tiered_with_proration] - required :model_type, const: :tiered_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_proration_config - # - # @return [Hash{Symbol=>Object}] - required :tiered_with_proration_config, Orb::HashOf[Orb::Unknown] - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice::Cadence] - # # @param item_id [String] - # # @param name [String] - # # @param tiered_with_proration_config [Hash{Symbol=>Object}] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :tiered_with_proration] - # # - # def initialize( - # cadence:, - # item_id:, - # name:, - # tiered_with_proration_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :tiered_with_proration, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionUnitWithProrationPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :unit_with_proration] - required :model_type, const: :unit_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_proration_config - # - # @return [Hash{Symbol=>Object}] - required :unit_with_proration_config, Orb::HashOf[Orb::Unknown] - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice::Cadence] - # # @param item_id [String] - # # @param name [String] - # # @param unit_with_proration_config [Hash{Symbol=>Object}] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :unit_with_proration] - # # - # def initialize( - # cadence:, - # item_id:, - # name:, - # unit_with_proration_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :unit_with_proration, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionGroupedAllocationPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice::Cadence } - - # @!attribute grouped_allocation_config - # - # @return [Hash{Symbol=>Object}] - required :grouped_allocation_config, Orb::HashOf[Orb::Unknown] - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :grouped_allocation] - required :model_type, const: :grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice::Cadence] - # # @param grouped_allocation_config [Hash{Symbol=>Object}] - # # @param item_id [String] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :grouped_allocation] - # # - # def initialize( - # cadence:, - # grouped_allocation_config:, - # item_id:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :grouped_allocation, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionGroupedWithProratedMinimumPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice::Cadence } - - # @!attribute grouped_with_prorated_minimum_config - # - # @return [Hash{Symbol=>Object}] - required :grouped_with_prorated_minimum_config, Orb::HashOf[Orb::Unknown] - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :grouped_with_prorated_minimum] - required :model_type, const: :grouped_with_prorated_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice::Cadence] - # # @param grouped_with_prorated_minimum_config [Hash{Symbol=>Object}] - # # @param item_id [String] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :grouped_with_prorated_minimum] - # # - # def initialize( - # cadence:, - # grouped_with_prorated_minimum_config:, - # item_id:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :grouped_with_prorated_minimum, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionBulkWithProrationPrice < Orb::BaseModel - # @!attribute bulk_with_proration_config - # - # @return [Hash{Symbol=>Object}] - required :bulk_with_proration_config, Orb::HashOf[Orb::Unknown] - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :bulk_with_proration] - required :model_type, const: :bulk_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param bulk_with_proration_config [Hash{Symbol=>Object}] - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice::Cadence] - # # @param item_id [String] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :bulk_with_proration] - # # - # def initialize( - # bulk_with_proration_config:, - # cadence:, - # item_id:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :bulk_with_proration, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionScalableMatrixWithUnitPricingPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :scalable_matrix_with_unit_pricing] - required :model_type, const: :scalable_matrix_with_unit_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_unit_pricing_config - # - # @return [Hash{Symbol=>Object}] - required :scalable_matrix_with_unit_pricing_config, Orb::HashOf[Orb::Unknown] - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice::Cadence] - # # @param item_id [String] - # # @param name [String] - # # @param scalable_matrix_with_unit_pricing_config [Hash{Symbol=>Object}] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :scalable_matrix_with_unit_pricing] - # # - # def initialize( - # cadence:, - # item_id:, - # name:, - # scalable_matrix_with_unit_pricing_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :scalable_matrix_with_unit_pricing, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionScalableMatrixWithTieredPricingPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :scalable_matrix_with_tiered_pricing] - required :model_type, const: :scalable_matrix_with_tiered_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_tiered_pricing_config - # - # @return [Hash{Symbol=>Object}] - required :scalable_matrix_with_tiered_pricing_config, Orb::HashOf[Orb::Unknown] - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice::Cadence] - # # @param item_id [String] - # # @param name [String] - # # @param scalable_matrix_with_tiered_pricing_config [Hash{Symbol=>Object}] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :scalable_matrix_with_tiered_pricing] - # # - # def initialize( - # cadence:, - # item_id:, - # name:, - # scalable_matrix_with_tiered_pricing_config:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :scalable_matrix_with_tiered_pricing, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionCumulativeGroupedBulkPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice::Cadence } - - # @!attribute cumulative_grouped_bulk_config - # - # @return [Hash{Symbol=>Object}] - required :cumulative_grouped_bulk_config, Orb::HashOf[Orb::Unknown] - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :cumulative_grouped_bulk] - required :model_type, const: :cumulative_grouped_bulk - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice::Cadence] - # # @param cumulative_grouped_bulk_config [Hash{Symbol=>Object}] - # # @param item_id [String] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :cumulative_grouped_bulk] - # # - # def initialize( - # cadence:, - # cumulative_grouped_bulk_config:, - # item_id:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :cumulative_grouped_bulk, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionMaxGroupTieredPackagePrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute max_group_tiered_package_config - # - # @return [Hash{Symbol=>Object}] - required :max_group_tiered_package_config, Orb::HashOf[Orb::Unknown] - - # @!attribute model_type - # - # @return [Symbol, :max_group_tiered_package] - required :model_type, const: :max_group_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice::Cadence] - # # @param item_id [String] - # # @param max_group_tiered_package_config [Hash{Symbol=>Object}] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :max_group_tiered_package] - # # - # def initialize( - # cadence:, - # item_id:, - # max_group_tiered_package_config:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :max_group_tiered_package, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionGroupedWithMeteredMinimumPrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice::Cadence } - - # @!attribute grouped_with_metered_minimum_config - # - # @return [Hash{Symbol=>Object}] - required :grouped_with_metered_minimum_config, Orb::HashOf[Orb::Unknown] - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :grouped_with_metered_minimum] - required :model_type, const: :grouped_with_metered_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice::Cadence] - # # @param grouped_with_metered_minimum_config [Hash{Symbol=>Object}] - # # @param item_id [String] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :grouped_with_metered_minimum] - # # - # def initialize( - # cadence:, - # grouped_with_metered_minimum_config:, - # item_id:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :grouped_with_metered_minimum, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionMatrixWithDisplayNamePrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute matrix_with_display_name_config - # - # @return [Hash{Symbol=>Object}] - required :matrix_with_display_name_config, Orb::HashOf[Orb::Unknown] - - # @!attribute model_type - # - # @return [Symbol, :matrix_with_display_name] - required :model_type, const: :matrix_with_display_name - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice::Cadence] - # # @param item_id [String] - # # @param matrix_with_display_name_config [Hash{Symbol=>Object}] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :matrix_with_display_name] - # # - # def initialize( - # cadence:, - # item_id:, - # matrix_with_display_name_config:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :matrix_with_display_name, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class NewSubscriptionGroupedTieredPackagePrice < Orb::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice::Cadence] - required :cadence, - enum: -> { Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice::Cadence } - - # @!attribute grouped_tiered_package_config - # - # @return [Hash{Symbol=>Object}] - required :grouped_tiered_package_config, Orb::HashOf[Orb::Unknown] - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # - # @return [Symbol, :grouped_tiered_package] - required :model_type, const: :grouped_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!parse - # # @param cadence [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice::Cadence] - # # @param grouped_tiered_package_config [Hash{Symbol=>Object}] - # # @param item_id [String] - # # @param name [String] - # # @param billable_metric_id [String, nil] - # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param conversion_rate [Float, nil] - # # @param currency [String, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] - # # @param metadata [Hash{Symbol=>String, nil}, nil] - # # @param reference_id [String, nil] - # # @param model_type [Symbol, :grouped_tiered_package] - # # - # def initialize( - # cadence:, - # grouped_tiered_package_config:, - # item_id:, - # name:, - # billable_metric_id: nil, - # billed_in_advance: nil, - # billing_cycle_configuration: nil, - # conversion_rate: nil, - # currency: nil, - # external_price_id: nil, - # fixed_price_quantity: nil, - # invoice_grouping_key: nil, - # invoicing_cycle_configuration: nil, - # metadata: nil, - # reference_id: nil, - # model_type: :grouped_tiered_package, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The cadence to bill for this price on. - # - # @example - # ```ruby - # case cadence - # in :annual - # # ... - # in :semi_annual - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :one_time - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end - end -end diff --git a/lib/orb/models/new_tax_configuration_model.rb b/lib/orb/models/new_tax_configuration_model.rb deleted file mode 100644 index b1ff6d63..00000000 --- a/lib/orb/models/new_tax_configuration_model.rb +++ /dev/null @@ -1,80 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - # @abstract - # - # @example - # ```ruby - # case new_tax_configuration_model - # in {tax_provider: "avalara", tax_exempt: Orb::BooleanModel, tax_exemption_code: String} - # # Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration ... - # in {tax_provider: "taxjar", tax_exempt: Orb::BooleanModel} - # # Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration ... - # end - # ``` - # - # @example - # ```ruby - # case new_tax_configuration_model - # in Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration - # # ... - # in Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration - # # ... - # end - # ``` - class NewTaxConfigurationModel < Orb::Union - discriminator :tax_provider - - variant :avalara, -> { Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration } - - variant :taxjar, -> { Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration } - - class NewAvalaraTaxConfiguration < Orb::BaseModel - # @!attribute tax_exempt - # - # @return [Boolean] - required :tax_exempt, Orb::BooleanModel - - # @!attribute tax_provider - # - # @return [Symbol, :avalara] - required :tax_provider, const: :avalara - - # @!attribute tax_exemption_code - # - # @return [String, nil] - optional :tax_exemption_code, String, nil?: true - - # @!parse - # # @param tax_exempt [Boolean] - # # @param tax_exemption_code [String, nil] - # # @param tax_provider [Symbol, :avalara] - # # - # def initialize(tax_exempt:, tax_exemption_code: nil, tax_provider: :avalara, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - - class NewTaxJarConfiguration < Orb::BaseModel - # @!attribute tax_exempt - # - # @return [Boolean] - required :tax_exempt, Orb::BooleanModel - - # @!attribute tax_provider - # - # @return [Symbol, :taxjar] - required :tax_provider, const: :taxjar - - # @!parse - # # @param tax_exempt [Boolean] - # # @param tax_provider [Symbol, :taxjar] - # # - # def initialize(tax_exempt:, tax_provider: :taxjar, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end - end -end diff --git a/lib/orb/models/package_config_model.rb b/lib/orb/models/package_config_model.rb deleted file mode 100644 index 5f299a20..00000000 --- a/lib/orb/models/package_config_model.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class PackageConfigModel < Orb::BaseModel - # @!attribute package_amount - # A currency amount to rate usage by - # - # @return [String] - required :package_amount, String - - # @!attribute package_size - # An integer amount to represent package size. For example, 1000 here would divide - # usage by 1000 before multiplying by package_amount in rating - # - # @return [Integer] - required :package_size, Integer - - # @!parse - # # @param package_amount [String] - # # @param package_size [Integer] - # # - # def initialize(package_amount:, package_size:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/pagination_metadata_model.rb b/lib/orb/models/pagination_metadata_model.rb deleted file mode 100644 index 069b7833..00000000 --- a/lib/orb/models/pagination_metadata_model.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class PaginationMetadataModel < Orb::BaseModel - # @!attribute has_more - # - # @return [Boolean] - required :has_more, Orb::BooleanModel - - # @!attribute next_cursor - # - # @return [String, nil] - required :next_cursor, String, nil?: true - - # @!parse - # # @param has_more [Boolean] - # # @param next_cursor [String, nil] - # # - # def initialize(has_more:, next_cursor:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/payment_attempt_model.rb b/lib/orb/models/payment_attempt_model.rb deleted file mode 100644 index 5d5c707e..00000000 --- a/lib/orb/models/payment_attempt_model.rb +++ /dev/null @@ -1,77 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class PaymentAttemptModel < Orb::BaseModel - # @!attribute id - # The ID of the payment attempt. - # - # @return [String] - required :id, String - - # @!attribute amount - # The amount of the payment attempt. - # - # @return [String] - required :amount, String - - # @!attribute created_at - # The time at which the payment attempt was created. - # - # @return [Time] - required :created_at, Time - - # @!attribute payment_provider - # The payment provider that attempted to collect the payment. - # - # @return [Symbol, Orb::Models::PaymentAttemptModel::PaymentProvider, nil] - required :payment_provider, enum: -> { Orb::Models::PaymentAttemptModel::PaymentProvider }, nil?: true - - # @!attribute payment_provider_id - # The ID of the payment attempt in the payment provider. - # - # @return [String, nil] - required :payment_provider_id, String, nil?: true - - # @!attribute succeeded - # Whether the payment attempt succeeded. - # - # @return [Boolean] - required :succeeded, Orb::BooleanModel - - # @!parse - # # @param id [String] - # # @param amount [String] - # # @param created_at [Time] - # # @param payment_provider [Symbol, Orb::Models::PaymentAttemptModel::PaymentProvider, nil] - # # @param payment_provider_id [String, nil] - # # @param succeeded [Boolean] - # # - # def initialize(id:, amount:, created_at:, payment_provider:, payment_provider_id:, succeeded:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # The payment provider that attempted to collect the payment. - # - # @example - # ```ruby - # case payment_provider - # in :stripe - # # ... - # end - # ``` - class PaymentProvider < Orb::Enum - STRIPE = :stripe - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end -end diff --git a/lib/orb/models/percentage_discount_interval_model.rb b/lib/orb/models/percentage_discount_interval_model.rb deleted file mode 100644 index 64bd863f..00000000 --- a/lib/orb/models/percentage_discount_interval_model.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class PercentageDiscountIntervalModel < Orb::BaseModel - # @!attribute applies_to_price_ids - # The price ids that this discount interval applies to. - # - # @return [Array] - required :applies_to_price_ids, Orb::ArrayOf[String] - - # @!attribute applies_to_price_interval_ids - # The price interval ids that this discount interval applies to. - # - # @return [Array] - required :applies_to_price_interval_ids, Orb::ArrayOf[String] - - # @!attribute discount_type - # - # @return [Symbol, Orb::Models::PercentageDiscountIntervalModel::DiscountType] - required :discount_type, enum: -> { Orb::Models::PercentageDiscountIntervalModel::DiscountType } - - # @!attribute end_date - # The end date of the discount interval. - # - # @return [Time, nil] - required :end_date, Time, nil?: true - - # @!attribute percentage_discount - # Only available if discount_type is `percentage`.This is a number between 0 - # and 1. - # - # @return [Float] - required :percentage_discount, Float - - # @!attribute start_date - # The start date of the discount interval. - # - # @return [Time] - required :start_date, Time - - # @!parse - # # @param applies_to_price_ids [Array] - # # @param applies_to_price_interval_ids [Array] - # # @param discount_type [Symbol, Orb::Models::PercentageDiscountIntervalModel::DiscountType] - # # @param end_date [Time, nil] - # # @param percentage_discount [Float] - # # @param start_date [Time] - # # - # def initialize( - # applies_to_price_ids:, - # applies_to_price_interval_ids:, - # discount_type:, - # end_date:, - # percentage_discount:, - # start_date:, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case discount_type - # in :percentage - # # ... - # end - # ``` - class DiscountType < Orb::Enum - PERCENTAGE = :percentage - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end -end diff --git a/lib/orb/models/percentage_discount_model.rb b/lib/orb/models/percentage_discount_model.rb deleted file mode 100644 index 7d07ba3d..00000000 --- a/lib/orb/models/percentage_discount_model.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class PercentageDiscountModel < Orb::BaseModel - # @!attribute applies_to_price_ids - # List of price_ids that this discount applies to. For plan/plan phase discounts, - # this can be a subset of prices. - # - # @return [Array] - required :applies_to_price_ids, Orb::ArrayOf[String] - - # @!attribute discount_type - # - # @return [Symbol, Orb::Models::PercentageDiscountModel::DiscountType] - required :discount_type, enum: -> { Orb::Models::PercentageDiscountModel::DiscountType } - - # @!attribute percentage_discount - # Only available if discount_type is `percentage`. This is a number between 0 - # and 1. - # - # @return [Float] - required :percentage_discount, Float - - # @!attribute reason - # - # @return [String, nil] - optional :reason, String, nil?: true - - # @!parse - # # @param applies_to_price_ids [Array] - # # @param discount_type [Symbol, Orb::Models::PercentageDiscountModel::DiscountType] - # # @param percentage_discount [Float] - # # @param reason [String, nil] - # # - # def initialize(applies_to_price_ids:, discount_type:, percentage_discount:, reason: nil, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case discount_type - # in :percentage - # # ... - # end - # ``` - class DiscountType < Orb::Enum - PERCENTAGE = :percentage - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end -end diff --git a/lib/orb/models/plan.rb b/lib/orb/models/plan.rb index 25807376..6e8e446c 100644 --- a/lib/orb/models/plan.rb +++ b/lib/orb/models/plan.rb @@ -12,13 +12,13 @@ class Plan < Orb::BaseModel # Adjustments for this plan. If the plan has phases, this includes adjustments # across all phases of the plan. # - # @return [Array] - required :adjustments, -> { Orb::ArrayOf[union: Orb::Models::AdjustmentModel] } + # @return [Array] + required :adjustments, -> { Orb::ArrayOf[union: Orb::Models::Plan::Adjustment] } # @!attribute base_plan # - # @return [Orb::Models::PlanMinifiedModel, nil] - required :base_plan, -> { Orb::Models::PlanMinifiedModel }, nil?: true + # @return [Orb::Models::Plan::BasePlan, nil] + required :base_plan, -> { Orb::Models::Plan::BasePlan }, nil?: true # @!attribute base_plan_id # The parent plan id if the given plan was created by overriding one or more of @@ -73,8 +73,8 @@ class Plan < Orb::BaseModel # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Plan::Maximum, nil] + required :maximum, -> { Orb::Models::Plan::Maximum }, nil?: true # @!attribute maximum_amount # @@ -92,8 +92,8 @@ class Plan < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Plan::Minimum, nil] + required :minimum, -> { Orb::Models::Plan::Minimum }, nil?: true # @!attribute minimum_amount # @@ -124,8 +124,8 @@ class Plan < Orb::BaseModel # Prices for this plan. If the plan has phases, this includes prices across all # phases of the plan. # - # @return [Array] - required :prices, -> { Orb::ArrayOf[union: Orb::Models::PriceModel] } + # @return [Array] + required :prices, -> { Orb::ArrayOf[union: Orb::Models::Price] } # @!attribute product # @@ -154,8 +154,8 @@ class Plan < Orb::BaseModel # # [Price resource](/reference/price). # # # # @param id [String] - # # @param adjustments [Array] - # # @param base_plan [Orb::Models::PlanMinifiedModel, nil] + # # @param adjustments [Array] + # # @param base_plan [Orb::Models::Plan::BasePlan, nil] # # @param base_plan_id [String, nil] # # @param created_at [Time] # # @param currency [String] @@ -164,15 +164,15 @@ class Plan < Orb::BaseModel # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_plan_id [String, nil] # # @param invoicing_currency [String] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param maximum [Orb::Models::Plan::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Plan::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param net_terms [Integer, nil] # # @param plan_phases [Array, nil] - # # @param prices [Array] + # # @param prices [Array] # # @param product [Orb::Models::Plan::Product] # # @param status [Symbol, Orb::Models::Plan::Status] # # @param trial_config [Orb::Models::Plan::TrialConfig] @@ -210,6 +210,501 @@ class Plan < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + # @abstract + # + # @example + # ```ruby + # case adjustment + # in { + # adjustment_type: "usage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::Plan::Adjustment::PlanPhaseUsageDiscountAdjustment ... + # in { + # adjustment_type: "amount_discount", + # id: String, + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::Plan::Adjustment::PlanPhaseAmountDiscountAdjustment ... + # in { + # adjustment_type: "percentage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::Plan::Adjustment::PlanPhasePercentageDiscountAdjustment ... + # in { + # adjustment_type: "minimum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::Plan::Adjustment::PlanPhaseMinimumAdjustment ... + # in { + # adjustment_type: "maximum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::Plan::Adjustment::PlanPhaseMaximumAdjustment ... + # end + # ``` + # + # @example + # ```ruby + # case adjustment + # in Orb::Models::Plan::Adjustment::PlanPhaseUsageDiscountAdjustment + # # ... + # in Orb::Models::Plan::Adjustment::PlanPhaseAmountDiscountAdjustment + # # ... + # in Orb::Models::Plan::Adjustment::PlanPhasePercentageDiscountAdjustment + # # ... + # in Orb::Models::Plan::Adjustment::PlanPhaseMinimumAdjustment + # # ... + # in Orb::Models::Plan::Adjustment::PlanPhaseMaximumAdjustment + # # ... + # end + # ``` + class Adjustment < Orb::Union + discriminator :adjustment_type + + variant :usage_discount, -> { Orb::Models::Plan::Adjustment::PlanPhaseUsageDiscountAdjustment } + + variant :amount_discount, -> { Orb::Models::Plan::Adjustment::PlanPhaseAmountDiscountAdjustment } + + variant :percentage_discount, -> { Orb::Models::Plan::Adjustment::PlanPhasePercentageDiscountAdjustment } + + variant :minimum, -> { Orb::Models::Plan::Adjustment::PlanPhaseMinimumAdjustment } + + variant :maximum, -> { Orb::Models::Plan::Adjustment::PlanPhaseMaximumAdjustment } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :usage_discount] + required :adjustment_type, const: :usage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!attribute usage_discount + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param usage_discount [Float] + # # @param adjustment_type [Symbol, :usage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # usage_discount:, + # adjustment_type: :usage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :amount_discount] + required :adjustment_type, const: :amount_discount + + # @!attribute amount_discount + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :amount_discount] + # # + # def initialize( + # id:, + # amount_discount:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # adjustment_type: :amount_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :percentage_discount] + required :adjustment_type, const: :percentage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute percentage_discount + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param percentage_discount [Float] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :percentage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # percentage_discount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :percentage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :minimum] + required :adjustment_type, const: :minimum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute item_id + # The item ID that revenue from this minimum will be attributed to. + # + # @return [String] + required :item_id, String + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param item_id [String] + # # @param minimum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :minimum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # item_id:, + # minimum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :maximum] + required :adjustment_type, const: :maximum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param maximum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :maximum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # maximum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :maximum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class BasePlan < Orb::BaseModel + # @!attribute id + # + # @return [String, nil] + required :id, String, nil?: true + + # @!attribute external_plan_id + # An optional user-defined ID for this plan resource, used throughout the system + # as an alias for this Plan. Use this field to identify a plan by an existing + # identifier in your system. + # + # @return [String, nil] + required :external_plan_id, String, nil?: true + + # @!attribute name + # + # @return [String, nil] + required :name, String, nil?: true + + # @!parse + # # @param id [String, nil] + # # @param external_plan_id [String, nil] + # # @param name [String, nil] + # # + # def initialize(id:, external_plan_id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + class PlanPhase < Orb::BaseModel # @!attribute id # @@ -240,8 +735,8 @@ class PlanPhase < Orb::BaseModel # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Plan::PlanPhase::Maximum, nil] + required :maximum, -> { Orb::Models::Plan::PlanPhase::Maximum }, nil?: true # @!attribute maximum_amount # @@ -250,8 +745,8 @@ class PlanPhase < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Plan::PlanPhase::Minimum, nil] + required :minimum, -> { Orb::Models::Plan::PlanPhase::Minimum }, nil?: true # @!attribute minimum_amount # @@ -275,9 +770,9 @@ class PlanPhase < Orb::BaseModel # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param duration [Integer, nil] # # @param duration_unit [Symbol, Orb::Models::Plan::PlanPhase::DurationUnit, nil] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param maximum [Orb::Models::Plan::PlanPhase::Maximum, nil] # # @param maximum_amount [String, nil] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Plan::PlanPhase::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param order [Integer] @@ -332,6 +827,52 @@ class DurationUnit < Orb::Enum # # # def self.values; end end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class Product < Orb::BaseModel diff --git a/lib/orb/models/plan_create_params.rb b/lib/orb/models/plan_create_params.rb index 4eff53ca..acad8938 100644 --- a/lib/orb/models/plan_create_params.rb +++ b/lib/orb/models/plan_create_params.rb @@ -115,7 +115,7 @@ class PlanCreateParams < Orb::BaseModel # model_type: "matrix", # cadence: Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::Cadence, # item_id: String, - # matrix_config: Orb::Models::MatrixConfigModel + # matrix_config: Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig # } # # Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice ... # in { @@ -134,21 +134,21 @@ class PlanCreateParams < Orb::BaseModel # # Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice ... # in { # model_type: "bps", - # bps_config: Orb::Models::BpsConfigModel, + # bps_config: Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BpsConfig, # cadence: Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::Cadence, # item_id: String # } # # Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice ... # in { # model_type: "bulk_bps", - # bulk_bps_config: Orb::Models::BulkBpsConfigModel, + # bulk_bps_config: Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig, # cadence: Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::Cadence, # item_id: String # } # # Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice ... # in { # model_type: "bulk", - # bulk_config: Orb::Models::BulkConfigModel, + # bulk_config: Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig, # cadence: Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::Cadence, # item_id: String # } @@ -419,8 +419,8 @@ class NewPlanUnitPrice < Orb::BaseModel # @!attribute unit_config # - # @return [Orb::Models::UnitConfigModel] - required :unit_config, -> { Orb::Models::UnitConfigModel } + # @return [Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::UnitConfig] + required :unit_config, -> { Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::UnitConfig } # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is @@ -440,8 +440,10 @@ class NewPlanUnitPrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -479,8 +481,10 @@ class NewPlanUnitPrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -494,16 +498,16 @@ class NewPlanUnitPrice < Orb::BaseModel # # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::Cadence] # # @param item_id [String] # # @param name [String] - # # @param unit_config [Orb::Models::UnitConfigModel] + # # @param unit_config [Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::UnitConfig] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :unit] # # @@ -566,6 +570,123 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class UnitConfig < Orb::BaseModel + # @!attribute unit_amount + # Rate per unit of usage + # + # @return [String] + required :unit_amount, String + + # @!parse + # # @param unit_amount [String] + # # + # def initialize(unit_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanPackagePrice < Orb::BaseModel @@ -594,8 +715,8 @@ class NewPlanPackagePrice < Orb::BaseModel # @!attribute package_config # - # @return [Orb::Models::PackageConfigModel] - required :package_config, -> { Orb::Models::PackageConfigModel } + # @return [Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::PackageConfig] + required :package_config, -> { Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::PackageConfig } # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is @@ -615,8 +736,10 @@ class NewPlanPackagePrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -654,8 +777,10 @@ class NewPlanPackagePrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -669,16 +794,16 @@ class NewPlanPackagePrice < Orb::BaseModel # # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::Cadence] # # @param item_id [String] # # @param name [String] - # # @param package_config [Orb::Models::PackageConfigModel] + # # @param package_config [Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::PackageConfig] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :package] # # @@ -741,6 +866,131 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class PackageConfig < Orb::BaseModel + # @!attribute package_amount + # A currency amount to rate usage by + # + # @return [String] + required :package_amount, String + + # @!attribute package_size + # An integer amount to represent package size. For example, 1000 here would divide + # usage by 1000 before multiplying by package_amount in rating + # + # @return [Integer] + required :package_size, Integer + + # @!parse + # # @param package_amount [String] + # # @param package_size [Integer] + # # + # def initialize(package_amount:, package_size:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanMatrixPrice < Orb::BaseModel @@ -758,8 +1008,8 @@ class NewPlanMatrixPrice < Orb::BaseModel # @!attribute matrix_config # - # @return [Orb::Models::MatrixConfigModel] - required :matrix_config, -> { Orb::Models::MatrixConfigModel } + # @return [Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig] + required :matrix_config, -> { Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig } # @!attribute model_type # @@ -790,8 +1040,10 @@ class NewPlanMatrixPrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -829,8 +1081,10 @@ class NewPlanMatrixPrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -843,17 +1097,17 @@ class NewPlanMatrixPrice < Orb::BaseModel # @!parse # # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::Cadence] # # @param item_id [String] - # # @param matrix_config [Orb::Models::MatrixConfigModel] + # # @param matrix_config [Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig] # # @param name [String] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :matrix] # # @@ -916,6 +1170,162 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class MatrixConfig < Orb::BaseModel + # @!attribute default_unit_amount + # Default per unit rate for any usage not bucketed into a specified matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::ArrayOf[String, nil?: true] + + # @!attribute matrix_values + # Matrix values for specified matrix grouping keys + # + # @return [Array] + required :matrix_values, + -> { Orb::ArrayOf[Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig::MatrixValue] } + + # @!parse + # # @param default_unit_amount [String] + # # @param dimensions [Array] + # # @param matrix_values [Array] + # # + # def initialize(default_unit_amount:, dimensions:, matrix_values:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class MatrixValue < Orb::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this Matrix value by. For example, + # ["region", "tier"] could be used to filter cloud usage by a cloud region and an + # instance tier. + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Unit price for the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!parse + # # @param dimension_values [Array] + # # @param unit_amount [String] + # # + # def initialize(dimension_values:, unit_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanTieredPrice < Orb::BaseModel @@ -944,8 +1354,8 @@ class NewPlanTieredPrice < Orb::BaseModel # @!attribute tiered_config # - # @return [Orb::Models::TieredConfigModel] - required :tiered_config, -> { Orb::Models::TieredConfigModel } + # @return [Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::TieredConfig] + required :tiered_config, -> { Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::TieredConfig } # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is @@ -965,8 +1375,10 @@ class NewPlanTieredPrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -1004,8 +1416,10 @@ class NewPlanTieredPrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -1019,16 +1433,16 @@ class NewPlanTieredPrice < Orb::BaseModel # # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::Cadence] # # @param item_id [String] # # @param name [String] - # # @param tiered_config [Orb::Models::TieredConfigModel] + # # @param tiered_config [Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::TieredConfig] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :tiered] # # @@ -1091,6 +1505,153 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class TieredConfig < Orb::BaseModel + # @!attribute tiers + # Tiers for rating based on total usage quantities into the specified tier + # + # @return [Array] + required :tiers, + -> { Orb::ArrayOf[Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::TieredConfig::Tier] } + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute first_unit + # Inclusive tier starting value + # + # @return [Float] + required :first_unit, Float + + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String + + # @!attribute last_unit + # Exclusive tier ending value. If null, this is treated as the last tier + # + # @return [Float, nil] + optional :last_unit, Float, nil?: true + + # @!parse + # # @param first_unit [Float] + # # @param unit_amount [String] + # # @param last_unit [Float, nil] + # # + # def initialize(first_unit:, unit_amount:, last_unit: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanTieredBpsPrice < Orb::BaseModel @@ -1119,8 +1680,9 @@ class NewPlanTieredBpsPrice < Orb::BaseModel # @!attribute tiered_bps_config # - # @return [Orb::Models::TieredBpsConfigModel] - required :tiered_bps_config, -> { Orb::Models::TieredBpsConfigModel } + # @return [Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::TieredBpsConfig] + required :tiered_bps_config, + -> { Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::TieredBpsConfig } # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is @@ -1140,8 +1702,10 @@ class NewPlanTieredBpsPrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -1179,8 +1743,10 @@ class NewPlanTieredBpsPrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -1194,16 +1760,16 @@ class NewPlanTieredBpsPrice < Orb::BaseModel # # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::Cadence] # # @param item_id [String] # # @param name [String] - # # @param tiered_bps_config [Orb::Models::TieredBpsConfigModel] + # # @param tiered_bps_config [Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::TieredBpsConfig] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :tiered_bps] # # @@ -1266,13 +1832,168 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class TieredBpsConfig < Orb::BaseModel + # @!attribute tiers + # Tiers for a Graduated BPS pricing model, where usage is bucketed into specified + # tiers + # + # @return [Array] + required :tiers, + -> { Orb::ArrayOf[Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::TieredBpsConfig::Tier] } + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute bps + # Per-event basis point rate + # + # @return [Float] + required :bps, Float + + # @!attribute minimum_amount + # Inclusive tier starting value + # + # @return [String] + required :minimum_amount, String + + # @!attribute maximum_amount + # Exclusive tier ending value + # + # @return [String, nil] + optional :maximum_amount, String, nil?: true + + # @!attribute per_unit_maximum + # Per unit maximum to charge + # + # @return [String, nil] + optional :per_unit_maximum, String, nil?: true + + # @!parse + # # @param bps [Float] + # # @param minimum_amount [String] + # # @param maximum_amount [String, nil] + # # @param per_unit_maximum [String, nil] + # # + # def initialize(bps:, minimum_amount:, maximum_amount: nil, per_unit_maximum: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanBpsPrice < Orb::BaseModel # @!attribute bps_config # - # @return [Orb::Models::BpsConfigModel] - required :bps_config, -> { Orb::Models::BpsConfigModel } + # @return [Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BpsConfig] + required :bps_config, -> { Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BpsConfig } # @!attribute cadence # The cadence to bill for this price on. @@ -1315,8 +2036,10 @@ class NewPlanBpsPrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -1354,8 +2077,10 @@ class NewPlanBpsPrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -1366,19 +2091,19 @@ class NewPlanBpsPrice < Orb::BaseModel optional :metadata, Orb::HashOf[String, nil?: true], nil?: true # @!parse - # # @param bps_config [Orb::Models::BpsConfigModel] + # # @param bps_config [Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BpsConfig] # # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::Cadence] # # @param item_id [String] # # @param name [String] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :bps] # # @@ -1405,6 +2130,28 @@ class NewPlanBpsPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BpsConfig < Orb::BaseModel + # @!attribute bps + # Basis point take rate per event + # + # @return [Float] + required :bps, Float + + # @!attribute per_unit_maximum + # Optional currency amount maximum to cap spend per event + # + # @return [String, nil] + optional :per_unit_maximum, String, nil?: true + + # @!parse + # # @param bps [Float] + # # @param per_unit_maximum [String, nil] + # # + # def initialize(bps:, per_unit_maximum: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # The cadence to bill for this price on. @@ -1441,13 +2188,115 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanBulkBpsPrice < Orb::BaseModel # @!attribute bulk_bps_config # - # @return [Orb::Models::BulkBpsConfigModel] - required :bulk_bps_config, -> { Orb::Models::BulkBpsConfigModel } + # @return [Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig] + required :bulk_bps_config, -> { Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig } # @!attribute cadence # The cadence to bill for this price on. @@ -1490,8 +2339,10 @@ class NewPlanBulkBpsPrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -1529,8 +2380,10 @@ class NewPlanBulkBpsPrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -1541,19 +2394,19 @@ class NewPlanBulkBpsPrice < Orb::BaseModel optional :metadata, Orb::HashOf[String, nil?: true], nil?: true # @!parse - # # @param bulk_bps_config [Orb::Models::BulkBpsConfigModel] + # # @param bulk_bps_config [Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig] # # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::Cadence] # # @param item_id [String] # # @param name [String] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :bulk_bps] # # @@ -1580,6 +2433,52 @@ class NewPlanBulkBpsPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BulkBpsConfig < Orb::BaseModel + # @!attribute tiers + # Tiers for a bulk BPS pricing model where all usage is aggregated to a single + # tier based on total volume + # + # @return [Array] + required :tiers, + -> { Orb::ArrayOf[Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig::Tier] } + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute bps + # Basis points to rate on + # + # @return [Float] + required :bps, Float + + # @!attribute maximum_amount + # Upper bound for tier + # + # @return [String, nil] + optional :maximum_amount, String, nil?: true + + # @!attribute per_unit_maximum + # The maximum amount to charge for any one event + # + # @return [String, nil] + optional :per_unit_maximum, String, nil?: true + + # @!parse + # # @param bps [Float] + # # @param maximum_amount [String, nil] + # # @param per_unit_maximum [String, nil] + # # + # def initialize(bps:, maximum_amount: nil, per_unit_maximum: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + # @abstract # # The cadence to bill for this price on. @@ -1616,13 +2515,115 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanBulkPrice < Orb::BaseModel # @!attribute bulk_config # - # @return [Orb::Models::BulkConfigModel] - required :bulk_config, -> { Orb::Models::BulkConfigModel } + # @return [Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig] + required :bulk_config, -> { Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig } # @!attribute cadence # The cadence to bill for this price on. @@ -1665,8 +2666,10 @@ class NewPlanBulkPrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -1704,8 +2707,10 @@ class NewPlanBulkPrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -1716,19 +2721,19 @@ class NewPlanBulkPrice < Orb::BaseModel optional :metadata, Orb::HashOf[String, nil?: true], nil?: true # @!parse - # # @param bulk_config [Orb::Models::BulkConfigModel] + # # @param bulk_config [Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig] # # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::Cadence] # # @param item_id [String] # # @param name [String] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :bulk] # # @@ -1755,6 +2760,44 @@ class NewPlanBulkPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BulkConfig < Orb::BaseModel + # @!attribute tiers + # Bulk tiers for rating based on total usage volume + # + # @return [Array] + required :tiers, + -> { Orb::ArrayOf[Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig::Tier] } + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String + + # @!attribute maximum_units + # Upper bound for this tier + # + # @return [Float, nil] + optional :maximum_units, Float, nil?: true + + # @!parse + # # @param unit_amount [String] + # # @param maximum_units [Float, nil] + # # + # def initialize(unit_amount:, maximum_units: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + # @abstract # # The cadence to bill for this price on. @@ -1791,6 +2834,108 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanThresholdTotalAmountPrice < Orb::BaseModel @@ -1841,8 +2986,10 @@ class NewPlanThresholdTotalAmountPrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -1880,8 +3027,10 @@ class NewPlanThresholdTotalAmountPrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -1898,13 +3047,13 @@ class NewPlanThresholdTotalAmountPrice < Orb::BaseModel # # @param threshold_total_amount_config [Hash{Symbol=>Object}] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :threshold_total_amount] # # @@ -1967,6 +3116,108 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanTieredPackagePrice < Orb::BaseModel @@ -2016,8 +3267,10 @@ class NewPlanTieredPackagePrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -2055,8 +3308,10 @@ class NewPlanTieredPackagePrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -2073,13 +3328,13 @@ class NewPlanTieredPackagePrice < Orb::BaseModel # # @param tiered_package_config [Hash{Symbol=>Object}] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :tiered_package] # # @@ -2142,6 +3397,108 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanTieredWithMinimumPrice < Orb::BaseModel @@ -2192,8 +3549,10 @@ class NewPlanTieredWithMinimumPrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -2231,8 +3590,10 @@ class NewPlanTieredWithMinimumPrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -2249,13 +3610,13 @@ class NewPlanTieredWithMinimumPrice < Orb::BaseModel # # @param tiered_with_minimum_config [Hash{Symbol=>Object}] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :tiered_with_minimum] # # @@ -2318,6 +3679,108 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanUnitWithPercentPrice < Orb::BaseModel @@ -2367,8 +3830,10 @@ class NewPlanUnitWithPercentPrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -2406,8 +3871,10 @@ class NewPlanUnitWithPercentPrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -2424,13 +3891,13 @@ class NewPlanUnitWithPercentPrice < Orb::BaseModel # # @param unit_with_percent_config [Hash{Symbol=>Object}] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :unit_with_percent] # # @@ -2493,6 +3960,108 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanPackageWithAllocationPrice < Orb::BaseModel @@ -2543,8 +4112,10 @@ class NewPlanPackageWithAllocationPrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -2582,8 +4153,10 @@ class NewPlanPackageWithAllocationPrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -2600,13 +4173,13 @@ class NewPlanPackageWithAllocationPrice < Orb::BaseModel # # @param package_with_allocation_config [Hash{Symbol=>Object}] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :package_with_allocation] # # @@ -2669,6 +4242,108 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanTierWithProrationPrice < Orb::BaseModel @@ -2719,8 +4394,10 @@ class NewPlanTierWithProrationPrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -2758,8 +4435,10 @@ class NewPlanTierWithProrationPrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -2776,13 +4455,13 @@ class NewPlanTierWithProrationPrice < Orb::BaseModel # # @param tiered_with_proration_config [Hash{Symbol=>Object}] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :tiered_with_proration] # # @@ -2845,6 +4524,108 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanUnitWithProrationPrice < Orb::BaseModel @@ -2895,8 +4676,10 @@ class NewPlanUnitWithProrationPrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -2934,8 +4717,10 @@ class NewPlanUnitWithProrationPrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -2952,13 +4737,13 @@ class NewPlanUnitWithProrationPrice < Orb::BaseModel # # @param unit_with_proration_config [Hash{Symbol=>Object}] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :unit_with_proration] # # @@ -3021,6 +4806,108 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanGroupedAllocationPrice < Orb::BaseModel @@ -3071,8 +4958,10 @@ class NewPlanGroupedAllocationPrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -3110,8 +4999,10 @@ class NewPlanGroupedAllocationPrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -3128,13 +5019,13 @@ class NewPlanGroupedAllocationPrice < Orb::BaseModel # # @param name [String] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :grouped_allocation] # # @@ -3197,6 +5088,108 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanGroupedWithProratedMinimumPrice < Orb::BaseModel @@ -3247,8 +5240,10 @@ class NewPlanGroupedWithProratedMinimumPrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -3286,8 +5281,10 @@ class NewPlanGroupedWithProratedMinimumPrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -3304,13 +5301,13 @@ class NewPlanGroupedWithProratedMinimumPrice < Orb::BaseModel # # @param name [String] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :grouped_with_prorated_minimum] # # @@ -3373,6 +5370,108 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanGroupedWithMeteredMinimumPrice < Orb::BaseModel @@ -3423,8 +5522,10 @@ class NewPlanGroupedWithMeteredMinimumPrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -3462,8 +5563,10 @@ class NewPlanGroupedWithMeteredMinimumPrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -3480,13 +5583,13 @@ class NewPlanGroupedWithMeteredMinimumPrice < Orb::BaseModel # # @param name [String] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :grouped_with_metered_minimum] # # @@ -3549,6 +5652,108 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanMatrixWithDisplayNamePrice < Orb::BaseModel @@ -3599,8 +5804,10 @@ class NewPlanMatrixWithDisplayNamePrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -3638,8 +5845,10 @@ class NewPlanMatrixWithDisplayNamePrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -3656,13 +5865,13 @@ class NewPlanMatrixWithDisplayNamePrice < Orb::BaseModel # # @param name [String] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :matrix_with_display_name] # # @@ -3725,6 +5934,108 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanBulkWithProrationPrice < Orb::BaseModel @@ -3775,8 +6086,10 @@ class NewPlanBulkWithProrationPrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -3814,8 +6127,10 @@ class NewPlanBulkWithProrationPrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -3832,13 +6147,13 @@ class NewPlanBulkWithProrationPrice < Orb::BaseModel # # @param name [String] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :bulk_with_proration] # # @@ -3901,6 +6216,108 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanGroupedTieredPackagePrice < Orb::BaseModel @@ -3951,8 +6368,10 @@ class NewPlanGroupedTieredPackagePrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -3990,8 +6409,10 @@ class NewPlanGroupedTieredPackagePrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -4008,13 +6429,13 @@ class NewPlanGroupedTieredPackagePrice < Orb::BaseModel # # @param name [String] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :grouped_tiered_package] # # @@ -4077,6 +6498,108 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanMaxGroupTieredPackagePrice < Orb::BaseModel @@ -4127,8 +6650,10 @@ class NewPlanMaxGroupTieredPackagePrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -4166,8 +6691,10 @@ class NewPlanMaxGroupTieredPackagePrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -4184,13 +6711,13 @@ class NewPlanMaxGroupTieredPackagePrice < Orb::BaseModel # # @param name [String] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :max_group_tiered_package] # # @@ -4253,6 +6780,108 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanScalableMatrixWithUnitPricingPrice < Orb::BaseModel @@ -4303,8 +6932,10 @@ class NewPlanScalableMatrixWithUnitPricingPrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -4342,8 +6973,10 @@ class NewPlanScalableMatrixWithUnitPricingPrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -4360,13 +6993,13 @@ class NewPlanScalableMatrixWithUnitPricingPrice < Orb::BaseModel # # @param scalable_matrix_with_unit_pricing_config [Hash{Symbol=>Object}] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :scalable_matrix_with_unit_pricing] # # @@ -4429,6 +7062,108 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanScalableMatrixWithTieredPricingPrice < Orb::BaseModel @@ -4479,8 +7214,10 @@ class NewPlanScalableMatrixWithTieredPricingPrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -4518,8 +7255,10 @@ class NewPlanScalableMatrixWithTieredPricingPrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -4536,13 +7275,13 @@ class NewPlanScalableMatrixWithTieredPricingPrice < Orb::BaseModel # # @param scalable_matrix_with_tiered_pricing_config [Hash{Symbol=>Object}] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :scalable_matrix_with_tiered_pricing] # # @@ -4605,6 +7344,108 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end class NewPlanCumulativeGroupedBulkPrice < Orb::BaseModel @@ -4655,8 +7496,10 @@ class NewPlanCumulativeGroupedBulkPrice < Orb::BaseModel # For custom cadence: specifies the duration of the billing period in days or # months. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :billing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::BillingCycleConfiguration }, + nil?: true # @!attribute conversion_rate # The per unit conversion rate of the price currency to the invoicing currency. @@ -4694,8 +7537,10 @@ class NewPlanCumulativeGroupedBulkPrice < Orb::BaseModel # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. # - # @return [Orb::Models::NewBillingCycleConfigurationModel, nil] - optional :invoicing_cycle_configuration, -> { Orb::Models::NewBillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute metadata # User-specified key/value pairs for the resource. Individual keys can be removed @@ -4712,13 +7557,13 @@ class NewPlanCumulativeGroupedBulkPrice < Orb::BaseModel # # @param name [String] # # @param billable_metric_id [String, nil] # # @param billed_in_advance [Boolean, nil] - # # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param billing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::BillingCycleConfiguration, nil] # # @param conversion_rate [Float, nil] # # @param currency [String, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param invoice_grouping_key [String, nil] - # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfigurationModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::InvoicingCycleConfiguration, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param model_type [Symbol, :cumulative_grouped_bulk] # # @@ -4781,6 +7626,108 @@ class Cadence < Orb::Enum # # # def self.values; end end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end end end diff --git a/lib/orb/models/plan_minified_model.rb b/lib/orb/models/plan_minified_model.rb deleted file mode 100644 index bc8d2cfe..00000000 --- a/lib/orb/models/plan_minified_model.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class PlanMinifiedModel < Orb::BaseModel - # @!attribute id - # - # @return [String, nil] - required :id, String, nil?: true - - # @!attribute external_plan_id - # An optional user-defined ID for this plan resource, used throughout the system - # as an alias for this Plan. Use this field to identify a plan by an existing - # identifier in your system. - # - # @return [String, nil] - required :external_plan_id, String, nil?: true - - # @!attribute name - # - # @return [String, nil] - required :name, String, nil?: true - - # @!parse - # # @param id [String, nil] - # # @param external_plan_id [String, nil] - # # @param name [String, nil] - # # - # def initialize(id:, external_plan_id:, name:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/plan_model.rb b/lib/orb/models/plan_model.rb deleted file mode 100644 index ed0ddf6c..00000000 --- a/lib/orb/models/plan_model.rb +++ /dev/null @@ -1,430 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class PlanModel < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute adjustments - # Adjustments for this plan. If the plan has phases, this includes adjustments - # across all phases of the plan. - # - # @return [Array] - required :adjustments, -> { Orb::ArrayOf[union: Orb::Models::AdjustmentModel] } - - # @!attribute base_plan - # - # @return [Orb::Models::PlanMinifiedModel, nil] - required :base_plan, -> { Orb::Models::PlanMinifiedModel }, nil?: true - - # @!attribute base_plan_id - # The parent plan id if the given plan was created by overriding one or more of - # the parent's prices - # - # @return [String, nil] - required :base_plan_id, String, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute currency - # An ISO 4217 currency string or custom pricing unit (`credits`) for this plan's - # prices. - # - # @return [String] - required :currency, String - - # @!attribute default_invoice_memo - # The default memo text on the invoices corresponding to subscriptions on this - # plan. Note that each subscription may configure its own memo. - # - # @return [String, nil] - required :default_invoice_memo, String, nil?: true - - # @!attribute description - # - # @return [String] - required :description, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_plan_id - # An optional user-defined ID for this plan resource, used throughout the system - # as an alias for this Plan. Use this field to identify a plan by an existing - # identifier in your system. - # - # @return [String, nil] - required :external_plan_id, String, nil?: true - - # @!attribute invoicing_currency - # An ISO 4217 currency string for which this plan is billed in. Matches `currency` - # unless `currency` is a custom pricing unit. - # - # @return [String] - required :invoicing_currency, String - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute net_terms - # Determines the difference between the invoice issue date and the due date. A - # value of "0" here signifies that invoices are due on issue, whereas a value of - # "30" means that the customer has a month to pay the invoice before its overdue. - # Note that individual subscriptions or invoices may set a different net terms - # configuration. - # - # @return [Integer, nil] - required :net_terms, Integer, nil?: true - - # @!attribute plan_phases - # - # @return [Array, nil] - required :plan_phases, -> { Orb::ArrayOf[Orb::Models::PlanModel::PlanPhase] }, nil?: true - - # @!attribute prices - # Prices for this plan. If the plan has phases, this includes prices across all - # phases of the plan. - # - # @return [Array] - required :prices, -> { Orb::ArrayOf[union: Orb::Models::PriceModel] } - - # @!attribute product - # - # @return [Orb::Models::PlanModel::Product] - required :product, -> { Orb::Models::PlanModel::Product } - - # @!attribute status - # - # @return [Symbol, Orb::Models::PlanModel::Status] - required :status, enum: -> { Orb::Models::PlanModel::Status } - - # @!attribute trial_config - # - # @return [Orb::Models::PlanModel::TrialConfig] - required :trial_config, -> { Orb::Models::PlanModel::TrialConfig } - - # @!attribute version - # - # @return [Integer] - required :version, Integer - - # @!parse - # # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be - # # subscribed to by a customer. Plans define the billing behavior of the - # # subscription. You can see more about how to configure prices in the - # # [Price resource](/reference/price). - # # - # # @param id [String] - # # @param adjustments [Array] - # # @param base_plan [Orb::Models::PlanMinifiedModel, nil] - # # @param base_plan_id [String, nil] - # # @param created_at [Time] - # # @param currency [String] - # # @param default_invoice_memo [String, nil] - # # @param description [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_plan_id [String, nil] - # # @param invoicing_currency [String] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param net_terms [Integer, nil] - # # @param plan_phases [Array, nil] - # # @param prices [Array] - # # @param product [Orb::Models::PlanModel::Product] - # # @param status [Symbol, Orb::Models::PlanModel::Status] - # # @param trial_config [Orb::Models::PlanModel::TrialConfig] - # # @param version [Integer] - # # - # def initialize( - # id:, - # adjustments:, - # base_plan:, - # base_plan_id:, - # created_at:, - # currency:, - # default_invoice_memo:, - # description:, - # discount:, - # external_plan_id:, - # invoicing_currency:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # net_terms:, - # plan_phases:, - # prices:, - # product:, - # status:, - # trial_config:, - # version:, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - class PlanPhase < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute description - # - # @return [String, nil] - required :description, String, nil?: true - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute duration - # How many terms of length `duration_unit` this phase is active for. If null, this - # phase is evergreen and active indefinitely - # - # @return [Integer, nil] - required :duration, Integer, nil?: true - - # @!attribute duration_unit - # - # @return [Symbol, Orb::Models::PlanModel::PlanPhase::DurationUnit, nil] - required :duration_unit, enum: -> { Orb::Models::PlanModel::PlanPhase::DurationUnit }, nil?: true - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute order - # Determines the ordering of the phase in a plan's lifecycle. 1 = first phase. - # - # @return [Integer] - required :order, Integer - - # @!parse - # # @param id [String] - # # @param description [String, nil] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param duration [Integer, nil] - # # @param duration_unit [Symbol, Orb::Models::PlanModel::PlanPhase::DurationUnit, nil] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param order [Integer] - # # - # def initialize( - # id:, - # description:, - # discount:, - # duration:, - # duration_unit:, - # maximum:, - # maximum_amount:, - # minimum:, - # minimum_amount:, - # name:, - # order:, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case duration_unit - # in :daily - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # end - # ``` - class DurationUnit < Orb::Enum - DAILY = :daily - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class Product < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute name - # - # @return [String] - required :name, String - - # @!parse - # # @param id [String] - # # @param created_at [Time] - # # @param name [String] - # # - # def initialize(id:, created_at:, name:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - - # @abstract - # - # @example - # ```ruby - # case status - # in :active - # # ... - # in :archived - # # ... - # in :draft - # # ... - # end - # ``` - class Status < Orb::Enum - ACTIVE = :active - ARCHIVED = :archived - DRAFT = :draft - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - class TrialConfig < Orb::BaseModel - # @!attribute trial_period - # - # @return [Integer, nil] - required :trial_period, Integer, nil?: true - - # @!attribute trial_period_unit - # - # @return [Symbol, Orb::Models::PlanModel::TrialConfig::TrialPeriodUnit] - required :trial_period_unit, enum: -> { Orb::Models::PlanModel::TrialConfig::TrialPeriodUnit } - - # @!parse - # # @param trial_period [Integer, nil] - # # @param trial_period_unit [Symbol, Orb::Models::PlanModel::TrialConfig::TrialPeriodUnit] - # # - # def initialize(trial_period:, trial_period_unit:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case trial_period_unit - # in :days - # # ... - # end - # ``` - class TrialPeriodUnit < Orb::Enum - DAYS = :days - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end - end -end diff --git a/lib/orb/models/plan_update_params.rb b/lib/orb/models/plan_update_params.rb index b735345b..8975c0cc 100644 --- a/lib/orb/models/plan_update_params.rb +++ b/lib/orb/models/plan_update_params.rb @@ -2,15 +2,33 @@ module Orb module Models - class PlanUpdateParams < Orb::Models::EditPlanModel + class PlanUpdateParams < Orb::BaseModel # @!parse # extend Orb::RequestParameters::Converter include Orb::RequestParameters + # @!attribute external_plan_id + # An optional user-defined ID for this plan resource, used throughout the system + # as an alias for this Plan. Use this field to identify a plan by an existing + # identifier in your system. + # + # @return [String, nil] + optional :external_plan_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + # @!parse + # # @param external_plan_id [String, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] # # - # def initialize(request_options: {}, **) = super + # def initialize(external_plan_id: nil, metadata: nil, request_options: {}, **) = super # def initialize: (Hash | Orb::BaseModel) -> void end diff --git a/lib/orb/models/plans/external_plan_id_update_params.rb b/lib/orb/models/plans/external_plan_id_update_params.rb index 99ebee7b..f8122a1d 100644 --- a/lib/orb/models/plans/external_plan_id_update_params.rb +++ b/lib/orb/models/plans/external_plan_id_update_params.rb @@ -3,15 +3,33 @@ module Orb module Models module Plans - class ExternalPlanIDUpdateParams < Orb::Models::EditPlanModel + class ExternalPlanIDUpdateParams < Orb::BaseModel # @!parse # extend Orb::RequestParameters::Converter include Orb::RequestParameters + # @!attribute external_plan_id + # An optional user-defined ID for this plan resource, used throughout the system + # as an alias for this Plan. Use this field to identify a plan by an existing + # identifier in your system. + # + # @return [String, nil] + optional :external_plan_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + # @!parse + # # @param external_plan_id [String, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] # # - # def initialize(request_options: {}, **) = super + # def initialize(external_plan_id: nil, metadata: nil, request_options: {}, **) = super # def initialize: (Hash | Orb::BaseModel) -> void end diff --git a/lib/orb/models/price.rb b/lib/orb/models/price.rb index 805afee7..78754084 100644 --- a/lib/orb/models/price.rb +++ b/lib/orb/models/price.rb @@ -21,197 +21,197 @@ module Models # in { # model_type: "unit", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::UnitPrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::UnitPrice::BillingCycleConfiguration # } # # Orb::Models::Price::UnitPrice ... # in { # model_type: "package", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::PackagePrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::PackagePrice::BillingCycleConfiguration # } # # Orb::Models::Price::PackagePrice ... # in { # model_type: "matrix", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::MatrixPrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::MatrixPrice::BillingCycleConfiguration # } # # Orb::Models::Price::MatrixPrice ... # in { # model_type: "tiered", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::TieredPrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::TieredPrice::BillingCycleConfiguration # } # # Orb::Models::Price::TieredPrice ... # in { # model_type: "tiered_bps", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::TieredBpsPrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::TieredBpsPrice::BillingCycleConfiguration # } # # Orb::Models::Price::TieredBpsPrice ... # in { # model_type: "bps", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::BpsPrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::BpsPrice::BillingCycleConfiguration # } # # Orb::Models::Price::BpsPrice ... # in { # model_type: "bulk_bps", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::BulkBpsPrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::BulkBpsPrice::BillingCycleConfiguration # } # # Orb::Models::Price::BulkBpsPrice ... # in { # model_type: "bulk", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::BulkPrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::BulkPrice::BillingCycleConfiguration # } # # Orb::Models::Price::BulkPrice ... # in { # model_type: "threshold_total_amount", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::ThresholdTotalAmountPrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::ThresholdTotalAmountPrice::BillingCycleConfiguration # } # # Orb::Models::Price::ThresholdTotalAmountPrice ... # in { # model_type: "tiered_package", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::TieredPackagePrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::TieredPackagePrice::BillingCycleConfiguration # } # # Orb::Models::Price::TieredPackagePrice ... # in { # model_type: "grouped_tiered", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::GroupedTieredPrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::GroupedTieredPrice::BillingCycleConfiguration # } # # Orb::Models::Price::GroupedTieredPrice ... # in { # model_type: "tiered_with_minimum", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::TieredWithMinimumPrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::TieredWithMinimumPrice::BillingCycleConfiguration # } # # Orb::Models::Price::TieredWithMinimumPrice ... # in { # model_type: "tiered_package_with_minimum", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::TieredPackageWithMinimumPrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::TieredPackageWithMinimumPrice::BillingCycleConfiguration # } # # Orb::Models::Price::TieredPackageWithMinimumPrice ... # in { # model_type: "package_with_allocation", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::PackageWithAllocationPrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::PackageWithAllocationPrice::BillingCycleConfiguration # } # # Orb::Models::Price::PackageWithAllocationPrice ... # in { # model_type: "unit_with_percent", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::UnitWithPercentPrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::UnitWithPercentPrice::BillingCycleConfiguration # } # # Orb::Models::Price::UnitWithPercentPrice ... # in { # model_type: "matrix_with_allocation", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::MatrixWithAllocationPrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::MatrixWithAllocationPrice::BillingCycleConfiguration # } # # Orb::Models::Price::MatrixWithAllocationPrice ... # in { # model_type: "tiered_with_proration", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::TieredWithProrationPrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::TieredWithProrationPrice::BillingCycleConfiguration # } # # Orb::Models::Price::TieredWithProrationPrice ... # in { # model_type: "unit_with_proration", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::UnitWithProrationPrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::UnitWithProrationPrice::BillingCycleConfiguration # } # # Orb::Models::Price::UnitWithProrationPrice ... # in { # model_type: "grouped_allocation", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::GroupedAllocationPrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::GroupedAllocationPrice::BillingCycleConfiguration # } # # Orb::Models::Price::GroupedAllocationPrice ... # in { # model_type: "grouped_with_prorated_minimum", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::GroupedWithProratedMinimumPrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::GroupedWithProratedMinimumPrice::BillingCycleConfiguration # } # # Orb::Models::Price::GroupedWithProratedMinimumPrice ... # in { # model_type: "grouped_with_metered_minimum", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillingCycleConfiguration # } # # Orb::Models::Price::GroupedWithMeteredMinimumPrice ... # in { # model_type: "matrix_with_display_name", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::MatrixWithDisplayNamePrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::MatrixWithDisplayNamePrice::BillingCycleConfiguration # } # # Orb::Models::Price::MatrixWithDisplayNamePrice ... # in { # model_type: "bulk_with_proration", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::BulkWithProrationPrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::BulkWithProrationPrice::BillingCycleConfiguration # } # # Orb::Models::Price::BulkWithProrationPrice ... # in { # model_type: "grouped_tiered_package", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::GroupedTieredPackagePrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::GroupedTieredPackagePrice::BillingCycleConfiguration # } # # Orb::Models::Price::GroupedTieredPackagePrice ... # in { # model_type: "max_group_tiered_package", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::MaxGroupTieredPackagePrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::MaxGroupTieredPackagePrice::BillingCycleConfiguration # } # # Orb::Models::Price::MaxGroupTieredPackagePrice ... # in { # model_type: "scalable_matrix_with_unit_pricing", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration # } # # Orb::Models::Price::ScalableMatrixWithUnitPricingPrice ... # in { # model_type: "scalable_matrix_with_tiered_pricing", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration # } # # Orb::Models::Price::ScalableMatrixWithTieredPricingPrice ... # in { # model_type: "cumulative_grouped_bulk", # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + # billable_metric: Orb::Models::Price::CumulativeGroupedBulkPrice::BillableMetric, + # billing_cycle_configuration: Orb::Models::Price::CumulativeGroupedBulkPrice::BillingCycleConfiguration # } # # Orb::Models::Price::CumulativeGroupedBulkPrice ... # end @@ -346,13 +346,13 @@ class UnitPrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::UnitPrice::BillableMetric, nil] + required :billable_metric, -> { Orb::Models::Price::UnitPrice::BillableMetric }, nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::UnitPrice::BillingCycleConfiguration] + required :billing_cycle_configuration, -> { Orb::Models::Price::UnitPrice::BillingCycleConfiguration } # @!attribute cadence # @@ -371,8 +371,8 @@ class UnitPrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::UnitPrice::CreditAllocation, nil] + required :credit_allocation, -> { Orb::Models::Price::UnitPrice::CreditAllocation }, nil?: true # @!attribute currency # @@ -396,18 +396,20 @@ class UnitPrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::UnitPrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::UnitPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::UnitPrice::Item] + required :item, -> { Orb::Models::Price::UnitPrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::UnitPrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::UnitPrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -425,8 +427,8 @@ class UnitPrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::UnitPrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::UnitPrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -455,40 +457,40 @@ class UnitPrice < Orb::BaseModel # @!attribute unit_config # - # @return [Orb::Models::UnitConfigModel] - required :unit_config, -> { Orb::Models::UnitConfigModel } + # @return [Orb::Models::Price::UnitPrice::UnitConfig] + required :unit_config, -> { Orb::Models::Price::UnitPrice::UnitConfig } # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::UnitPrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::UnitPrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::UnitPrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::UnitPrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::UnitPrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::UnitPrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::UnitPrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::UnitPrice::Item] + # # @param maximum [Orb::Models::Price::UnitPrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::UnitPrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::UnitPrice::PriceType] - # # @param unit_config [Orb::Models::UnitConfigModel] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param unit_config [Orb::Models::Price::UnitPrice::UnitConfig] + # # @param dimensional_price_configuration [Orb::Models::Price::UnitPrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :unit] # # # def initialize( @@ -523,6 +525,64 @@ class UnitPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::UnitPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::UnitPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::UnitPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -558,6 +618,136 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::UnitPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::UnitPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::UnitPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -580,6 +770,41 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class UnitConfig < Orb::BaseModel + # @!attribute unit_amount + # Rate per unit of usage + # + # @return [String] + required :unit_amount, String + + # @!parse + # # @param unit_amount [String] + # # + # def initialize(unit_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class PackagePrice < Orb::BaseModel @@ -590,13 +815,13 @@ class PackagePrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::PackagePrice::BillableMetric, nil] + required :billable_metric, -> { Orb::Models::Price::PackagePrice::BillableMetric }, nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::PackagePrice::BillingCycleConfiguration] + required :billing_cycle_configuration, -> { Orb::Models::Price::PackagePrice::BillingCycleConfiguration } # @!attribute cadence # @@ -615,8 +840,8 @@ class PackagePrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::PackagePrice::CreditAllocation, nil] + required :credit_allocation, -> { Orb::Models::Price::PackagePrice::CreditAllocation }, nil?: true # @!attribute currency # @@ -640,18 +865,20 @@ class PackagePrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::PackagePrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::PackagePrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::PackagePrice::Item] + required :item, -> { Orb::Models::Price::PackagePrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::PackagePrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::PackagePrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -669,8 +896,8 @@ class PackagePrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::PackagePrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::PackagePrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -689,8 +916,8 @@ class PackagePrice < Orb::BaseModel # @!attribute package_config # - # @return [Orb::Models::PackageConfigModel] - required :package_config, -> { Orb::Models::PackageConfigModel } + # @return [Orb::Models::Price::PackagePrice::PackageConfig] + required :package_config, -> { Orb::Models::Price::PackagePrice::PackageConfig } # @!attribute plan_phase_order # @@ -704,35 +931,35 @@ class PackagePrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::PackagePrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::PackagePrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::PackagePrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::PackagePrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::PackagePrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::PackagePrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::PackagePrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::PackagePrice::Item] + # # @param maximum [Orb::Models::Price::PackagePrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::PackagePrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] - # # @param package_config [Orb::Models::PackageConfigModel] + # # @param package_config [Orb::Models::Price::PackagePrice::PackageConfig] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::PackagePrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::PackagePrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :package] # # # def initialize( @@ -767,6 +994,64 @@ class PackagePrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::PackagePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::PackagePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::PackagePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -802,6 +1087,159 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::PackagePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::PackagePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::PackagePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PackageConfig < Orb::BaseModel + # @!attribute package_amount + # A currency amount to rate usage by + # + # @return [String] + required :package_amount, String + + # @!attribute package_size + # An integer amount to represent package size. For example, 1000 here would divide + # usage by 1000 before multiplying by package_amount in rating + # + # @return [Integer] + required :package_size, Integer + + # @!parse + # # @param package_amount [String] + # # @param package_size [Integer] + # # + # def initialize(package_amount:, package_size:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -824,6 +1262,26 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class MatrixPrice < Orb::BaseModel @@ -834,13 +1292,13 @@ class MatrixPrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::MatrixPrice::BillableMetric, nil] + required :billable_metric, -> { Orb::Models::Price::MatrixPrice::BillableMetric }, nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::MatrixPrice::BillingCycleConfiguration] + required :billing_cycle_configuration, -> { Orb::Models::Price::MatrixPrice::BillingCycleConfiguration } # @!attribute cadence # @@ -859,8 +1317,8 @@ class MatrixPrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::MatrixPrice::CreditAllocation, nil] + required :credit_allocation, -> { Orb::Models::Price::MatrixPrice::CreditAllocation }, nil?: true # @!attribute currency # @@ -884,23 +1342,25 @@ class MatrixPrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::MatrixPrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::MatrixPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::MatrixPrice::Item] + required :item, -> { Orb::Models::Price::MatrixPrice::Item } # @!attribute matrix_config # - # @return [Orb::Models::MatrixConfigModel] - required :matrix_config, -> { Orb::Models::MatrixConfigModel } + # @return [Orb::Models::Price::MatrixPrice::MatrixConfig] + required :matrix_config, -> { Orb::Models::Price::MatrixPrice::MatrixConfig } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::MatrixPrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::MatrixPrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -918,8 +1378,8 @@ class MatrixPrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::MatrixPrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::MatrixPrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -948,35 +1408,35 @@ class MatrixPrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::MatrixPrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::MatrixPrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::MatrixPrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::MatrixPrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::MatrixPrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::MatrixPrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param matrix_config [Orb::Models::MatrixConfigModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::MatrixPrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::MatrixPrice::Item] + # # @param matrix_config [Orb::Models::Price::MatrixPrice::MatrixConfig] + # # @param maximum [Orb::Models::Price::MatrixPrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::MatrixPrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::MatrixPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::MatrixPrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :matrix] # # # def initialize( @@ -1011,6 +1471,64 @@ class MatrixPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::MatrixPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::MatrixPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::MatrixPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -1046,6 +1564,189 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::MatrixPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::MatrixPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::MatrixPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MatrixConfig < Orb::BaseModel + # @!attribute default_unit_amount + # Default per unit rate for any usage not bucketed into a specified matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::ArrayOf[String, nil?: true] + + # @!attribute matrix_values + # Matrix values for specified matrix grouping keys + # + # @return [Array] + required :matrix_values, -> { Orb::ArrayOf[Orb::Models::Price::MatrixPrice::MatrixConfig::MatrixValue] } + + # @!parse + # # @param default_unit_amount [String] + # # @param dimensions [Array] + # # @param matrix_values [Array] + # # + # def initialize(default_unit_amount:, dimensions:, matrix_values:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class MatrixValue < Orb::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this Matrix value by. For example, + # ["region", "tier"] could be used to filter cloud usage by a cloud region and an + # instance tier. + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Unit price for the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!parse + # # @param dimension_values [Array] + # # @param unit_amount [String] + # # + # def initialize(dimension_values:, unit_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -1068,6 +1769,26 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class TieredPrice < Orb::BaseModel @@ -1078,13 +1799,13 @@ class TieredPrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::TieredPrice::BillableMetric, nil] + required :billable_metric, -> { Orb::Models::Price::TieredPrice::BillableMetric }, nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::TieredPrice::BillingCycleConfiguration] + required :billing_cycle_configuration, -> { Orb::Models::Price::TieredPrice::BillingCycleConfiguration } # @!attribute cadence # @@ -1103,8 +1824,8 @@ class TieredPrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::TieredPrice::CreditAllocation, nil] + required :credit_allocation, -> { Orb::Models::Price::TieredPrice::CreditAllocation }, nil?: true # @!attribute currency # @@ -1128,18 +1849,20 @@ class TieredPrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::TieredPrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::TieredPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::TieredPrice::Item] + required :item, -> { Orb::Models::Price::TieredPrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::TieredPrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::TieredPrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -1157,8 +1880,8 @@ class TieredPrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::TieredPrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::TieredPrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -1187,40 +1910,40 @@ class TieredPrice < Orb::BaseModel # @!attribute tiered_config # - # @return [Orb::Models::TieredConfigModel] - required :tiered_config, -> { Orb::Models::TieredConfigModel } + # @return [Orb::Models::Price::TieredPrice::TieredConfig] + required :tiered_config, -> { Orb::Models::Price::TieredPrice::TieredConfig } # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::TieredPrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::TieredPrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::TieredPrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::TieredPrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::TieredPrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::TieredPrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::TieredPrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::TieredPrice::Item] + # # @param maximum [Orb::Models::Price::TieredPrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::TieredPrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::TieredPrice::PriceType] - # # @param tiered_config [Orb::Models::TieredConfigModel] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param tiered_config [Orb::Models::Price::TieredPrice::TieredConfig] + # # @param dimensional_price_configuration [Orb::Models::Price::TieredPrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :tiered] # # # def initialize( @@ -1255,6 +1978,64 @@ class TieredPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::TieredPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::TieredPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::TieredPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -1290,6 +2071,136 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::TieredPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::TieredPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::TieredPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -1312,6 +2223,70 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class TieredConfig < Orb::BaseModel + # @!attribute tiers + # Tiers for rating based on total usage quantities into the specified tier + # + # @return [Array] + required :tiers, -> { Orb::ArrayOf[Orb::Models::Price::TieredPrice::TieredConfig::Tier] } + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute first_unit + # Inclusive tier starting value + # + # @return [Float] + required :first_unit, Float + + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String + + # @!attribute last_unit + # Exclusive tier ending value. If null, this is treated as the last tier + # + # @return [Float, nil] + optional :last_unit, Float, nil?: true + + # @!parse + # # @param first_unit [Float] + # # @param unit_amount [String] + # # @param last_unit [Float, nil] + # # + # def initialize(first_unit:, unit_amount:, last_unit: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class TieredBpsPrice < Orb::BaseModel @@ -1322,13 +2297,14 @@ class TieredBpsPrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::TieredBpsPrice::BillableMetric, nil] + required :billable_metric, -> { Orb::Models::Price::TieredBpsPrice::BillableMetric }, nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::TieredBpsPrice::BillingCycleConfiguration] + required :billing_cycle_configuration, + -> { Orb::Models::Price::TieredBpsPrice::BillingCycleConfiguration } # @!attribute cadence # @@ -1347,8 +2323,8 @@ class TieredBpsPrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::TieredBpsPrice::CreditAllocation, nil] + required :credit_allocation, -> { Orb::Models::Price::TieredBpsPrice::CreditAllocation }, nil?: true # @!attribute currency # @@ -1372,18 +2348,20 @@ class TieredBpsPrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::TieredBpsPrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::TieredBpsPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::TieredBpsPrice::Item] + required :item, -> { Orb::Models::Price::TieredBpsPrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::TieredBpsPrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::TieredBpsPrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -1401,8 +2379,8 @@ class TieredBpsPrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::TieredBpsPrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::TieredBpsPrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -1431,40 +2409,40 @@ class TieredBpsPrice < Orb::BaseModel # @!attribute tiered_bps_config # - # @return [Orb::Models::TieredBpsConfigModel] - required :tiered_bps_config, -> { Orb::Models::TieredBpsConfigModel } + # @return [Orb::Models::Price::TieredBpsPrice::TieredBpsConfig] + required :tiered_bps_config, -> { Orb::Models::Price::TieredBpsPrice::TieredBpsConfig } # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::TieredBpsPrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::TieredBpsPrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::TieredBpsPrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::TieredBpsPrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::TieredBpsPrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::TieredBpsPrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::TieredBpsPrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::TieredBpsPrice::Item] + # # @param maximum [Orb::Models::Price::TieredBpsPrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::TieredBpsPrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::TieredBpsPrice::PriceType] - # # @param tiered_bps_config [Orb::Models::TieredBpsConfigModel] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param tiered_bps_config [Orb::Models::Price::TieredBpsPrice::TieredBpsConfig] + # # @param dimensional_price_configuration [Orb::Models::Price::TieredBpsPrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :tiered_bps] # # # def initialize( @@ -1499,6 +2477,64 @@ class TieredBpsPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::TieredBpsPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::TieredBpsPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::TieredBpsPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -1534,10 +2570,140 @@ class Cadence < Orb::Enum # def self.values; end end - # @abstract - # - # @example - # ```ruby + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::TieredBpsPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::TieredBpsPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::TieredBpsPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby # case price_type # in :usage_price # # ... @@ -1556,6 +2722,78 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class TieredBpsConfig < Orb::BaseModel + # @!attribute tiers + # Tiers for a Graduated BPS pricing model, where usage is bucketed into specified + # tiers + # + # @return [Array] + required :tiers, -> { Orb::ArrayOf[Orb::Models::Price::TieredBpsPrice::TieredBpsConfig::Tier] } + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute bps + # Per-event basis point rate + # + # @return [Float] + required :bps, Float + + # @!attribute minimum_amount + # Inclusive tier starting value + # + # @return [String] + required :minimum_amount, String + + # @!attribute maximum_amount + # Exclusive tier ending value + # + # @return [String, nil] + optional :maximum_amount, String, nil?: true + + # @!attribute per_unit_maximum + # Per unit maximum to charge + # + # @return [String, nil] + optional :per_unit_maximum, String, nil?: true + + # @!parse + # # @param bps [Float] + # # @param minimum_amount [String] + # # @param maximum_amount [String, nil] + # # @param per_unit_maximum [String, nil] + # # + # def initialize(bps:, minimum_amount:, maximum_amount: nil, per_unit_maximum: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class BpsPrice < Orb::BaseModel @@ -1566,18 +2804,18 @@ class BpsPrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::BpsPrice::BillableMetric, nil] + required :billable_metric, -> { Orb::Models::Price::BpsPrice::BillableMetric }, nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::BpsPrice::BillingCycleConfiguration] + required :billing_cycle_configuration, -> { Orb::Models::Price::BpsPrice::BillingCycleConfiguration } # @!attribute bps_config # - # @return [Orb::Models::BpsConfigModel] - required :bps_config, -> { Orb::Models::BpsConfigModel } + # @return [Orb::Models::Price::BpsPrice::BpsConfig] + required :bps_config, -> { Orb::Models::Price::BpsPrice::BpsConfig } # @!attribute cadence # @@ -1596,8 +2834,8 @@ class BpsPrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::BpsPrice::CreditAllocation, nil] + required :credit_allocation, -> { Orb::Models::Price::BpsPrice::CreditAllocation }, nil?: true # @!attribute currency # @@ -1621,18 +2859,20 @@ class BpsPrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::BpsPrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::BpsPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::BpsPrice::Item] + required :item, -> { Orb::Models::Price::BpsPrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::BpsPrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::BpsPrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -1650,8 +2890,8 @@ class BpsPrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::BpsPrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::BpsPrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -1680,35 +2920,35 @@ class BpsPrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::BpsPrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::BpsPrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param bps_config [Orb::Models::BpsConfigModel] + # # @param billable_metric [Orb::Models::Price::BpsPrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::BpsPrice::BillingCycleConfiguration] + # # @param bps_config [Orb::Models::Price::BpsPrice::BpsConfig] # # @param cadence [Symbol, Orb::Models::Price::BpsPrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::BpsPrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::BpsPrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::BpsPrice::Item] + # # @param maximum [Orb::Models::Price::BpsPrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::BpsPrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::BpsPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::BpsPrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :bps] # # # def initialize( @@ -1743,6 +2983,86 @@ class BpsPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::BpsPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::BpsPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::BpsPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class BpsConfig < Orb::BaseModel + # @!attribute bps + # Basis point take rate per event + # + # @return [Float] + required :bps, Float + + # @!attribute per_unit_maximum + # Optional currency amount maximum to cap spend per event + # + # @return [String, nil] + optional :per_unit_maximum, String, nil?: true + + # @!parse + # # @param bps [Float] + # # @param per_unit_maximum [String, nil] + # # + # def initialize(bps:, per_unit_maximum: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -1778,6 +3098,136 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::BpsPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::BpsPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::BpsPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -1800,6 +3250,26 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class BulkBpsPrice < Orb::BaseModel @@ -1810,18 +3280,18 @@ class BulkBpsPrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::BulkBpsPrice::BillableMetric, nil] + required :billable_metric, -> { Orb::Models::Price::BulkBpsPrice::BillableMetric }, nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::BulkBpsPrice::BillingCycleConfiguration] + required :billing_cycle_configuration, -> { Orb::Models::Price::BulkBpsPrice::BillingCycleConfiguration } # @!attribute bulk_bps_config # - # @return [Orb::Models::BulkBpsConfigModel] - required :bulk_bps_config, -> { Orb::Models::BulkBpsConfigModel } + # @return [Orb::Models::Price::BulkBpsPrice::BulkBpsConfig] + required :bulk_bps_config, -> { Orb::Models::Price::BulkBpsPrice::BulkBpsConfig } # @!attribute cadence # @@ -1840,8 +3310,8 @@ class BulkBpsPrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::BulkBpsPrice::CreditAllocation, nil] + required :credit_allocation, -> { Orb::Models::Price::BulkBpsPrice::CreditAllocation }, nil?: true # @!attribute currency # @@ -1865,18 +3335,20 @@ class BulkBpsPrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::BulkBpsPrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::BulkBpsPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::BulkBpsPrice::Item] + required :item, -> { Orb::Models::Price::BulkBpsPrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::BulkBpsPrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::BulkBpsPrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -1894,8 +3366,8 @@ class BulkBpsPrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::BulkBpsPrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::BulkBpsPrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -1924,35 +3396,35 @@ class BulkBpsPrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::BulkBpsPrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::BulkBpsPrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param bulk_bps_config [Orb::Models::BulkBpsConfigModel] + # # @param billable_metric [Orb::Models::Price::BulkBpsPrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::BulkBpsPrice::BillingCycleConfiguration] + # # @param bulk_bps_config [Orb::Models::Price::BulkBpsPrice::BulkBpsConfig] # # @param cadence [Symbol, Orb::Models::Price::BulkBpsPrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::BulkBpsPrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::BulkBpsPrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::BulkBpsPrice::Item] + # # @param maximum [Orb::Models::Price::BulkBpsPrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::BulkBpsPrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::BulkBpsPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::BulkBpsPrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :bulk_bps] # # # def initialize( @@ -1987,6 +3459,109 @@ class BulkBpsPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::BulkBpsPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::BulkBpsPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::BulkBpsPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class BulkBpsConfig < Orb::BaseModel + # @!attribute tiers + # Tiers for a bulk BPS pricing model where all usage is aggregated to a single + # tier based on total volume + # + # @return [Array] + required :tiers, -> { Orb::ArrayOf[Orb::Models::Price::BulkBpsPrice::BulkBpsConfig::Tier] } + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute bps + # Basis points to rate on + # + # @return [Float] + required :bps, Float + + # @!attribute maximum_amount + # Upper bound for tier + # + # @return [String, nil] + optional :maximum_amount, String, nil?: true + + # @!attribute per_unit_maximum + # The maximum amount to charge for any one event + # + # @return [String, nil] + optional :per_unit_maximum, String, nil?: true + + # @!parse + # # @param bps [Float] + # # @param maximum_amount [String, nil] + # # @param per_unit_maximum [String, nil] + # # + # def initialize(bps:, maximum_amount: nil, per_unit_maximum: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + # @abstract # # @example @@ -2022,6 +3597,136 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::BulkBpsPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::BulkBpsPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::BulkBpsPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -2044,6 +3749,26 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class BulkPrice < Orb::BaseModel @@ -2054,18 +3779,18 @@ class BulkPrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::BulkPrice::BillableMetric, nil] + required :billable_metric, -> { Orb::Models::Price::BulkPrice::BillableMetric }, nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::BulkPrice::BillingCycleConfiguration] + required :billing_cycle_configuration, -> { Orb::Models::Price::BulkPrice::BillingCycleConfiguration } # @!attribute bulk_config # - # @return [Orb::Models::BulkConfigModel] - required :bulk_config, -> { Orb::Models::BulkConfigModel } + # @return [Orb::Models::Price::BulkPrice::BulkConfig] + required :bulk_config, -> { Orb::Models::Price::BulkPrice::BulkConfig } # @!attribute cadence # @@ -2084,8 +3809,8 @@ class BulkPrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::BulkPrice::CreditAllocation, nil] + required :credit_allocation, -> { Orb::Models::Price::BulkPrice::CreditAllocation }, nil?: true # @!attribute currency # @@ -2109,18 +3834,20 @@ class BulkPrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::BulkPrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::BulkPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::BulkPrice::Item] + required :item, -> { Orb::Models::Price::BulkPrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::BulkPrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::BulkPrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -2138,8 +3865,8 @@ class BulkPrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::BulkPrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::BulkPrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -2168,35 +3895,35 @@ class BulkPrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::BulkPrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::BulkPrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param bulk_config [Orb::Models::BulkConfigModel] + # # @param billable_metric [Orb::Models::Price::BulkPrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::BulkPrice::BillingCycleConfiguration] + # # @param bulk_config [Orb::Models::Price::BulkPrice::BulkConfig] # # @param cadence [Symbol, Orb::Models::Price::BulkPrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::BulkPrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::BulkPrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::BulkPrice::Item] + # # @param maximum [Orb::Models::Price::BulkPrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::BulkPrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::BulkPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::BulkPrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :bulk] # # # def initialize( @@ -2231,6 +3958,101 @@ class BulkPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::BulkPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::BulkPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::BulkPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class BulkConfig < Orb::BaseModel + # @!attribute tiers + # Bulk tiers for rating based on total usage volume + # + # @return [Array] + required :tiers, -> { Orb::ArrayOf[Orb::Models::Price::BulkPrice::BulkConfig::Tier] } + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String + + # @!attribute maximum_units + # Upper bound for this tier + # + # @return [Float, nil] + optional :maximum_units, Float, nil?: true + + # @!parse + # # @param unit_amount [String] + # # @param maximum_units [Float, nil] + # # + # def initialize(unit_amount:, maximum_units: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + # @abstract # # @example @@ -2266,6 +4088,136 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::BulkPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::BulkPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::BulkPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -2288,6 +4240,26 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class ThresholdTotalAmountPrice < Orb::BaseModel @@ -2298,13 +4270,16 @@ class ThresholdTotalAmountPrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::ThresholdTotalAmountPrice::BillableMetric, nil] + required :billable_metric, + -> { Orb::Models::Price::ThresholdTotalAmountPrice::BillableMetric }, + nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::ThresholdTotalAmountPrice::BillingCycleConfiguration] + required :billing_cycle_configuration, + -> { Orb::Models::Price::ThresholdTotalAmountPrice::BillingCycleConfiguration } # @!attribute cadence # @@ -2323,8 +4298,10 @@ class ThresholdTotalAmountPrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::ThresholdTotalAmountPrice::CreditAllocation, nil] + required :credit_allocation, + -> { Orb::Models::Price::ThresholdTotalAmountPrice::CreditAllocation }, + nil?: true # @!attribute currency # @@ -2348,18 +4325,20 @@ class ThresholdTotalAmountPrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::ThresholdTotalAmountPrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::ThresholdTotalAmountPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::ThresholdTotalAmountPrice::Item] + required :item, -> { Orb::Models::Price::ThresholdTotalAmountPrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::ThresholdTotalAmountPrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::ThresholdTotalAmountPrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -2377,8 +4356,8 @@ class ThresholdTotalAmountPrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::ThresholdTotalAmountPrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::ThresholdTotalAmountPrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -2412,35 +4391,35 @@ class ThresholdTotalAmountPrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::ThresholdTotalAmountPrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::ThresholdTotalAmountPrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::ThresholdTotalAmountPrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::ThresholdTotalAmountPrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::ThresholdTotalAmountPrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::ThresholdTotalAmountPrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::ThresholdTotalAmountPrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::ThresholdTotalAmountPrice::Item] + # # @param maximum [Orb::Models::Price::ThresholdTotalAmountPrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::ThresholdTotalAmountPrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::ThresholdTotalAmountPrice::PriceType] # # @param threshold_total_amount_config [Hash{Symbol=>Object}] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::ThresholdTotalAmountPrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :threshold_total_amount] # # # def initialize( @@ -2475,6 +4454,64 @@ class ThresholdTotalAmountPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::ThresholdTotalAmountPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::ThresholdTotalAmountPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::ThresholdTotalAmountPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -2510,6 +4547,136 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::ThresholdTotalAmountPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::ThresholdTotalAmountPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::ThresholdTotalAmountPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -2532,6 +4699,26 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class TieredPackagePrice < Orb::BaseModel @@ -2542,13 +4729,14 @@ class TieredPackagePrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::TieredPackagePrice::BillableMetric, nil] + required :billable_metric, -> { Orb::Models::Price::TieredPackagePrice::BillableMetric }, nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::TieredPackagePrice::BillingCycleConfiguration] + required :billing_cycle_configuration, + -> { Orb::Models::Price::TieredPackagePrice::BillingCycleConfiguration } # @!attribute cadence # @@ -2567,8 +4755,8 @@ class TieredPackagePrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::TieredPackagePrice::CreditAllocation, nil] + required :credit_allocation, -> { Orb::Models::Price::TieredPackagePrice::CreditAllocation }, nil?: true # @!attribute currency # @@ -2592,18 +4780,20 @@ class TieredPackagePrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::TieredPackagePrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::TieredPackagePrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::TieredPackagePrice::Item] + required :item, -> { Orb::Models::Price::TieredPackagePrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::TieredPackagePrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::TieredPackagePrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -2621,8 +4811,8 @@ class TieredPackagePrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::TieredPackagePrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::TieredPackagePrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -2656,35 +4846,35 @@ class TieredPackagePrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::TieredPackagePrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::TieredPackagePrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::TieredPackagePrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::TieredPackagePrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::TieredPackagePrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::TieredPackagePrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::TieredPackagePrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::TieredPackagePrice::Item] + # # @param maximum [Orb::Models::Price::TieredPackagePrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::TieredPackagePrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::TieredPackagePrice::PriceType] # # @param tiered_package_config [Hash{Symbol=>Object}] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::TieredPackagePrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :tiered_package] # # # def initialize( @@ -2719,6 +4909,64 @@ class TieredPackagePrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::TieredPackagePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::TieredPackagePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::TieredPackagePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -2754,6 +5002,136 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::TieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::TieredPackagePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::TieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -2769,12 +5147,32 @@ class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price - finalize! + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String # @!parse - # # @return [Array] + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] # # - # def self.values; end + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void end end @@ -2786,13 +5184,14 @@ class GroupedTieredPrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::GroupedTieredPrice::BillableMetric, nil] + required :billable_metric, -> { Orb::Models::Price::GroupedTieredPrice::BillableMetric }, nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::GroupedTieredPrice::BillingCycleConfiguration] + required :billing_cycle_configuration, + -> { Orb::Models::Price::GroupedTieredPrice::BillingCycleConfiguration } # @!attribute cadence # @@ -2811,8 +5210,8 @@ class GroupedTieredPrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::GroupedTieredPrice::CreditAllocation, nil] + required :credit_allocation, -> { Orb::Models::Price::GroupedTieredPrice::CreditAllocation }, nil?: true # @!attribute currency # @@ -2841,18 +5240,20 @@ class GroupedTieredPrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::GroupedTieredPrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::GroupedTieredPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::GroupedTieredPrice::Item] + required :item, -> { Orb::Models::Price::GroupedTieredPrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::GroupedTieredPrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::GroupedTieredPrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -2870,8 +5271,8 @@ class GroupedTieredPrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::GroupedTieredPrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::GroupedTieredPrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -2900,35 +5301,35 @@ class GroupedTieredPrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::GroupedTieredPrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::GroupedTieredPrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::GroupedTieredPrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::GroupedTieredPrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::GroupedTieredPrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::GroupedTieredPrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param grouped_tiered_config [Hash{Symbol=>Object}] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::GroupedTieredPrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::GroupedTieredPrice::Item] + # # @param maximum [Orb::Models::Price::GroupedTieredPrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::GroupedTieredPrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::GroupedTieredPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::GroupedTieredPrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :grouped_tiered] # # # def initialize( @@ -2963,6 +5364,64 @@ class GroupedTieredPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::GroupedTieredPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::GroupedTieredPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::GroupedTieredPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -2998,6 +5457,136 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::GroupedTieredPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::GroupedTieredPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::GroupedTieredPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -3020,6 +5609,26 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class TieredWithMinimumPrice < Orb::BaseModel @@ -3030,13 +5639,14 @@ class TieredWithMinimumPrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::TieredWithMinimumPrice::BillableMetric, nil] + required :billable_metric, -> { Orb::Models::Price::TieredWithMinimumPrice::BillableMetric }, nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::TieredWithMinimumPrice::BillingCycleConfiguration] + required :billing_cycle_configuration, + -> { Orb::Models::Price::TieredWithMinimumPrice::BillingCycleConfiguration } # @!attribute cadence # @@ -3055,8 +5665,10 @@ class TieredWithMinimumPrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::TieredWithMinimumPrice::CreditAllocation, nil] + required :credit_allocation, + -> { Orb::Models::Price::TieredWithMinimumPrice::CreditAllocation }, + nil?: true # @!attribute currency # @@ -3080,18 +5692,20 @@ class TieredWithMinimumPrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::TieredWithMinimumPrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::TieredWithMinimumPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::TieredWithMinimumPrice::Item] + required :item, -> { Orb::Models::Price::TieredWithMinimumPrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::TieredWithMinimumPrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::TieredWithMinimumPrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -3109,8 +5723,8 @@ class TieredWithMinimumPrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::TieredWithMinimumPrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::TieredWithMinimumPrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -3144,35 +5758,35 @@ class TieredWithMinimumPrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::TieredWithMinimumPrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::TieredWithMinimumPrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::TieredWithMinimumPrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::TieredWithMinimumPrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::TieredWithMinimumPrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::TieredWithMinimumPrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::TieredWithMinimumPrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::TieredWithMinimumPrice::Item] + # # @param maximum [Orb::Models::Price::TieredWithMinimumPrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::TieredWithMinimumPrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::TieredWithMinimumPrice::PriceType] # # @param tiered_with_minimum_config [Hash{Symbol=>Object}] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::TieredWithMinimumPrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :tiered_with_minimum] # # # def initialize( @@ -3207,6 +5821,64 @@ class TieredWithMinimumPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::TieredWithMinimumPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::TieredWithMinimumPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::TieredWithMinimumPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -3242,6 +5914,136 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::TieredWithMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::TieredWithMinimumPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::TieredWithMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -3264,6 +6066,26 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class TieredPackageWithMinimumPrice < Orb::BaseModel @@ -3274,13 +6096,16 @@ class TieredPackageWithMinimumPrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::TieredPackageWithMinimumPrice::BillableMetric, nil] + required :billable_metric, + -> { Orb::Models::Price::TieredPackageWithMinimumPrice::BillableMetric }, + nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::TieredPackageWithMinimumPrice::BillingCycleConfiguration] + required :billing_cycle_configuration, + -> { Orb::Models::Price::TieredPackageWithMinimumPrice::BillingCycleConfiguration } # @!attribute cadence # @@ -3299,8 +6124,10 @@ class TieredPackageWithMinimumPrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::TieredPackageWithMinimumPrice::CreditAllocation, nil] + required :credit_allocation, + -> { Orb::Models::Price::TieredPackageWithMinimumPrice::CreditAllocation }, + nil?: true # @!attribute currency # @@ -3324,18 +6151,20 @@ class TieredPackageWithMinimumPrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::TieredPackageWithMinimumPrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::TieredPackageWithMinimumPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::TieredPackageWithMinimumPrice::Item] + required :item, -> { Orb::Models::Price::TieredPackageWithMinimumPrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::TieredPackageWithMinimumPrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::TieredPackageWithMinimumPrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -3353,8 +6182,8 @@ class TieredPackageWithMinimumPrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::TieredPackageWithMinimumPrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::TieredPackageWithMinimumPrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -3388,35 +6217,35 @@ class TieredPackageWithMinimumPrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::TieredPackageWithMinimumPrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::TieredPackageWithMinimumPrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::TieredPackageWithMinimumPrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::TieredPackageWithMinimumPrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::TieredPackageWithMinimumPrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::TieredPackageWithMinimumPrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::TieredPackageWithMinimumPrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::TieredPackageWithMinimumPrice::Item] + # # @param maximum [Orb::Models::Price::TieredPackageWithMinimumPrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::TieredPackageWithMinimumPrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::TieredPackageWithMinimumPrice::PriceType] # # @param tiered_package_with_minimum_config [Hash{Symbol=>Object}] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::TieredPackageWithMinimumPrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :tiered_package_with_minimum] # # # def initialize( @@ -3451,6 +6280,64 @@ class TieredPackageWithMinimumPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::TieredPackageWithMinimumPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::TieredPackageWithMinimumPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::TieredPackageWithMinimumPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -3486,6 +6373,136 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::TieredPackageWithMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::TieredPackageWithMinimumPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::TieredPackageWithMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -3508,6 +6525,26 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class PackageWithAllocationPrice < Orb::BaseModel @@ -3518,13 +6555,16 @@ class PackageWithAllocationPrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::PackageWithAllocationPrice::BillableMetric, nil] + required :billable_metric, + -> { Orb::Models::Price::PackageWithAllocationPrice::BillableMetric }, + nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::PackageWithAllocationPrice::BillingCycleConfiguration] + required :billing_cycle_configuration, + -> { Orb::Models::Price::PackageWithAllocationPrice::BillingCycleConfiguration } # @!attribute cadence # @@ -3543,8 +6583,10 @@ class PackageWithAllocationPrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::PackageWithAllocationPrice::CreditAllocation, nil] + required :credit_allocation, + -> { Orb::Models::Price::PackageWithAllocationPrice::CreditAllocation }, + nil?: true # @!attribute currency # @@ -3568,18 +6610,20 @@ class PackageWithAllocationPrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::PackageWithAllocationPrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::PackageWithAllocationPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::PackageWithAllocationPrice::Item] + required :item, -> { Orb::Models::Price::PackageWithAllocationPrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::PackageWithAllocationPrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::PackageWithAllocationPrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -3597,8 +6641,8 @@ class PackageWithAllocationPrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::PackageWithAllocationPrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::PackageWithAllocationPrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -3632,35 +6676,35 @@ class PackageWithAllocationPrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::PackageWithAllocationPrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::PackageWithAllocationPrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::PackageWithAllocationPrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::PackageWithAllocationPrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::PackageWithAllocationPrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::PackageWithAllocationPrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::PackageWithAllocationPrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::PackageWithAllocationPrice::Item] + # # @param maximum [Orb::Models::Price::PackageWithAllocationPrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::PackageWithAllocationPrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param package_with_allocation_config [Hash{Symbol=>Object}] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::PackageWithAllocationPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::PackageWithAllocationPrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :package_with_allocation] # # # def initialize( @@ -3695,6 +6739,64 @@ class PackageWithAllocationPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::PackageWithAllocationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::PackageWithAllocationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::PackageWithAllocationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -3730,6 +6832,136 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::PackageWithAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::PackageWithAllocationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::PackageWithAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -3752,6 +6984,26 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class UnitWithPercentPrice < Orb::BaseModel @@ -3762,13 +7014,14 @@ class UnitWithPercentPrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::UnitWithPercentPrice::BillableMetric, nil] + required :billable_metric, -> { Orb::Models::Price::UnitWithPercentPrice::BillableMetric }, nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::UnitWithPercentPrice::BillingCycleConfiguration] + required :billing_cycle_configuration, + -> { Orb::Models::Price::UnitWithPercentPrice::BillingCycleConfiguration } # @!attribute cadence # @@ -3787,8 +7040,8 @@ class UnitWithPercentPrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::UnitWithPercentPrice::CreditAllocation, nil] + required :credit_allocation, -> { Orb::Models::Price::UnitWithPercentPrice::CreditAllocation }, nil?: true # @!attribute currency # @@ -3812,18 +7065,20 @@ class UnitWithPercentPrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::UnitWithPercentPrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::UnitWithPercentPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::UnitWithPercentPrice::Item] + required :item, -> { Orb::Models::Price::UnitWithPercentPrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::UnitWithPercentPrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::UnitWithPercentPrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -3841,8 +7096,8 @@ class UnitWithPercentPrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::UnitWithPercentPrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::UnitWithPercentPrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -3876,35 +7131,35 @@ class UnitWithPercentPrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::UnitWithPercentPrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::UnitWithPercentPrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::UnitWithPercentPrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::UnitWithPercentPrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::UnitWithPercentPrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::UnitWithPercentPrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::UnitWithPercentPrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::UnitWithPercentPrice::Item] + # # @param maximum [Orb::Models::Price::UnitWithPercentPrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::UnitWithPercentPrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::UnitWithPercentPrice::PriceType] # # @param unit_with_percent_config [Hash{Symbol=>Object}] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::UnitWithPercentPrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :unit_with_percent] # # # def initialize( @@ -3939,6 +7194,64 @@ class UnitWithPercentPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::UnitWithPercentPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::UnitWithPercentPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::UnitWithPercentPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -3966,12 +7279,142 @@ class Cadence < Orb::Enum ANNUAL = :annual CUSTOM = :custom - finalize! + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::UnitWithPercentPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::UnitWithPercentPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::UnitWithPercentPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String # @!parse - # # @return [Array] + # # @param id [String] + # # @param name [String] # # - # def self.values; end + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void end # @abstract @@ -3996,6 +7439,26 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class MatrixWithAllocationPrice < Orb::BaseModel @@ -4006,13 +7469,16 @@ class MatrixWithAllocationPrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::MatrixWithAllocationPrice::BillableMetric, nil] + required :billable_metric, + -> { Orb::Models::Price::MatrixWithAllocationPrice::BillableMetric }, + nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::MatrixWithAllocationPrice::BillingCycleConfiguration] + required :billing_cycle_configuration, + -> { Orb::Models::Price::MatrixWithAllocationPrice::BillingCycleConfiguration } # @!attribute cadence # @@ -4031,8 +7497,10 @@ class MatrixWithAllocationPrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::MatrixWithAllocationPrice::CreditAllocation, nil] + required :credit_allocation, + -> { Orb::Models::Price::MatrixWithAllocationPrice::CreditAllocation }, + nil?: true # @!attribute currency # @@ -4056,23 +7524,26 @@ class MatrixWithAllocationPrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::MatrixWithAllocationPrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::MatrixWithAllocationPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::MatrixWithAllocationPrice::Item] + required :item, -> { Orb::Models::Price::MatrixWithAllocationPrice::Item } # @!attribute matrix_with_allocation_config # - # @return [Orb::Models::MatrixWithAllocationConfigModel] - required :matrix_with_allocation_config, -> { Orb::Models::MatrixWithAllocationConfigModel } + # @return [Orb::Models::Price::MatrixWithAllocationPrice::MatrixWithAllocationConfig] + required :matrix_with_allocation_config, + -> { Orb::Models::Price::MatrixWithAllocationPrice::MatrixWithAllocationConfig } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::MatrixWithAllocationPrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::MatrixWithAllocationPrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -4090,8 +7561,8 @@ class MatrixWithAllocationPrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::MatrixWithAllocationPrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::MatrixWithAllocationPrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -4120,35 +7591,35 @@ class MatrixWithAllocationPrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::MatrixWithAllocationPrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::MatrixWithAllocationPrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::MatrixWithAllocationPrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::MatrixWithAllocationPrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::MatrixWithAllocationPrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::MatrixWithAllocationPrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param matrix_with_allocation_config [Orb::Models::MatrixWithAllocationConfigModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::MatrixWithAllocationPrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::MatrixWithAllocationPrice::Item] + # # @param matrix_with_allocation_config [Orb::Models::Price::MatrixWithAllocationPrice::MatrixWithAllocationConfig] + # # @param maximum [Orb::Models::Price::MatrixWithAllocationPrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::MatrixWithAllocationPrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::MatrixWithAllocationPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::MatrixWithAllocationPrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :matrix_with_allocation] # # # def initialize( @@ -4183,6 +7654,64 @@ class MatrixWithAllocationPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::MatrixWithAllocationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::MatrixWithAllocationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::MatrixWithAllocationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -4218,6 +7747,197 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::MatrixWithAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::MatrixWithAllocationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::MatrixWithAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MatrixWithAllocationConfig < Orb::BaseModel + # @!attribute allocation + # Allocation to be used to calculate the price + # + # @return [Float] + required :allocation, Float + + # @!attribute default_unit_amount + # Default per unit rate for any usage not bucketed into a specified matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::ArrayOf[String, nil?: true] + + # @!attribute matrix_values + # Matrix values for specified matrix grouping keys + # + # @return [Array] + required :matrix_values, + -> { Orb::ArrayOf[Orb::Models::Price::MatrixWithAllocationPrice::MatrixWithAllocationConfig::MatrixValue] } + + # @!parse + # # @param allocation [Float] + # # @param default_unit_amount [String] + # # @param dimensions [Array] + # # @param matrix_values [Array] + # # + # def initialize(allocation:, default_unit_amount:, dimensions:, matrix_values:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class MatrixValue < Orb::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this Matrix value by. For example, + # ["region", "tier"] could be used to filter cloud usage by a cloud region and an + # instance tier. + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Unit price for the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!parse + # # @param dimension_values [Array] + # # @param unit_amount [String] + # # + # def initialize(dimension_values:, unit_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -4240,6 +7960,26 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class TieredWithProrationPrice < Orb::BaseModel @@ -4250,13 +7990,14 @@ class TieredWithProrationPrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::TieredWithProrationPrice::BillableMetric, nil] + required :billable_metric, -> { Orb::Models::Price::TieredWithProrationPrice::BillableMetric }, nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::TieredWithProrationPrice::BillingCycleConfiguration] + required :billing_cycle_configuration, + -> { Orb::Models::Price::TieredWithProrationPrice::BillingCycleConfiguration } # @!attribute cadence # @@ -4275,8 +8016,10 @@ class TieredWithProrationPrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::TieredWithProrationPrice::CreditAllocation, nil] + required :credit_allocation, + -> { Orb::Models::Price::TieredWithProrationPrice::CreditAllocation }, + nil?: true # @!attribute currency # @@ -4300,18 +8043,20 @@ class TieredWithProrationPrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::TieredWithProrationPrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::TieredWithProrationPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::TieredWithProrationPrice::Item] + required :item, -> { Orb::Models::Price::TieredWithProrationPrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::TieredWithProrationPrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::TieredWithProrationPrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -4329,8 +8074,8 @@ class TieredWithProrationPrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::TieredWithProrationPrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::TieredWithProrationPrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -4364,35 +8109,35 @@ class TieredWithProrationPrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::TieredWithProrationPrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::TieredWithProrationPrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::TieredWithProrationPrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::TieredWithProrationPrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::TieredWithProrationPrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::TieredWithProrationPrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::TieredWithProrationPrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::TieredWithProrationPrice::Item] + # # @param maximum [Orb::Models::Price::TieredWithProrationPrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::TieredWithProrationPrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::TieredWithProrationPrice::PriceType] # # @param tiered_with_proration_config [Hash{Symbol=>Object}] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::TieredWithProrationPrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :tiered_with_proration] # # # def initialize( @@ -4427,6 +8172,64 @@ class TieredWithProrationPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::TieredWithProrationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::TieredWithProrationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::TieredWithProrationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -4462,6 +8265,136 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::TieredWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::TieredWithProrationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::TieredWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -4484,6 +8417,26 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class UnitWithProrationPrice < Orb::BaseModel @@ -4494,13 +8447,14 @@ class UnitWithProrationPrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::UnitWithProrationPrice::BillableMetric, nil] + required :billable_metric, -> { Orb::Models::Price::UnitWithProrationPrice::BillableMetric }, nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::UnitWithProrationPrice::BillingCycleConfiguration] + required :billing_cycle_configuration, + -> { Orb::Models::Price::UnitWithProrationPrice::BillingCycleConfiguration } # @!attribute cadence # @@ -4519,8 +8473,10 @@ class UnitWithProrationPrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::UnitWithProrationPrice::CreditAllocation, nil] + required :credit_allocation, + -> { Orb::Models::Price::UnitWithProrationPrice::CreditAllocation }, + nil?: true # @!attribute currency # @@ -4544,18 +8500,20 @@ class UnitWithProrationPrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::UnitWithProrationPrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::UnitWithProrationPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::UnitWithProrationPrice::Item] + required :item, -> { Orb::Models::Price::UnitWithProrationPrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::UnitWithProrationPrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::UnitWithProrationPrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -4573,8 +8531,8 @@ class UnitWithProrationPrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::UnitWithProrationPrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::UnitWithProrationPrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -4608,35 +8566,35 @@ class UnitWithProrationPrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::UnitWithProrationPrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::UnitWithProrationPrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::UnitWithProrationPrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::UnitWithProrationPrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::UnitWithProrationPrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::UnitWithProrationPrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::UnitWithProrationPrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::UnitWithProrationPrice::Item] + # # @param maximum [Orb::Models::Price::UnitWithProrationPrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::UnitWithProrationPrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::UnitWithProrationPrice::PriceType] # # @param unit_with_proration_config [Hash{Symbol=>Object}] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::UnitWithProrationPrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :unit_with_proration] # # # def initialize( @@ -4671,6 +8629,64 @@ class UnitWithProrationPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::UnitWithProrationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::UnitWithProrationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::UnitWithProrationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -4706,6 +8722,136 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::UnitWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::UnitWithProrationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::UnitWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -4728,6 +8874,26 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class GroupedAllocationPrice < Orb::BaseModel @@ -4738,13 +8904,14 @@ class GroupedAllocationPrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::GroupedAllocationPrice::BillableMetric, nil] + required :billable_metric, -> { Orb::Models::Price::GroupedAllocationPrice::BillableMetric }, nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::GroupedAllocationPrice::BillingCycleConfiguration] + required :billing_cycle_configuration, + -> { Orb::Models::Price::GroupedAllocationPrice::BillingCycleConfiguration } # @!attribute cadence # @@ -4763,8 +8930,10 @@ class GroupedAllocationPrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::GroupedAllocationPrice::CreditAllocation, nil] + required :credit_allocation, + -> { Orb::Models::Price::GroupedAllocationPrice::CreditAllocation }, + nil?: true # @!attribute currency # @@ -4793,18 +8962,20 @@ class GroupedAllocationPrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::GroupedAllocationPrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::GroupedAllocationPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::GroupedAllocationPrice::Item] + required :item, -> { Orb::Models::Price::GroupedAllocationPrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::GroupedAllocationPrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::GroupedAllocationPrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -4822,8 +8993,8 @@ class GroupedAllocationPrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::GroupedAllocationPrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::GroupedAllocationPrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -4852,35 +9023,35 @@ class GroupedAllocationPrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::GroupedAllocationPrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::GroupedAllocationPrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::GroupedAllocationPrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::GroupedAllocationPrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::GroupedAllocationPrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::GroupedAllocationPrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param grouped_allocation_config [Hash{Symbol=>Object}] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::GroupedAllocationPrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::GroupedAllocationPrice::Item] + # # @param maximum [Orb::Models::Price::GroupedAllocationPrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::GroupedAllocationPrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::GroupedAllocationPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::GroupedAllocationPrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :grouped_allocation] # # # def initialize( @@ -4915,6 +9086,64 @@ class GroupedAllocationPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::GroupedAllocationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::GroupedAllocationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::GroupedAllocationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -4950,6 +9179,136 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::GroupedAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::GroupedAllocationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::GroupedAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -4968,9 +9327,29 @@ class PriceType < Orb::Enum finalize! # @!parse - # # @return [Array] + # # @return [Array] + # # + # def self.values; end + end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] # # - # def self.values; end + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void end end @@ -4982,13 +9361,16 @@ class GroupedWithProratedMinimumPrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::GroupedWithProratedMinimumPrice::BillableMetric, nil] + required :billable_metric, + -> { Orb::Models::Price::GroupedWithProratedMinimumPrice::BillableMetric }, + nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::GroupedWithProratedMinimumPrice::BillingCycleConfiguration] + required :billing_cycle_configuration, + -> { Orb::Models::Price::GroupedWithProratedMinimumPrice::BillingCycleConfiguration } # @!attribute cadence # @@ -5007,8 +9389,10 @@ class GroupedWithProratedMinimumPrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::GroupedWithProratedMinimumPrice::CreditAllocation, nil] + required :credit_allocation, + -> { Orb::Models::Price::GroupedWithProratedMinimumPrice::CreditAllocation }, + nil?: true # @!attribute currency # @@ -5037,18 +9421,20 @@ class GroupedWithProratedMinimumPrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::GroupedWithProratedMinimumPrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::GroupedWithProratedMinimumPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::GroupedWithProratedMinimumPrice::Item] + required :item, -> { Orb::Models::Price::GroupedWithProratedMinimumPrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::GroupedWithProratedMinimumPrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::GroupedWithProratedMinimumPrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -5066,8 +9452,8 @@ class GroupedWithProratedMinimumPrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::GroupedWithProratedMinimumPrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::GroupedWithProratedMinimumPrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -5096,35 +9482,35 @@ class GroupedWithProratedMinimumPrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::GroupedWithProratedMinimumPrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::GroupedWithProratedMinimumPrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::GroupedWithProratedMinimumPrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::GroupedWithProratedMinimumPrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::GroupedWithProratedMinimumPrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::GroupedWithProratedMinimumPrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param grouped_with_prorated_minimum_config [Hash{Symbol=>Object}] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::GroupedWithProratedMinimumPrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::GroupedWithProratedMinimumPrice::Item] + # # @param maximum [Orb::Models::Price::GroupedWithProratedMinimumPrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::GroupedWithProratedMinimumPrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::GroupedWithProratedMinimumPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::GroupedWithProratedMinimumPrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :grouped_with_prorated_minimum] # # # def initialize( @@ -5159,6 +9545,64 @@ class GroupedWithProratedMinimumPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::GroupedWithProratedMinimumPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::GroupedWithProratedMinimumPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::GroupedWithProratedMinimumPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -5194,6 +9638,136 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::GroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::GroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::GroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -5216,6 +9790,26 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class GroupedWithMeteredMinimumPrice < Orb::BaseModel @@ -5226,13 +9820,16 @@ class GroupedWithMeteredMinimumPrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillableMetric, nil] + required :billable_metric, + -> { Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillableMetric }, + nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillingCycleConfiguration] + required :billing_cycle_configuration, + -> { Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillingCycleConfiguration } # @!attribute cadence # @@ -5251,8 +9848,10 @@ class GroupedWithMeteredMinimumPrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::GroupedWithMeteredMinimumPrice::CreditAllocation, nil] + required :credit_allocation, + -> { Orb::Models::Price::GroupedWithMeteredMinimumPrice::CreditAllocation }, + nil?: true # @!attribute currency # @@ -5281,18 +9880,20 @@ class GroupedWithMeteredMinimumPrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::GroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::GroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::GroupedWithMeteredMinimumPrice::Item] + required :item, -> { Orb::Models::Price::GroupedWithMeteredMinimumPrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::GroupedWithMeteredMinimumPrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::GroupedWithMeteredMinimumPrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -5310,8 +9911,8 @@ class GroupedWithMeteredMinimumPrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::GroupedWithMeteredMinimumPrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::GroupedWithMeteredMinimumPrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -5340,35 +9941,35 @@ class GroupedWithMeteredMinimumPrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::GroupedWithMeteredMinimumPrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::GroupedWithMeteredMinimumPrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::GroupedWithMeteredMinimumPrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::GroupedWithMeteredMinimumPrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param grouped_with_metered_minimum_config [Hash{Symbol=>Object}] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::GroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::GroupedWithMeteredMinimumPrice::Item] + # # @param maximum [Orb::Models::Price::GroupedWithMeteredMinimumPrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::GroupedWithMeteredMinimumPrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::GroupedWithMeteredMinimumPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::GroupedWithMeteredMinimumPrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :grouped_with_metered_minimum] # # # def initialize( @@ -5403,6 +10004,64 @@ class GroupedWithMeteredMinimumPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -5438,6 +10097,136 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::GroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::GroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::GroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -5460,6 +10249,26 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class MatrixWithDisplayNamePrice < Orb::BaseModel @@ -5470,13 +10279,16 @@ class MatrixWithDisplayNamePrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::MatrixWithDisplayNamePrice::BillableMetric, nil] + required :billable_metric, + -> { Orb::Models::Price::MatrixWithDisplayNamePrice::BillableMetric }, + nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::MatrixWithDisplayNamePrice::BillingCycleConfiguration] + required :billing_cycle_configuration, + -> { Orb::Models::Price::MatrixWithDisplayNamePrice::BillingCycleConfiguration } # @!attribute cadence # @@ -5495,8 +10307,10 @@ class MatrixWithDisplayNamePrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::MatrixWithDisplayNamePrice::CreditAllocation, nil] + required :credit_allocation, + -> { Orb::Models::Price::MatrixWithDisplayNamePrice::CreditAllocation }, + nil?: true # @!attribute currency # @@ -5520,13 +10334,15 @@ class MatrixWithDisplayNamePrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::MatrixWithDisplayNamePrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::MatrixWithDisplayNamePrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::MatrixWithDisplayNamePrice::Item] + required :item, -> { Orb::Models::Price::MatrixWithDisplayNamePrice::Item } # @!attribute matrix_with_display_name_config # @@ -5535,8 +10351,8 @@ class MatrixWithDisplayNamePrice < Orb::BaseModel # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::MatrixWithDisplayNamePrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::MatrixWithDisplayNamePrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -5554,8 +10370,8 @@ class MatrixWithDisplayNamePrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::MatrixWithDisplayNamePrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::MatrixWithDisplayNamePrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -5584,35 +10400,35 @@ class MatrixWithDisplayNamePrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::MatrixWithDisplayNamePrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::MatrixWithDisplayNamePrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::MatrixWithDisplayNamePrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::MatrixWithDisplayNamePrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::MatrixWithDisplayNamePrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::MatrixWithDisplayNamePrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] + # # @param invoicing_cycle_configuration [Orb::Models::Price::MatrixWithDisplayNamePrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::MatrixWithDisplayNamePrice::Item] # # @param matrix_with_display_name_config [Hash{Symbol=>Object}] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param maximum [Orb::Models::Price::MatrixWithDisplayNamePrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::MatrixWithDisplayNamePrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::MatrixWithDisplayNamePrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::MatrixWithDisplayNamePrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :matrix_with_display_name] # # # def initialize( @@ -5647,6 +10463,64 @@ class MatrixWithDisplayNamePrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::MatrixWithDisplayNamePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::MatrixWithDisplayNamePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::MatrixWithDisplayNamePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -5682,6 +10556,136 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::MatrixWithDisplayNamePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::MatrixWithDisplayNamePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::MatrixWithDisplayNamePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -5704,6 +10708,26 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class BulkWithProrationPrice < Orb::BaseModel @@ -5714,13 +10738,14 @@ class BulkWithProrationPrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::BulkWithProrationPrice::BillableMetric, nil] + required :billable_metric, -> { Orb::Models::Price::BulkWithProrationPrice::BillableMetric }, nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::BulkWithProrationPrice::BillingCycleConfiguration] + required :billing_cycle_configuration, + -> { Orb::Models::Price::BulkWithProrationPrice::BillingCycleConfiguration } # @!attribute bulk_with_proration_config # @@ -5744,8 +10769,10 @@ class BulkWithProrationPrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::BulkWithProrationPrice::CreditAllocation, nil] + required :credit_allocation, + -> { Orb::Models::Price::BulkWithProrationPrice::CreditAllocation }, + nil?: true # @!attribute currency # @@ -5769,18 +10796,20 @@ class BulkWithProrationPrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::BulkWithProrationPrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::BulkWithProrationPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::BulkWithProrationPrice::Item] + required :item, -> { Orb::Models::Price::BulkWithProrationPrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::BulkWithProrationPrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::BulkWithProrationPrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -5798,8 +10827,8 @@ class BulkWithProrationPrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::BulkWithProrationPrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::BulkWithProrationPrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -5828,35 +10857,35 @@ class BulkWithProrationPrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::BulkWithProrationPrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::BulkWithProrationPrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::BulkWithProrationPrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::BulkWithProrationPrice::BillingCycleConfiguration] # # @param bulk_with_proration_config [Hash{Symbol=>Object}] # # @param cadence [Symbol, Orb::Models::Price::BulkWithProrationPrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::BulkWithProrationPrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::BulkWithProrationPrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::BulkWithProrationPrice::Item] + # # @param maximum [Orb::Models::Price::BulkWithProrationPrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::BulkWithProrationPrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::BulkWithProrationPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::BulkWithProrationPrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :bulk_with_proration] # # # def initialize( @@ -5891,6 +10920,64 @@ class BulkWithProrationPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::BulkWithProrationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::BulkWithProrationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::BulkWithProrationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -5926,6 +11013,136 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::BulkWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::BulkWithProrationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::BulkWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -5948,6 +11165,26 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class GroupedTieredPackagePrice < Orb::BaseModel @@ -5958,13 +11195,16 @@ class GroupedTieredPackagePrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::GroupedTieredPackagePrice::BillableMetric, nil] + required :billable_metric, + -> { Orb::Models::Price::GroupedTieredPackagePrice::BillableMetric }, + nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::GroupedTieredPackagePrice::BillingCycleConfiguration] + required :billing_cycle_configuration, + -> { Orb::Models::Price::GroupedTieredPackagePrice::BillingCycleConfiguration } # @!attribute cadence # @@ -5983,8 +11223,10 @@ class GroupedTieredPackagePrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::GroupedTieredPackagePrice::CreditAllocation, nil] + required :credit_allocation, + -> { Orb::Models::Price::GroupedTieredPackagePrice::CreditAllocation }, + nil?: true # @!attribute currency # @@ -6013,18 +11255,20 @@ class GroupedTieredPackagePrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::GroupedTieredPackagePrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::GroupedTieredPackagePrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::GroupedTieredPackagePrice::Item] + required :item, -> { Orb::Models::Price::GroupedTieredPackagePrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::GroupedTieredPackagePrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::GroupedTieredPackagePrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -6042,8 +11286,8 @@ class GroupedTieredPackagePrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::GroupedTieredPackagePrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::GroupedTieredPackagePrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -6072,35 +11316,35 @@ class GroupedTieredPackagePrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::GroupedTieredPackagePrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::GroupedTieredPackagePrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::GroupedTieredPackagePrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::GroupedTieredPackagePrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::GroupedTieredPackagePrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::GroupedTieredPackagePrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param grouped_tiered_package_config [Hash{Symbol=>Object}] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::GroupedTieredPackagePrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::GroupedTieredPackagePrice::Item] + # # @param maximum [Orb::Models::Price::GroupedTieredPackagePrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::GroupedTieredPackagePrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::GroupedTieredPackagePrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::GroupedTieredPackagePrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :grouped_tiered_package] # # # def initialize( @@ -6135,6 +11379,64 @@ class GroupedTieredPackagePrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::GroupedTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::GroupedTieredPackagePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::GroupedTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -6162,12 +11464,142 @@ class Cadence < Orb::Enum ANNUAL = :annual CUSTOM = :custom - finalize! + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::GroupedTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::GroupedTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit } # @!parse - # # @return [Array] + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::GroupedTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] # # - # def self.values; end + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void end # @abstract @@ -6192,6 +11624,26 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class MaxGroupTieredPackagePrice < Orb::BaseModel @@ -6202,13 +11654,16 @@ class MaxGroupTieredPackagePrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::MaxGroupTieredPackagePrice::BillableMetric, nil] + required :billable_metric, + -> { Orb::Models::Price::MaxGroupTieredPackagePrice::BillableMetric }, + nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::MaxGroupTieredPackagePrice::BillingCycleConfiguration] + required :billing_cycle_configuration, + -> { Orb::Models::Price::MaxGroupTieredPackagePrice::BillingCycleConfiguration } # @!attribute cadence # @@ -6227,8 +11682,10 @@ class MaxGroupTieredPackagePrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::MaxGroupTieredPackagePrice::CreditAllocation, nil] + required :credit_allocation, + -> { Orb::Models::Price::MaxGroupTieredPackagePrice::CreditAllocation }, + nil?: true # @!attribute currency # @@ -6252,13 +11709,15 @@ class MaxGroupTieredPackagePrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::MaxGroupTieredPackagePrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::MaxGroupTieredPackagePrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::MaxGroupTieredPackagePrice::Item] + required :item, -> { Orb::Models::Price::MaxGroupTieredPackagePrice::Item } # @!attribute max_group_tiered_package_config # @@ -6267,8 +11726,8 @@ class MaxGroupTieredPackagePrice < Orb::BaseModel # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::MaxGroupTieredPackagePrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::MaxGroupTieredPackagePrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -6286,8 +11745,8 @@ class MaxGroupTieredPackagePrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::MaxGroupTieredPackagePrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::MaxGroupTieredPackagePrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -6316,35 +11775,35 @@ class MaxGroupTieredPackagePrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::MaxGroupTieredPackagePrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::MaxGroupTieredPackagePrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::MaxGroupTieredPackagePrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::MaxGroupTieredPackagePrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::MaxGroupTieredPackagePrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::MaxGroupTieredPackagePrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] + # # @param invoicing_cycle_configuration [Orb::Models::Price::MaxGroupTieredPackagePrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::MaxGroupTieredPackagePrice::Item] # # @param max_group_tiered_package_config [Hash{Symbol=>Object}] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param maximum [Orb::Models::Price::MaxGroupTieredPackagePrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::MaxGroupTieredPackagePrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::MaxGroupTieredPackagePrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::MaxGroupTieredPackagePrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :max_group_tiered_package] # # # def initialize( @@ -6379,6 +11838,64 @@ class MaxGroupTieredPackagePrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::MaxGroupTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::MaxGroupTieredPackagePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::MaxGroupTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -6414,6 +11931,136 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::MaxGroupTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::MaxGroupTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::MaxGroupTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -6436,6 +12083,26 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class ScalableMatrixWithUnitPricingPrice < Orb::BaseModel @@ -6446,13 +12113,16 @@ class ScalableMatrixWithUnitPricingPrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillableMetric, nil] + required :billable_metric, + -> { Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillableMetric }, + nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration] + required :billing_cycle_configuration, + -> { Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration } # @!attribute cadence # @@ -6471,8 +12141,10 @@ class ScalableMatrixWithUnitPricingPrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::CreditAllocation, nil] + required :credit_allocation, + -> { Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::CreditAllocation }, + nil?: true # @!attribute currency # @@ -6496,18 +12168,20 @@ class ScalableMatrixWithUnitPricingPrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Item] + required :item, -> { Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -6525,8 +12199,8 @@ class ScalableMatrixWithUnitPricingPrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -6560,35 +12234,35 @@ class ScalableMatrixWithUnitPricingPrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Item] + # # @param maximum [Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::PriceType] # # @param scalable_matrix_with_unit_pricing_config [Hash{Symbol=>Object}] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :scalable_matrix_with_unit_pricing] # # # def initialize( @@ -6623,6 +12297,64 @@ class ScalableMatrixWithUnitPricingPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -6658,6 +12390,136 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -6680,6 +12542,26 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class ScalableMatrixWithTieredPricingPrice < Orb::BaseModel @@ -6690,13 +12572,16 @@ class ScalableMatrixWithTieredPricingPrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillableMetric, nil] + required :billable_metric, + -> { Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillableMetric }, + nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration] + required :billing_cycle_configuration, + -> { Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration } # @!attribute cadence # @@ -6715,8 +12600,10 @@ class ScalableMatrixWithTieredPricingPrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::CreditAllocation, nil] + required :credit_allocation, + -> { Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::CreditAllocation }, + nil?: true # @!attribute currency # @@ -6740,18 +12627,20 @@ class ScalableMatrixWithTieredPricingPrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Item] + required :item, -> { Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -6769,8 +12658,8 @@ class ScalableMatrixWithTieredPricingPrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -6804,35 +12693,35 @@ class ScalableMatrixWithTieredPricingPrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::CreditAllocation, nil] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Item] + # # @param maximum [Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::PriceType] # # @param scalable_matrix_with_tiered_pricing_config [Hash{Symbol=>Object}] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :scalable_matrix_with_tiered_pricing] # # # def initialize( @@ -6867,6 +12756,64 @@ class ScalableMatrixWithTieredPricingPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -6902,6 +12849,136 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -6924,6 +13001,26 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end class CumulativeGroupedBulkPrice < Orb::BaseModel @@ -6934,13 +13031,16 @@ class CumulativeGroupedBulkPrice < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true + # @return [Orb::Models::Price::CumulativeGroupedBulkPrice::BillableMetric, nil] + required :billable_metric, + -> { Orb::Models::Price::CumulativeGroupedBulkPrice::BillableMetric }, + nil?: true # @!attribute billing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } + # @return [Orb::Models::Price::CumulativeGroupedBulkPrice::BillingCycleConfiguration] + required :billing_cycle_configuration, + -> { Orb::Models::Price::CumulativeGroupedBulkPrice::BillingCycleConfiguration } # @!attribute cadence # @@ -6959,8 +13059,10 @@ class CumulativeGroupedBulkPrice < Orb::BaseModel # @!attribute credit_allocation # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true + # @return [Orb::Models::Price::CumulativeGroupedBulkPrice::CreditAllocation, nil] + required :credit_allocation, + -> { Orb::Models::Price::CumulativeGroupedBulkPrice::CreditAllocation }, + nil?: true # @!attribute cumulative_grouped_bulk_config # @@ -6989,18 +13091,20 @@ class CumulativeGroupedBulkPrice < Orb::BaseModel # @!attribute invoicing_cycle_configuration # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true + # @return [Orb::Models::Price::CumulativeGroupedBulkPrice::InvoicingCycleConfiguration, nil] + required :invoicing_cycle_configuration, + -> { Orb::Models::Price::CumulativeGroupedBulkPrice::InvoicingCycleConfiguration }, + nil?: true # @!attribute item # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } + # @return [Orb::Models::Price::CumulativeGroupedBulkPrice::Item] + required :item, -> { Orb::Models::Price::CumulativeGroupedBulkPrice::Item } # @!attribute maximum # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true + # @return [Orb::Models::Price::CumulativeGroupedBulkPrice::Maximum, nil] + required :maximum, -> { Orb::Models::Price::CumulativeGroupedBulkPrice::Maximum }, nil?: true # @!attribute maximum_amount # @@ -7018,8 +13122,8 @@ class CumulativeGroupedBulkPrice < Orb::BaseModel # @!attribute minimum # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true + # @return [Orb::Models::Price::CumulativeGroupedBulkPrice::Minimum, nil] + required :minimum, -> { Orb::Models::Price::CumulativeGroupedBulkPrice::Minimum }, nil?: true # @!attribute minimum_amount # @@ -7048,35 +13152,35 @@ class CumulativeGroupedBulkPrice < Orb::BaseModel # @!attribute dimensional_price_configuration # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] + # @return [Orb::Models::Price::CumulativeGroupedBulkPrice::DimensionalPriceConfiguration, nil] optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, + -> { Orb::Models::Price::CumulativeGroupedBulkPrice::DimensionalPriceConfiguration }, nil?: true # @!parse # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] + # # @param billable_metric [Orb::Models::Price::CumulativeGroupedBulkPrice::BillableMetric, nil] + # # @param billing_cycle_configuration [Orb::Models::Price::CumulativeGroupedBulkPrice::BillingCycleConfiguration] # # @param cadence [Symbol, Orb::Models::Price::CumulativeGroupedBulkPrice::Cadence] # # @param conversion_rate [Float, nil] # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] + # # @param credit_allocation [Orb::Models::Price::CumulativeGroupedBulkPrice::CreditAllocation, nil] # # @param cumulative_grouped_bulk_config [Hash{Symbol=>Object}] # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] + # # @param invoicing_cycle_configuration [Orb::Models::Price::CumulativeGroupedBulkPrice::InvoicingCycleConfiguration, nil] + # # @param item [Orb::Models::Price::CumulativeGroupedBulkPrice::Item] + # # @param maximum [Orb::Models::Price::CumulativeGroupedBulkPrice::Maximum, nil] # # @param maximum_amount [String, nil] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] + # # @param minimum [Orb::Models::Price::CumulativeGroupedBulkPrice::Minimum, nil] # # @param minimum_amount [String, nil] # # @param name [String] # # @param plan_phase_order [Integer, nil] # # @param price_type [Symbol, Orb::Models::Price::CumulativeGroupedBulkPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] + # # @param dimensional_price_configuration [Orb::Models::Price::CumulativeGroupedBulkPrice::DimensionalPriceConfiguration, nil] # # @param model_type [Symbol, :cumulative_grouped_bulk] # # # def initialize( @@ -7111,6 +13215,64 @@ class CumulativeGroupedBulkPrice < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!parse + # # @param id [String] + # # + # def initialize(id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::CumulativeGroupedBulkPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::CumulativeGroupedBulkPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::CumulativeGroupedBulkPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -7146,6 +13308,136 @@ class Cadence < Orb::Enum # def self.values; end end + class CreditAllocation < Orb::BaseModel + # @!attribute allows_rollover + # + # @return [Boolean] + required :allows_rollover, Orb::BooleanModel + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!parse + # # @param allows_rollover [Boolean] + # # @param currency [String] + # # + # def initialize(allows_rollover:, currency:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # + # @return [Symbol, Orb::Models::Price::CumulativeGroupedBulkPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::Price::CumulativeGroupedBulkPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::Price::CumulativeGroupedBulkPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Item < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Maximum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # Maximum amount applied + # + # @return [String] + required :maximum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Minimum < Orb::BaseModel + # @!attribute applies_to_price_ids + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute minimum_amount + # Minimum amount applied + # + # @return [String] + required :minimum_amount, String + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param minimum_amount [String] + # # + # def initialize(applies_to_price_ids:, minimum_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -7168,6 +13460,26 @@ class PriceType < Orb::Enum # # # def self.values; end end + + class DimensionalPriceConfiguration < Orb::BaseModel + # @!attribute dimension_values + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String] + + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!parse + # # @param dimension_values [Array] + # # @param dimensional_price_group_id [String] + # # + # def initialize(dimension_values:, dimensional_price_group_id:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end end end diff --git a/lib/orb/models/price_create_params.rb b/lib/orb/models/price_create_params.rb index c69c1bbb..404119dd 100644 --- a/lib/orb/models/price_create_params.rb +++ b/lib/orb/models/price_create_params.rb @@ -7,18 +7,846 @@ class PriceCreateParams < Orb::BaseModel # extend Orb::RequestParameters::Converter include Orb::RequestParameters - # @!attribute new_floating_price_model + # @!attribute cadence + # The cadence to bill for this price on. # - # @return [Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice, Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice, Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice, Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice, Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice, Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice] - required :new_floating_price_model, union: -> { Orb::Models::NewFloatingPriceModel } + # @return [Symbol, Orb::Models::PriceCreateParams::Cadence] + required :cadence, enum: -> { Orb::Models::PriceCreateParams::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, Orb::Models::PriceCreateParams::ModelType] + required :model_type, enum: -> { Orb::Models::PriceCreateParams::ModelType } + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute unit_config + # + # @return [Orb::Models::PriceCreateParams::UnitConfig] + required :unit_config, -> { Orb::Models::PriceCreateParams::UnitConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::PriceCreateParams::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::PriceCreateParams::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::PriceCreateParams::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::PriceCreateParams::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute package_config + # + # @return [Orb::Models::PriceCreateParams::PackageConfig] + required :package_config, -> { Orb::Models::PriceCreateParams::PackageConfig } + + # @!attribute matrix_config + # + # @return [Orb::Models::PriceCreateParams::MatrixConfig] + required :matrix_config, -> { Orb::Models::PriceCreateParams::MatrixConfig } + + # @!attribute matrix_with_allocation_config + # + # @return [Orb::Models::PriceCreateParams::MatrixWithAllocationConfig] + required :matrix_with_allocation_config, -> { Orb::Models::PriceCreateParams::MatrixWithAllocationConfig } + + # @!attribute tiered_config + # + # @return [Orb::Models::PriceCreateParams::TieredConfig] + required :tiered_config, -> { Orb::Models::PriceCreateParams::TieredConfig } + + # @!attribute tiered_bps_config + # + # @return [Orb::Models::PriceCreateParams::TieredBpsConfig] + required :tiered_bps_config, -> { Orb::Models::PriceCreateParams::TieredBpsConfig } + + # @!attribute bps_config + # + # @return [Orb::Models::PriceCreateParams::BpsConfig] + required :bps_config, -> { Orb::Models::PriceCreateParams::BpsConfig } + + # @!attribute bulk_bps_config + # + # @return [Orb::Models::PriceCreateParams::BulkBpsConfig] + required :bulk_bps_config, -> { Orb::Models::PriceCreateParams::BulkBpsConfig } + + # @!attribute bulk_config + # + # @return [Orb::Models::PriceCreateParams::BulkConfig] + required :bulk_config, -> { Orb::Models::PriceCreateParams::BulkConfig } + + # @!attribute threshold_total_amount_config + # + # @return [Hash{Symbol=>Object}] + required :threshold_total_amount_config, Orb::HashOf[Orb::Unknown] + + # @!attribute tiered_package_config + # + # @return [Hash{Symbol=>Object}] + required :tiered_package_config, Orb::HashOf[Orb::Unknown] + + # @!attribute grouped_tiered_config + # + # @return [Hash{Symbol=>Object}] + required :grouped_tiered_config, Orb::HashOf[Orb::Unknown] + + # @!attribute max_group_tiered_package_config + # + # @return [Hash{Symbol=>Object}] + required :max_group_tiered_package_config, Orb::HashOf[Orb::Unknown] + + # @!attribute tiered_with_minimum_config + # + # @return [Hash{Symbol=>Object}] + required :tiered_with_minimum_config, Orb::HashOf[Orb::Unknown] + + # @!attribute package_with_allocation_config + # + # @return [Hash{Symbol=>Object}] + required :package_with_allocation_config, Orb::HashOf[Orb::Unknown] + + # @!attribute tiered_package_with_minimum_config + # + # @return [Hash{Symbol=>Object}] + required :tiered_package_with_minimum_config, Orb::HashOf[Orb::Unknown] + + # @!attribute unit_with_percent_config + # + # @return [Hash{Symbol=>Object}] + required :unit_with_percent_config, Orb::HashOf[Orb::Unknown] + + # @!attribute tiered_with_proration_config + # + # @return [Hash{Symbol=>Object}] + required :tiered_with_proration_config, Orb::HashOf[Orb::Unknown] + + # @!attribute unit_with_proration_config + # + # @return [Hash{Symbol=>Object}] + required :unit_with_proration_config, Orb::HashOf[Orb::Unknown] + + # @!attribute grouped_allocation_config + # + # @return [Hash{Symbol=>Object}] + required :grouped_allocation_config, Orb::HashOf[Orb::Unknown] + + # @!attribute grouped_with_prorated_minimum_config + # + # @return [Hash{Symbol=>Object}] + required :grouped_with_prorated_minimum_config, Orb::HashOf[Orb::Unknown] + + # @!attribute grouped_with_metered_minimum_config + # + # @return [Hash{Symbol=>Object}] + required :grouped_with_metered_minimum_config, Orb::HashOf[Orb::Unknown] + + # @!attribute matrix_with_display_name_config + # + # @return [Hash{Symbol=>Object}] + required :matrix_with_display_name_config, Orb::HashOf[Orb::Unknown] + + # @!attribute bulk_with_proration_config + # + # @return [Hash{Symbol=>Object}] + required :bulk_with_proration_config, Orb::HashOf[Orb::Unknown] + + # @!attribute grouped_tiered_package_config + # + # @return [Hash{Symbol=>Object}] + required :grouped_tiered_package_config, Orb::HashOf[Orb::Unknown] + + # @!attribute scalable_matrix_with_unit_pricing_config + # + # @return [Hash{Symbol=>Object}] + required :scalable_matrix_with_unit_pricing_config, Orb::HashOf[Orb::Unknown] + + # @!attribute scalable_matrix_with_tiered_pricing_config + # + # @return [Hash{Symbol=>Object}] + required :scalable_matrix_with_tiered_pricing_config, Orb::HashOf[Orb::Unknown] + + # @!attribute cumulative_grouped_bulk_config + # + # @return [Hash{Symbol=>Object}] + required :cumulative_grouped_bulk_config, Orb::HashOf[Orb::Unknown] # @!parse - # # @param new_floating_price_model [Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice, Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice, Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice, Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice, Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice, Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice] + # # @param cadence [Symbol, Orb::Models::PriceCreateParams::Cadence] + # # @param currency [String] + # # @param item_id [String] + # # @param model_type [Symbol, Orb::Models::PriceCreateParams::ModelType] + # # @param name [String] + # # @param unit_config [Orb::Models::PriceCreateParams::UnitConfig] + # # @param package_config [Orb::Models::PriceCreateParams::PackageConfig] + # # @param matrix_config [Orb::Models::PriceCreateParams::MatrixConfig] + # # @param matrix_with_allocation_config [Orb::Models::PriceCreateParams::MatrixWithAllocationConfig] + # # @param tiered_config [Orb::Models::PriceCreateParams::TieredConfig] + # # @param tiered_bps_config [Orb::Models::PriceCreateParams::TieredBpsConfig] + # # @param bps_config [Orb::Models::PriceCreateParams::BpsConfig] + # # @param bulk_bps_config [Orb::Models::PriceCreateParams::BulkBpsConfig] + # # @param bulk_config [Orb::Models::PriceCreateParams::BulkConfig] + # # @param threshold_total_amount_config [Hash{Symbol=>Object}] + # # @param tiered_package_config [Hash{Symbol=>Object}] + # # @param grouped_tiered_config [Hash{Symbol=>Object}] + # # @param max_group_tiered_package_config [Hash{Symbol=>Object}] + # # @param tiered_with_minimum_config [Hash{Symbol=>Object}] + # # @param package_with_allocation_config [Hash{Symbol=>Object}] + # # @param tiered_package_with_minimum_config [Hash{Symbol=>Object}] + # # @param unit_with_percent_config [Hash{Symbol=>Object}] + # # @param tiered_with_proration_config [Hash{Symbol=>Object}] + # # @param unit_with_proration_config [Hash{Symbol=>Object}] + # # @param grouped_allocation_config [Hash{Symbol=>Object}] + # # @param grouped_with_prorated_minimum_config [Hash{Symbol=>Object}] + # # @param grouped_with_metered_minimum_config [Hash{Symbol=>Object}] + # # @param matrix_with_display_name_config [Hash{Symbol=>Object}] + # # @param bulk_with_proration_config [Hash{Symbol=>Object}] + # # @param grouped_tiered_package_config [Hash{Symbol=>Object}] + # # @param scalable_matrix_with_unit_pricing_config [Hash{Symbol=>Object}] + # # @param scalable_matrix_with_tiered_pricing_config [Hash{Symbol=>Object}] + # # @param cumulative_grouped_bulk_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::PriceCreateParams::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::PriceCreateParams::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] # # - # def initialize(new_floating_price_model:, request_options: {}, **) = super + # def initialize( + # cadence:, + # currency:, + # item_id:, + # model_type:, + # name:, + # unit_config:, + # package_config:, + # matrix_config:, + # matrix_with_allocation_config:, + # tiered_config:, + # tiered_bps_config:, + # bps_config:, + # bulk_bps_config:, + # bulk_config:, + # threshold_total_amount_config:, + # tiered_package_config:, + # grouped_tiered_config:, + # max_group_tiered_package_config:, + # tiered_with_minimum_config:, + # package_with_allocation_config:, + # tiered_package_with_minimum_config:, + # unit_with_percent_config:, + # tiered_with_proration_config:, + # unit_with_proration_config:, + # grouped_allocation_config:, + # grouped_with_prorated_minimum_config:, + # grouped_with_metered_minimum_config:, + # matrix_with_display_name_config:, + # bulk_with_proration_config:, + # grouped_tiered_package_config:, + # scalable_matrix_with_unit_pricing_config:, + # scalable_matrix_with_tiered_pricing_config:, + # cumulative_grouped_bulk_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # request_options: {}, + # ** + # ) + # super + # end # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + # @abstract + # + # @example + # ```ruby + # case model_type + # in :cumulative_grouped_bulk + # # ... + # end + # ``` + class ModelType < Orb::Enum + CUMULATIVE_GROUPED_BULK = :cumulative_grouped_bulk + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class UnitConfig < Orb::BaseModel + # @!attribute unit_amount + # Rate per unit of usage + # + # @return [String] + required :unit_amount, String + + # @!parse + # # @param unit_amount [String] + # # + # def initialize(unit_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PriceCreateParams::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PriceCreateParams::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PriceCreateParams::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::PriceCreateParams::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::PriceCreateParams::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::PriceCreateParams::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class PackageConfig < Orb::BaseModel + # @!attribute package_amount + # A currency amount to rate usage by + # + # @return [String] + required :package_amount, String + + # @!attribute package_size + # An integer amount to represent package size. For example, 1000 here would divide + # usage by 1000 before multiplying by package_amount in rating + # + # @return [Integer] + required :package_size, Integer + + # @!parse + # # @param package_amount [String] + # # @param package_size [Integer] + # # + # def initialize(package_amount:, package_size:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MatrixConfig < Orb::BaseModel + # @!attribute default_unit_amount + # Default per unit rate for any usage not bucketed into a specified matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::ArrayOf[String, nil?: true] + + # @!attribute matrix_values + # Matrix values for specified matrix grouping keys + # + # @return [Array] + required :matrix_values, -> { Orb::ArrayOf[Orb::Models::PriceCreateParams::MatrixConfig::MatrixValue] } + + # @!parse + # # @param default_unit_amount [String] + # # @param dimensions [Array] + # # @param matrix_values [Array] + # # + # def initialize(default_unit_amount:, dimensions:, matrix_values:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class MatrixValue < Orb::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this Matrix value by. For example, + # ["region", "tier"] could be used to filter cloud usage by a cloud region and an + # instance tier. + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Unit price for the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!parse + # # @param dimension_values [Array] + # # @param unit_amount [String] + # # + # def initialize(dimension_values:, unit_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class MatrixWithAllocationConfig < Orb::BaseModel + # @!attribute allocation + # Allocation to be used to calculate the price + # + # @return [Float] + required :allocation, Float + + # @!attribute default_unit_amount + # Default per unit rate for any usage not bucketed into a specified matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::ArrayOf[String, nil?: true] + + # @!attribute matrix_values + # Matrix values for specified matrix grouping keys + # + # @return [Array] + required :matrix_values, + -> { Orb::ArrayOf[Orb::Models::PriceCreateParams::MatrixWithAllocationConfig::MatrixValue] } + + # @!parse + # # @param allocation [Float] + # # @param default_unit_amount [String] + # # @param dimensions [Array] + # # @param matrix_values [Array] + # # + # def initialize(allocation:, default_unit_amount:, dimensions:, matrix_values:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class MatrixValue < Orb::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this Matrix value by. For example, + # ["region", "tier"] could be used to filter cloud usage by a cloud region and an + # instance tier. + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Unit price for the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!parse + # # @param dimension_values [Array] + # # @param unit_amount [String] + # # + # def initialize(dimension_values:, unit_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class TieredConfig < Orb::BaseModel + # @!attribute tiers + # Tiers for rating based on total usage quantities into the specified tier + # + # @return [Array] + required :tiers, -> { Orb::ArrayOf[Orb::Models::PriceCreateParams::TieredConfig::Tier] } + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute first_unit + # Inclusive tier starting value + # + # @return [Float] + required :first_unit, Float + + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String + + # @!attribute last_unit + # Exclusive tier ending value. If null, this is treated as the last tier + # + # @return [Float, nil] + optional :last_unit, Float, nil?: true + + # @!parse + # # @param first_unit [Float] + # # @param unit_amount [String] + # # @param last_unit [Float, nil] + # # + # def initialize(first_unit:, unit_amount:, last_unit: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class TieredBpsConfig < Orb::BaseModel + # @!attribute tiers + # Tiers for a Graduated BPS pricing model, where usage is bucketed into specified + # tiers + # + # @return [Array] + required :tiers, -> { Orb::ArrayOf[Orb::Models::PriceCreateParams::TieredBpsConfig::Tier] } + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute bps + # Per-event basis point rate + # + # @return [Float] + required :bps, Float + + # @!attribute minimum_amount + # Inclusive tier starting value + # + # @return [String] + required :minimum_amount, String + + # @!attribute maximum_amount + # Exclusive tier ending value + # + # @return [String, nil] + optional :maximum_amount, String, nil?: true + + # @!attribute per_unit_maximum + # Per unit maximum to charge + # + # @return [String, nil] + optional :per_unit_maximum, String, nil?: true + + # @!parse + # # @param bps [Float] + # # @param minimum_amount [String] + # # @param maximum_amount [String, nil] + # # @param per_unit_maximum [String, nil] + # # + # def initialize(bps:, minimum_amount:, maximum_amount: nil, per_unit_maximum: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class BpsConfig < Orb::BaseModel + # @!attribute bps + # Basis point take rate per event + # + # @return [Float] + required :bps, Float + + # @!attribute per_unit_maximum + # Optional currency amount maximum to cap spend per event + # + # @return [String, nil] + optional :per_unit_maximum, String, nil?: true + + # @!parse + # # @param bps [Float] + # # @param per_unit_maximum [String, nil] + # # + # def initialize(bps:, per_unit_maximum: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BulkBpsConfig < Orb::BaseModel + # @!attribute tiers + # Tiers for a bulk BPS pricing model where all usage is aggregated to a single + # tier based on total volume + # + # @return [Array] + required :tiers, -> { Orb::ArrayOf[Orb::Models::PriceCreateParams::BulkBpsConfig::Tier] } + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute bps + # Basis points to rate on + # + # @return [Float] + required :bps, Float + + # @!attribute maximum_amount + # Upper bound for tier + # + # @return [String, nil] + optional :maximum_amount, String, nil?: true + + # @!attribute per_unit_maximum + # The maximum amount to charge for any one event + # + # @return [String, nil] + optional :per_unit_maximum, String, nil?: true + + # @!parse + # # @param bps [Float] + # # @param maximum_amount [String, nil] + # # @param per_unit_maximum [String, nil] + # # + # def initialize(bps:, maximum_amount: nil, per_unit_maximum: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class BulkConfig < Orb::BaseModel + # @!attribute tiers + # Bulk tiers for rating based on total usage volume + # + # @return [Array] + required :tiers, -> { Orb::ArrayOf[Orb::Models::PriceCreateParams::BulkConfig::Tier] } + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String + + # @!attribute maximum_units + # Upper bound for this tier + # + # @return [Float, nil] + optional :maximum_units, Float, nil?: true + + # @!parse + # # @param unit_amount [String] + # # @param maximum_units [Float, nil] + # # + # def initialize(unit_amount:, maximum_units: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end end end end diff --git a/lib/orb/models/price_interval_fixed_fee_quantity_transition_model.rb b/lib/orb/models/price_interval_fixed_fee_quantity_transition_model.rb deleted file mode 100644 index 28cfe9b8..00000000 --- a/lib/orb/models/price_interval_fixed_fee_quantity_transition_model.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class PriceIntervalFixedFeeQuantityTransitionModel < Orb::BaseModel - # @!attribute effective_date - # The date that the fixed fee quantity transition should take effect. - # - # @return [Time] - required :effective_date, Time - - # @!attribute quantity - # The quantity of the fixed fee quantity transition. - # - # @return [Integer] - required :quantity, Integer - - # @!parse - # # @param effective_date [Time] - # # @param quantity [Integer] - # # - # def initialize(effective_date:, quantity:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/price_interval_model.rb b/lib/orb/models/price_interval_model.rb deleted file mode 100644 index 832fc98a..00000000 --- a/lib/orb/models/price_interval_model.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class PriceIntervalModel < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billing_cycle_day - # The day of the month that Orb bills for this price - # - # @return [Integer] - required :billing_cycle_day, Integer - - # @!attribute current_billing_period_end_date - # The end of the current billing period. This is an exclusive timestamp, such that - # the instant returned is exactly the end of the billing period. Set to null if - # this price interval is not currently active. - # - # @return [Time, nil] - required :current_billing_period_end_date, Time, nil?: true - - # @!attribute current_billing_period_start_date - # The start date of the current billing period. This is an inclusive timestamp; - # the instant returned is exactly the beginning of the billing period. Set to null - # if this price interval is not currently active. - # - # @return [Time, nil] - required :current_billing_period_start_date, Time, nil?: true - - # @!attribute end_date - # The end date of the price interval. This is the date that Orb stops billing for - # this price. - # - # @return [Time, nil] - required :end_date, Time, nil?: true - - # @!attribute filter - # An additional filter to apply to usage queries. - # - # @return [String, nil] - required :filter, String, nil?: true - - # @!attribute fixed_fee_quantity_transitions - # The fixed fee quantity transitions for this price interval. This is only - # relevant for fixed fees. - # - # @return [Array, nil] - required :fixed_fee_quantity_transitions, - -> { Orb::ArrayOf[Orb::Models::PriceIntervalModel::FixedFeeQuantityTransition] }, - nil?: true - - # @!attribute price - # The Price resource represents a price that can be billed on a subscription, - # resulting in a charge on an invoice in the form of an invoice line item. Prices - # take a quantity and determine an amount to bill. - # - # Orb supports a few different pricing models out of the box. Each of these models - # is serialized differently in a given Price object. The model_type field - # determines the key for the configuration object that is present. - # - # For more on the types of prices, see - # [the core concepts documentation](/core-concepts#plan-and-price) - # - # @return [Orb::Models::PriceModel::UnitPrice, Orb::Models::PriceModel::PackagePrice, Orb::Models::PriceModel::MatrixPrice, Orb::Models::PriceModel::TieredPrice, Orb::Models::PriceModel::TieredBpsPrice, Orb::Models::PriceModel::BpsPrice, Orb::Models::PriceModel::BulkBpsPrice, Orb::Models::PriceModel::BulkPrice, Orb::Models::PriceModel::ThresholdTotalAmountPrice, Orb::Models::PriceModel::TieredPackagePrice, Orb::Models::PriceModel::GroupedTieredPrice, Orb::Models::PriceModel::TieredWithMinimumPrice, Orb::Models::PriceModel::TieredPackageWithMinimumPrice, Orb::Models::PriceModel::PackageWithAllocationPrice, Orb::Models::PriceModel::UnitWithPercentPrice, Orb::Models::PriceModel::MatrixWithAllocationPrice, Orb::Models::PriceModel::TieredWithProrationPrice, Orb::Models::PriceModel::UnitWithProrationPrice, Orb::Models::PriceModel::GroupedAllocationPrice, Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, Orb::Models::PriceModel::MatrixWithDisplayNamePrice, Orb::Models::PriceModel::BulkWithProrationPrice, Orb::Models::PriceModel::GroupedTieredPackagePrice, Orb::Models::PriceModel::MaxGroupTieredPackagePrice, Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, Orb::Models::PriceModel::CumulativeGroupedBulkPrice] - required :price, union: -> { Orb::Models::PriceModel } - - # @!attribute start_date - # The start date of the price interval. This is the date that Orb starts billing - # for this price. - # - # @return [Time] - required :start_date, Time - - # @!attribute usage_customer_ids - # A list of customer IDs whose usage events will be aggregated and billed under - # this price interval. - # - # @return [Array, nil] - required :usage_customer_ids, Orb::ArrayOf[String], nil?: true - - # @!parse - # # The Price Interval resource represents a period of time for which a price will - # # bill on a subscription. A subscription’s price intervals define its billing - # # behavior. - # # - # # @param id [String] - # # @param billing_cycle_day [Integer] - # # @param current_billing_period_end_date [Time, nil] - # # @param current_billing_period_start_date [Time, nil] - # # @param end_date [Time, nil] - # # @param filter [String, nil] - # # @param fixed_fee_quantity_transitions [Array, nil] - # # @param price [Orb::Models::PriceModel::UnitPrice, Orb::Models::PriceModel::PackagePrice, Orb::Models::PriceModel::MatrixPrice, Orb::Models::PriceModel::TieredPrice, Orb::Models::PriceModel::TieredBpsPrice, Orb::Models::PriceModel::BpsPrice, Orb::Models::PriceModel::BulkBpsPrice, Orb::Models::PriceModel::BulkPrice, Orb::Models::PriceModel::ThresholdTotalAmountPrice, Orb::Models::PriceModel::TieredPackagePrice, Orb::Models::PriceModel::GroupedTieredPrice, Orb::Models::PriceModel::TieredWithMinimumPrice, Orb::Models::PriceModel::TieredPackageWithMinimumPrice, Orb::Models::PriceModel::PackageWithAllocationPrice, Orb::Models::PriceModel::UnitWithPercentPrice, Orb::Models::PriceModel::MatrixWithAllocationPrice, Orb::Models::PriceModel::TieredWithProrationPrice, Orb::Models::PriceModel::UnitWithProrationPrice, Orb::Models::PriceModel::GroupedAllocationPrice, Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, Orb::Models::PriceModel::MatrixWithDisplayNamePrice, Orb::Models::PriceModel::BulkWithProrationPrice, Orb::Models::PriceModel::GroupedTieredPackagePrice, Orb::Models::PriceModel::MaxGroupTieredPackagePrice, Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, Orb::Models::PriceModel::CumulativeGroupedBulkPrice] - # # @param start_date [Time] - # # @param usage_customer_ids [Array, nil] - # # - # def initialize( - # id:, - # billing_cycle_day:, - # current_billing_period_end_date:, - # current_billing_period_start_date:, - # end_date:, - # filter:, - # fixed_fee_quantity_transitions:, - # price:, - # start_date:, - # usage_customer_ids:, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - class FixedFeeQuantityTransition < Orb::BaseModel - # @!attribute effective_date - # - # @return [Time] - required :effective_date, Time - - # @!attribute price_id - # - # @return [String] - required :price_id, String - - # @!attribute quantity - # - # @return [Integer] - required :quantity, Integer - - # @!parse - # # @param effective_date [Time] - # # @param price_id [String] - # # @param quantity [Integer] - # # - # def initialize(effective_date:, price_id:, quantity:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end - end -end diff --git a/lib/orb/models/price_model.rb b/lib/orb/models/price_model.rb deleted file mode 100644 index 90444def..00000000 --- a/lib/orb/models/price_model.rb +++ /dev/null @@ -1,7176 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - # @abstract - # - # The Price resource represents a price that can be billed on a subscription, - # resulting in a charge on an invoice in the form of an invoice line item. Prices - # take a quantity and determine an amount to bill. - # - # Orb supports a few different pricing models out of the box. Each of these models - # is serialized differently in a given Price object. The model_type field - # determines the key for the configuration object that is present. - # - # For more on the types of prices, see - # [the core concepts documentation](/core-concepts#plan-and-price) - # - # @example - # ```ruby - # case price_model - # in { - # model_type: "unit", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::UnitPrice ... - # in { - # model_type: "package", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::PackagePrice ... - # in { - # model_type: "matrix", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::MatrixPrice ... - # in { - # model_type: "tiered", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::TieredPrice ... - # in { - # model_type: "tiered_bps", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::TieredBpsPrice ... - # in { - # model_type: "bps", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::BpsPrice ... - # in { - # model_type: "bulk_bps", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::BulkBpsPrice ... - # in { - # model_type: "bulk", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::BulkPrice ... - # in { - # model_type: "threshold_total_amount", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::ThresholdTotalAmountPrice ... - # in { - # model_type: "tiered_package", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::TieredPackagePrice ... - # in { - # model_type: "grouped_tiered", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::GroupedTieredPrice ... - # in { - # model_type: "tiered_with_minimum", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::TieredWithMinimumPrice ... - # in { - # model_type: "tiered_package_with_minimum", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::TieredPackageWithMinimumPrice ... - # in { - # model_type: "package_with_allocation", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::PackageWithAllocationPrice ... - # in { - # model_type: "unit_with_percent", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::UnitWithPercentPrice ... - # in { - # model_type: "matrix_with_allocation", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::MatrixWithAllocationPrice ... - # in { - # model_type: "tiered_with_proration", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::TieredWithProrationPrice ... - # in { - # model_type: "unit_with_proration", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::UnitWithProrationPrice ... - # in { - # model_type: "grouped_allocation", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::GroupedAllocationPrice ... - # in { - # model_type: "grouped_with_prorated_minimum", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::GroupedWithProratedMinimumPrice ... - # in { - # model_type: "grouped_with_metered_minimum", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice ... - # in { - # model_type: "matrix_with_display_name", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::MatrixWithDisplayNamePrice ... - # in { - # model_type: "bulk_with_proration", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::BulkWithProrationPrice ... - # in { - # model_type: "grouped_tiered_package", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::GroupedTieredPackagePrice ... - # in { - # model_type: "max_group_tiered_package", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::MaxGroupTieredPackagePrice ... - # in { - # model_type: "scalable_matrix_with_unit_pricing", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice ... - # in { - # model_type: "scalable_matrix_with_tiered_pricing", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice ... - # in { - # model_type: "cumulative_grouped_bulk", - # id: String, - # billable_metric: Orb::Models::BillableMetricTinyModel, - # billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - # } - # # Orb::Models::PriceModel::CumulativeGroupedBulkPrice ... - # end - # ``` - # - # @example - # ```ruby - # case price_model - # in Orb::Models::PriceModel::UnitPrice - # # ... - # in Orb::Models::PriceModel::PackagePrice - # # ... - # in Orb::Models::PriceModel::MatrixPrice - # # ... - # in Orb::Models::PriceModel::TieredPrice - # # ... - # in Orb::Models::PriceModel::TieredBpsPrice - # # ... - # in Orb::Models::PriceModel::BpsPrice - # # ... - # in Orb::Models::PriceModel::BulkBpsPrice - # # ... - # in Orb::Models::PriceModel::BulkPrice - # # ... - # in Orb::Models::PriceModel::ThresholdTotalAmountPrice - # # ... - # in Orb::Models::PriceModel::TieredPackagePrice - # # ... - # in Orb::Models::PriceModel::GroupedTieredPrice - # # ... - # in Orb::Models::PriceModel::TieredWithMinimumPrice - # # ... - # in Orb::Models::PriceModel::TieredPackageWithMinimumPrice - # # ... - # in Orb::Models::PriceModel::PackageWithAllocationPrice - # # ... - # in Orb::Models::PriceModel::UnitWithPercentPrice - # # ... - # in Orb::Models::PriceModel::MatrixWithAllocationPrice - # # ... - # in Orb::Models::PriceModel::TieredWithProrationPrice - # # ... - # in Orb::Models::PriceModel::UnitWithProrationPrice - # # ... - # in Orb::Models::PriceModel::GroupedAllocationPrice - # # ... - # in Orb::Models::PriceModel::GroupedWithProratedMinimumPrice - # # ... - # in Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice - # # ... - # in Orb::Models::PriceModel::MatrixWithDisplayNamePrice - # # ... - # in Orb::Models::PriceModel::BulkWithProrationPrice - # # ... - # in Orb::Models::PriceModel::GroupedTieredPackagePrice - # # ... - # in Orb::Models::PriceModel::MaxGroupTieredPackagePrice - # # ... - # in Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice - # # ... - # in Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice - # # ... - # in Orb::Models::PriceModel::CumulativeGroupedBulkPrice - # # ... - # end - # ``` - class PriceModel < Orb::Union - discriminator :model_type - - variant :unit, -> { Orb::Models::PriceModel::UnitPrice } - - variant :package, -> { Orb::Models::PriceModel::PackagePrice } - - variant :matrix, -> { Orb::Models::PriceModel::MatrixPrice } - - variant :tiered, -> { Orb::Models::PriceModel::TieredPrice } - - variant :tiered_bps, -> { Orb::Models::PriceModel::TieredBpsPrice } - - variant :bps, -> { Orb::Models::PriceModel::BpsPrice } - - variant :bulk_bps, -> { Orb::Models::PriceModel::BulkBpsPrice } - - variant :bulk, -> { Orb::Models::PriceModel::BulkPrice } - - variant :threshold_total_amount, -> { Orb::Models::PriceModel::ThresholdTotalAmountPrice } - - variant :tiered_package, -> { Orb::Models::PriceModel::TieredPackagePrice } - - variant :grouped_tiered, -> { Orb::Models::PriceModel::GroupedTieredPrice } - - variant :tiered_with_minimum, -> { Orb::Models::PriceModel::TieredWithMinimumPrice } - - variant :tiered_package_with_minimum, -> { Orb::Models::PriceModel::TieredPackageWithMinimumPrice } - - variant :package_with_allocation, -> { Orb::Models::PriceModel::PackageWithAllocationPrice } - - variant :unit_with_percent, -> { Orb::Models::PriceModel::UnitWithPercentPrice } - - variant :matrix_with_allocation, -> { Orb::Models::PriceModel::MatrixWithAllocationPrice } - - variant :tiered_with_proration, -> { Orb::Models::PriceModel::TieredWithProrationPrice } - - variant :unit_with_proration, -> { Orb::Models::PriceModel::UnitWithProrationPrice } - - variant :grouped_allocation, -> { Orb::Models::PriceModel::GroupedAllocationPrice } - - variant :grouped_with_prorated_minimum, -> { Orb::Models::PriceModel::GroupedWithProratedMinimumPrice } - - variant :grouped_with_metered_minimum, -> { Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice } - - variant :matrix_with_display_name, -> { Orb::Models::PriceModel::MatrixWithDisplayNamePrice } - - variant :bulk_with_proration, -> { Orb::Models::PriceModel::BulkWithProrationPrice } - - variant :grouped_tiered_package, -> { Orb::Models::PriceModel::GroupedTieredPackagePrice } - - variant :max_group_tiered_package, -> { Orb::Models::PriceModel::MaxGroupTieredPackagePrice } - - variant :scalable_matrix_with_unit_pricing, - -> { Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice } - - variant :scalable_matrix_with_tiered_pricing, - -> { Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice } - - variant :cumulative_grouped_bulk, -> { Orb::Models::PriceModel::CumulativeGroupedBulkPrice } - - class UnitPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::UnitPrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::UnitPrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :unit] - required :model_type, const: :unit - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::UnitPrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::UnitPrice::PriceType } - - # @!attribute unit_config - # - # @return [Orb::Models::UnitConfigModel] - required :unit_config, -> { Orb::Models::UnitConfigModel } - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::UnitPrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::UnitPrice::PriceType] - # # @param unit_config [Orb::Models::UnitConfigModel] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :unit] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # unit_config:, - # dimensional_price_configuration: nil, - # model_type: :unit, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class PackagePrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::PackagePrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::PackagePrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :package] - required :model_type, const: :package - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute package_config - # - # @return [Orb::Models::PackageConfigModel] - required :package_config, -> { Orb::Models::PackageConfigModel } - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::PackagePrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::PackagePrice::PriceType } - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::PackagePrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param package_config [Orb::Models::PackageConfigModel] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::PackagePrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :package] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # package_config:, - # plan_phase_order:, - # price_type:, - # dimensional_price_configuration: nil, - # model_type: :package, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class MatrixPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::MatrixPrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::MatrixPrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute matrix_config - # - # @return [Orb::Models::MatrixConfigModel] - required :matrix_config, -> { Orb::Models::MatrixConfigModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :matrix] - required :model_type, const: :matrix - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::MatrixPrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::MatrixPrice::PriceType } - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::MatrixPrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param matrix_config [Orb::Models::MatrixConfigModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::MatrixPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :matrix] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # invoicing_cycle_configuration:, - # item:, - # matrix_config:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # dimensional_price_configuration: nil, - # model_type: :matrix, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class TieredPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::TieredPrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::TieredPrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :tiered] - required :model_type, const: :tiered - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::TieredPrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::TieredPrice::PriceType } - - # @!attribute tiered_config - # - # @return [Orb::Models::TieredConfigModel] - required :tiered_config, -> { Orb::Models::TieredConfigModel } - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::TieredPrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::TieredPrice::PriceType] - # # @param tiered_config [Orb::Models::TieredConfigModel] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :tiered] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # tiered_config:, - # dimensional_price_configuration: nil, - # model_type: :tiered, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class TieredBpsPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::TieredBpsPrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::TieredBpsPrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :tiered_bps] - required :model_type, const: :tiered_bps - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::TieredBpsPrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::TieredBpsPrice::PriceType } - - # @!attribute tiered_bps_config - # - # @return [Orb::Models::TieredBpsConfigModel] - required :tiered_bps_config, -> { Orb::Models::TieredBpsConfigModel } - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::TieredBpsPrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::TieredBpsPrice::PriceType] - # # @param tiered_bps_config [Orb::Models::TieredBpsConfigModel] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :tiered_bps] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # tiered_bps_config:, - # dimensional_price_configuration: nil, - # model_type: :tiered_bps, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class BpsPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute bps_config - # - # @return [Orb::Models::BpsConfigModel] - required :bps_config, -> { Orb::Models::BpsConfigModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::BpsPrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::BpsPrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :bps] - required :model_type, const: :bps - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::BpsPrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::BpsPrice::PriceType } - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param bps_config [Orb::Models::BpsConfigModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::BpsPrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::BpsPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :bps] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # bps_config:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # dimensional_price_configuration: nil, - # model_type: :bps, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class BulkBpsPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute bulk_bps_config - # - # @return [Orb::Models::BulkBpsConfigModel] - required :bulk_bps_config, -> { Orb::Models::BulkBpsConfigModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::BulkBpsPrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::BulkBpsPrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :bulk_bps] - required :model_type, const: :bulk_bps - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::BulkBpsPrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::BulkBpsPrice::PriceType } - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param bulk_bps_config [Orb::Models::BulkBpsConfigModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::BulkBpsPrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::BulkBpsPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :bulk_bps] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # bulk_bps_config:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # dimensional_price_configuration: nil, - # model_type: :bulk_bps, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class BulkPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute bulk_config - # - # @return [Orb::Models::BulkConfigModel] - required :bulk_config, -> { Orb::Models::BulkConfigModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::BulkPrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::BulkPrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :bulk] - required :model_type, const: :bulk - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::BulkPrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::BulkPrice::PriceType } - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param bulk_config [Orb::Models::BulkConfigModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::BulkPrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::BulkPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :bulk] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # bulk_config:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # dimensional_price_configuration: nil, - # model_type: :bulk, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class ThresholdTotalAmountPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::ThresholdTotalAmountPrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::ThresholdTotalAmountPrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :threshold_total_amount] - required :model_type, const: :threshold_total_amount - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::ThresholdTotalAmountPrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::ThresholdTotalAmountPrice::PriceType } - - # @!attribute threshold_total_amount_config - # - # @return [Hash{Symbol=>Object}] - required :threshold_total_amount_config, Orb::HashOf[Orb::Unknown] - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::ThresholdTotalAmountPrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::ThresholdTotalAmountPrice::PriceType] - # # @param threshold_total_amount_config [Hash{Symbol=>Object}] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :threshold_total_amount] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # threshold_total_amount_config:, - # dimensional_price_configuration: nil, - # model_type: :threshold_total_amount, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class TieredPackagePrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::TieredPackagePrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::TieredPackagePrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :tiered_package] - required :model_type, const: :tiered_package - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::TieredPackagePrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::TieredPackagePrice::PriceType } - - # @!attribute tiered_package_config - # - # @return [Hash{Symbol=>Object}] - required :tiered_package_config, Orb::HashOf[Orb::Unknown] - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::TieredPackagePrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::TieredPackagePrice::PriceType] - # # @param tiered_package_config [Hash{Symbol=>Object}] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :tiered_package] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # tiered_package_config:, - # dimensional_price_configuration: nil, - # model_type: :tiered_package, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class GroupedTieredPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::GroupedTieredPrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::GroupedTieredPrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute grouped_tiered_config - # - # @return [Hash{Symbol=>Object}] - required :grouped_tiered_config, Orb::HashOf[Orb::Unknown] - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :grouped_tiered] - required :model_type, const: :grouped_tiered - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::GroupedTieredPrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::GroupedTieredPrice::PriceType } - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::GroupedTieredPrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param grouped_tiered_config [Hash{Symbol=>Object}] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::GroupedTieredPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :grouped_tiered] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # grouped_tiered_config:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # dimensional_price_configuration: nil, - # model_type: :grouped_tiered, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class TieredWithMinimumPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::TieredWithMinimumPrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::TieredWithMinimumPrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :tiered_with_minimum] - required :model_type, const: :tiered_with_minimum - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::TieredWithMinimumPrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::TieredWithMinimumPrice::PriceType } - - # @!attribute tiered_with_minimum_config - # - # @return [Hash{Symbol=>Object}] - required :tiered_with_minimum_config, Orb::HashOf[Orb::Unknown] - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::TieredWithMinimumPrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::TieredWithMinimumPrice::PriceType] - # # @param tiered_with_minimum_config [Hash{Symbol=>Object}] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :tiered_with_minimum] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # tiered_with_minimum_config:, - # dimensional_price_configuration: nil, - # model_type: :tiered_with_minimum, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class TieredPackageWithMinimumPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::TieredPackageWithMinimumPrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::TieredPackageWithMinimumPrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :tiered_package_with_minimum] - required :model_type, const: :tiered_package_with_minimum - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::TieredPackageWithMinimumPrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::TieredPackageWithMinimumPrice::PriceType } - - # @!attribute tiered_package_with_minimum_config - # - # @return [Hash{Symbol=>Object}] - required :tiered_package_with_minimum_config, Orb::HashOf[Orb::Unknown] - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::TieredPackageWithMinimumPrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::TieredPackageWithMinimumPrice::PriceType] - # # @param tiered_package_with_minimum_config [Hash{Symbol=>Object}] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :tiered_package_with_minimum] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # tiered_package_with_minimum_config:, - # dimensional_price_configuration: nil, - # model_type: :tiered_package_with_minimum, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class PackageWithAllocationPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::PackageWithAllocationPrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::PackageWithAllocationPrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :package_with_allocation] - required :model_type, const: :package_with_allocation - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute package_with_allocation_config - # - # @return [Hash{Symbol=>Object}] - required :package_with_allocation_config, Orb::HashOf[Orb::Unknown] - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::PackageWithAllocationPrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::PackageWithAllocationPrice::PriceType } - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::PackageWithAllocationPrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param package_with_allocation_config [Hash{Symbol=>Object}] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::PackageWithAllocationPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :package_with_allocation] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # package_with_allocation_config:, - # plan_phase_order:, - # price_type:, - # dimensional_price_configuration: nil, - # model_type: :package_with_allocation, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class UnitWithPercentPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::UnitWithPercentPrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::UnitWithPercentPrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :unit_with_percent] - required :model_type, const: :unit_with_percent - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::UnitWithPercentPrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::UnitWithPercentPrice::PriceType } - - # @!attribute unit_with_percent_config - # - # @return [Hash{Symbol=>Object}] - required :unit_with_percent_config, Orb::HashOf[Orb::Unknown] - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::UnitWithPercentPrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::UnitWithPercentPrice::PriceType] - # # @param unit_with_percent_config [Hash{Symbol=>Object}] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :unit_with_percent] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # unit_with_percent_config:, - # dimensional_price_configuration: nil, - # model_type: :unit_with_percent, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class MatrixWithAllocationPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::MatrixWithAllocationPrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::MatrixWithAllocationPrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute matrix_with_allocation_config - # - # @return [Orb::Models::MatrixWithAllocationConfigModel] - required :matrix_with_allocation_config, -> { Orb::Models::MatrixWithAllocationConfigModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :matrix_with_allocation] - required :model_type, const: :matrix_with_allocation - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::MatrixWithAllocationPrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::MatrixWithAllocationPrice::PriceType } - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::MatrixWithAllocationPrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param matrix_with_allocation_config [Orb::Models::MatrixWithAllocationConfigModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::MatrixWithAllocationPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :matrix_with_allocation] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # invoicing_cycle_configuration:, - # item:, - # matrix_with_allocation_config:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # dimensional_price_configuration: nil, - # model_type: :matrix_with_allocation, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class TieredWithProrationPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::TieredWithProrationPrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::TieredWithProrationPrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :tiered_with_proration] - required :model_type, const: :tiered_with_proration - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::TieredWithProrationPrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::TieredWithProrationPrice::PriceType } - - # @!attribute tiered_with_proration_config - # - # @return [Hash{Symbol=>Object}] - required :tiered_with_proration_config, Orb::HashOf[Orb::Unknown] - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::TieredWithProrationPrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::TieredWithProrationPrice::PriceType] - # # @param tiered_with_proration_config [Hash{Symbol=>Object}] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :tiered_with_proration] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # tiered_with_proration_config:, - # dimensional_price_configuration: nil, - # model_type: :tiered_with_proration, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class UnitWithProrationPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::UnitWithProrationPrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::UnitWithProrationPrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :unit_with_proration] - required :model_type, const: :unit_with_proration - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::UnitWithProrationPrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::UnitWithProrationPrice::PriceType } - - # @!attribute unit_with_proration_config - # - # @return [Hash{Symbol=>Object}] - required :unit_with_proration_config, Orb::HashOf[Orb::Unknown] - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::UnitWithProrationPrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::UnitWithProrationPrice::PriceType] - # # @param unit_with_proration_config [Hash{Symbol=>Object}] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :unit_with_proration] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # unit_with_proration_config:, - # dimensional_price_configuration: nil, - # model_type: :unit_with_proration, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class GroupedAllocationPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::GroupedAllocationPrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::GroupedAllocationPrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute grouped_allocation_config - # - # @return [Hash{Symbol=>Object}] - required :grouped_allocation_config, Orb::HashOf[Orb::Unknown] - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :grouped_allocation] - required :model_type, const: :grouped_allocation - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::GroupedAllocationPrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::GroupedAllocationPrice::PriceType } - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::GroupedAllocationPrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param grouped_allocation_config [Hash{Symbol=>Object}] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::GroupedAllocationPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :grouped_allocation] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # grouped_allocation_config:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # dimensional_price_configuration: nil, - # model_type: :grouped_allocation, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class GroupedWithProratedMinimumPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::GroupedWithProratedMinimumPrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::GroupedWithProratedMinimumPrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute grouped_with_prorated_minimum_config - # - # @return [Hash{Symbol=>Object}] - required :grouped_with_prorated_minimum_config, Orb::HashOf[Orb::Unknown] - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :grouped_with_prorated_minimum] - required :model_type, const: :grouped_with_prorated_minimum - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::GroupedWithProratedMinimumPrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::GroupedWithProratedMinimumPrice::PriceType } - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::GroupedWithProratedMinimumPrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param grouped_with_prorated_minimum_config [Hash{Symbol=>Object}] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::GroupedWithProratedMinimumPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :grouped_with_prorated_minimum] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # grouped_with_prorated_minimum_config:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # dimensional_price_configuration: nil, - # model_type: :grouped_with_prorated_minimum, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class GroupedWithMeteredMinimumPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute grouped_with_metered_minimum_config - # - # @return [Hash{Symbol=>Object}] - required :grouped_with_metered_minimum_config, Orb::HashOf[Orb::Unknown] - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :grouped_with_metered_minimum] - required :model_type, const: :grouped_with_metered_minimum - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice::PriceType } - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param grouped_with_metered_minimum_config [Hash{Symbol=>Object}] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :grouped_with_metered_minimum] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # grouped_with_metered_minimum_config:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # dimensional_price_configuration: nil, - # model_type: :grouped_with_metered_minimum, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class MatrixWithDisplayNamePrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::MatrixWithDisplayNamePrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::MatrixWithDisplayNamePrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute matrix_with_display_name_config - # - # @return [Hash{Symbol=>Object}] - required :matrix_with_display_name_config, Orb::HashOf[Orb::Unknown] - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :matrix_with_display_name] - required :model_type, const: :matrix_with_display_name - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::MatrixWithDisplayNamePrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::MatrixWithDisplayNamePrice::PriceType } - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::MatrixWithDisplayNamePrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param matrix_with_display_name_config [Hash{Symbol=>Object}] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::MatrixWithDisplayNamePrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :matrix_with_display_name] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # invoicing_cycle_configuration:, - # item:, - # matrix_with_display_name_config:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # dimensional_price_configuration: nil, - # model_type: :matrix_with_display_name, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class BulkWithProrationPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute bulk_with_proration_config - # - # @return [Hash{Symbol=>Object}] - required :bulk_with_proration_config, Orb::HashOf[Orb::Unknown] - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::BulkWithProrationPrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::BulkWithProrationPrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :bulk_with_proration] - required :model_type, const: :bulk_with_proration - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::BulkWithProrationPrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::BulkWithProrationPrice::PriceType } - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param bulk_with_proration_config [Hash{Symbol=>Object}] - # # @param cadence [Symbol, Orb::Models::PriceModel::BulkWithProrationPrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::BulkWithProrationPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :bulk_with_proration] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # bulk_with_proration_config:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # dimensional_price_configuration: nil, - # model_type: :bulk_with_proration, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class GroupedTieredPackagePrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::GroupedTieredPackagePrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::GroupedTieredPackagePrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute grouped_tiered_package_config - # - # @return [Hash{Symbol=>Object}] - required :grouped_tiered_package_config, Orb::HashOf[Orb::Unknown] - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :grouped_tiered_package] - required :model_type, const: :grouped_tiered_package - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::GroupedTieredPackagePrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::GroupedTieredPackagePrice::PriceType } - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::GroupedTieredPackagePrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param grouped_tiered_package_config [Hash{Symbol=>Object}] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::GroupedTieredPackagePrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :grouped_tiered_package] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # grouped_tiered_package_config:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # dimensional_price_configuration: nil, - # model_type: :grouped_tiered_package, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class MaxGroupTieredPackagePrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::MaxGroupTieredPackagePrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::MaxGroupTieredPackagePrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute max_group_tiered_package_config - # - # @return [Hash{Symbol=>Object}] - required :max_group_tiered_package_config, Orb::HashOf[Orb::Unknown] - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :max_group_tiered_package] - required :model_type, const: :max_group_tiered_package - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::MaxGroupTieredPackagePrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::MaxGroupTieredPackagePrice::PriceType } - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::MaxGroupTieredPackagePrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param max_group_tiered_package_config [Hash{Symbol=>Object}] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::MaxGroupTieredPackagePrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :max_group_tiered_package] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # invoicing_cycle_configuration:, - # item:, - # max_group_tiered_package_config:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # dimensional_price_configuration: nil, - # model_type: :max_group_tiered_package, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class ScalableMatrixWithUnitPricingPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :scalable_matrix_with_unit_pricing] - required :model_type, const: :scalable_matrix_with_unit_pricing - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice::PriceType } - - # @!attribute scalable_matrix_with_unit_pricing_config - # - # @return [Hash{Symbol=>Object}] - required :scalable_matrix_with_unit_pricing_config, Orb::HashOf[Orb::Unknown] - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice::PriceType] - # # @param scalable_matrix_with_unit_pricing_config [Hash{Symbol=>Object}] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :scalable_matrix_with_unit_pricing] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # scalable_matrix_with_unit_pricing_config:, - # dimensional_price_configuration: nil, - # model_type: :scalable_matrix_with_unit_pricing, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class ScalableMatrixWithTieredPricingPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :scalable_matrix_with_tiered_pricing] - required :model_type, const: :scalable_matrix_with_tiered_pricing - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice::PriceType] - required :price_type, - enum: -> { Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice::PriceType } - - # @!attribute scalable_matrix_with_tiered_pricing_config - # - # @return [Hash{Symbol=>Object}] - required :scalable_matrix_with_tiered_pricing_config, Orb::HashOf[Orb::Unknown] - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice::PriceType] - # # @param scalable_matrix_with_tiered_pricing_config [Hash{Symbol=>Object}] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :scalable_matrix_with_tiered_pricing] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # scalable_matrix_with_tiered_pricing_config:, - # dimensional_price_configuration: nil, - # model_type: :scalable_matrix_with_tiered_pricing, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - - class CumulativeGroupedBulkPrice < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute billable_metric - # - # @return [Orb::Models::BillableMetricTinyModel, nil] - required :billable_metric, -> { Orb::Models::BillableMetricTinyModel }, nil?: true - - # @!attribute billing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel] - required :billing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel } - - # @!attribute cadence - # - # @return [Symbol, Orb::Models::PriceModel::CumulativeGroupedBulkPrice::Cadence] - required :cadence, enum: -> { Orb::Models::PriceModel::CumulativeGroupedBulkPrice::Cadence } - - # @!attribute conversion_rate - # - # @return [Float, nil] - required :conversion_rate, Float, nil?: true - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute credit_allocation - # - # @return [Orb::Models::AllocationModel, nil] - required :credit_allocation, -> { Orb::Models::AllocationModel }, nil?: true - - # @!attribute cumulative_grouped_bulk_config - # - # @return [Hash{Symbol=>Object}] - required :cumulative_grouped_bulk_config, Orb::HashOf[Orb::Unknown] - - # @!attribute currency - # - # @return [String] - required :currency, String - - # @!attribute discount - # - # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - required :discount, union: -> { Orb::Models::Discount }, nil?: true - - # @!attribute external_price_id - # - # @return [String, nil] - required :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # - # @return [Float, nil] - required :fixed_price_quantity, Float, nil?: true - - # @!attribute invoicing_cycle_configuration - # - # @return [Orb::Models::BillingCycleConfigurationModel, nil] - required :invoicing_cycle_configuration, -> { Orb::Models::BillingCycleConfigurationModel }, nil?: true - - # @!attribute item - # - # @return [Orb::Models::ItemSlimModel] - required :item, -> { Orb::Models::ItemSlimModel } - - # @!attribute maximum - # - # @return [Orb::Models::MaximumModel, nil] - required :maximum, -> { Orb::Models::MaximumModel }, nil?: true - - # @!attribute maximum_amount - # - # @return [String, nil] - required :maximum_amount, String, nil?: true - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum - # - # @return [Orb::Models::MinimumModel, nil] - required :minimum, -> { Orb::Models::MinimumModel }, nil?: true - - # @!attribute minimum_amount - # - # @return [String, nil] - required :minimum_amount, String, nil?: true - - # @!attribute model_type - # - # @return [Symbol, :cumulative_grouped_bulk] - required :model_type, const: :cumulative_grouped_bulk - - # @!attribute name - # - # @return [String] - required :name, String - - # @!attribute plan_phase_order - # - # @return [Integer, nil] - required :plan_phase_order, Integer, nil?: true - - # @!attribute price_type - # - # @return [Symbol, Orb::Models::PriceModel::CumulativeGroupedBulkPrice::PriceType] - required :price_type, enum: -> { Orb::Models::PriceModel::CumulativeGroupedBulkPrice::PriceType } - - # @!attribute dimensional_price_configuration - # - # @return [Orb::Models::DimensionalPriceConfigurationModel, nil] - optional :dimensional_price_configuration, - -> { Orb::Models::DimensionalPriceConfigurationModel }, - nil?: true - - # @!parse - # # @param id [String] - # # @param billable_metric [Orb::Models::BillableMetricTinyModel, nil] - # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel] - # # @param cadence [Symbol, Orb::Models::PriceModel::CumulativeGroupedBulkPrice::Cadence] - # # @param conversion_rate [Float, nil] - # # @param created_at [Time] - # # @param credit_allocation [Orb::Models::AllocationModel, nil] - # # @param cumulative_grouped_bulk_config [Hash{Symbol=>Object}] - # # @param currency [String] - # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil] - # # @param external_price_id [String, nil] - # # @param fixed_price_quantity [Float, nil] - # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfigurationModel, nil] - # # @param item [Orb::Models::ItemSlimModel] - # # @param maximum [Orb::Models::MaximumModel, nil] - # # @param maximum_amount [String, nil] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum [Orb::Models::MinimumModel, nil] - # # @param minimum_amount [String, nil] - # # @param name [String] - # # @param plan_phase_order [Integer, nil] - # # @param price_type [Symbol, Orb::Models::PriceModel::CumulativeGroupedBulkPrice::PriceType] - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfigurationModel, nil] - # # @param model_type [Symbol, :cumulative_grouped_bulk] - # # - # def initialize( - # id:, - # billable_metric:, - # billing_cycle_configuration:, - # cadence:, - # conversion_rate:, - # created_at:, - # credit_allocation:, - # cumulative_grouped_bulk_config:, - # currency:, - # discount:, - # external_price_id:, - # fixed_price_quantity:, - # invoicing_cycle_configuration:, - # item:, - # maximum:, - # maximum_amount:, - # metadata:, - # minimum:, - # minimum_amount:, - # name:, - # plan_phase_order:, - # price_type:, - # dimensional_price_configuration: nil, - # model_type: :cumulative_grouped_bulk, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case cadence - # in :one_time - # # ... - # in :monthly - # # ... - # in :quarterly - # # ... - # in :semi_annual - # # ... - # in :annual - # # ... - # in ... - # #... - # end - # ``` - class Cadence < Orb::Enum - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - - # @abstract - # - # @example - # ```ruby - # case price_type - # in :usage_price - # # ... - # in :fixed_price - # # ... - # end - # ``` - class PriceType < Orb::Enum - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end - end -end diff --git a/lib/orb/models/replace_subscription_adjustment_params.rb b/lib/orb/models/replace_subscription_adjustment_params.rb index ae6f244d..6f7c4e37 100644 --- a/lib/orb/models/replace_subscription_adjustment_params.rb +++ b/lib/orb/models/replace_subscription_adjustment_params.rb @@ -6,8 +6,8 @@ class ReplaceSubscriptionAdjustmentParams < Orb::BaseModel # @!attribute adjustment # The definition of a new adjustment to create and add to the subscription. # - # @return [Orb::Models::NewAdjustmentModel::NewPercentageDiscount, Orb::Models::NewAdjustmentModel::NewUsageDiscount, Orb::Models::NewAdjustmentModel::NewAmountDiscount, Orb::Models::NewAdjustmentModel::NewMinimum, Orb::Models::NewAdjustmentModel::NewMaximum] - required :adjustment, union: -> { Orb::Models::NewAdjustmentModel } + # @return [Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount, Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount, Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount, Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMinimum, Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMaximum] + required :adjustment, union: -> { Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment } # @!attribute replaces_adjustment_id # The id of the adjustment on the plan to replace in the subscription. @@ -16,12 +16,299 @@ class ReplaceSubscriptionAdjustmentParams < Orb::BaseModel required :replaces_adjustment_id, String # @!parse - # # @param adjustment [Orb::Models::NewAdjustmentModel::NewPercentageDiscount, Orb::Models::NewAdjustmentModel::NewUsageDiscount, Orb::Models::NewAdjustmentModel::NewAmountDiscount, Orb::Models::NewAdjustmentModel::NewMinimum, Orb::Models::NewAdjustmentModel::NewMaximum] + # # @param adjustment [Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount, Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount, Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount, Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMinimum, Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMaximum] # # @param replaces_adjustment_id [String] # # # def initialize(adjustment:, replaces_adjustment_id:, **) = super # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The definition of a new adjustment to create and add to the subscription. + # + # @example + # ```ruby + # case adjustment + # in { + # adjustment_type: "percentage_discount", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # percentage_discount: Float, + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount ... + # in { + # adjustment_type: "usage_discount", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # usage_discount: Float, + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount ... + # in { + # adjustment_type: "amount_discount", + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount ... + # in { + # adjustment_type: "minimum", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # item_id: String, + # minimum_amount: String + # } + # # Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMinimum ... + # in { + # adjustment_type: "maximum", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # maximum_amount: String, + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMaximum ... + # end + # ``` + # + # @example + # ```ruby + # case adjustment + # in Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount + # # ... + # in Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount + # # ... + # in Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount + # # ... + # in Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMinimum + # # ... + # in Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMaximum + # # ... + # end + # ``` + class Adjustment < Orb::Union + discriminator :adjustment_type + + variant :percentage_discount, + -> { Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount } + + variant :usage_discount, + -> { Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount } + + variant :amount_discount, + -> { Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount } + + variant :minimum, -> { Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMinimum } + + variant :maximum, -> { Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMaximum } + + class NewPercentageDiscount < Orb::BaseModel + # @!attribute adjustment_type + # + # @return [Symbol, :percentage_discount] + required :adjustment_type, const: :percentage_discount + + # @!attribute applies_to_price_ids + # The set of price IDs to which this adjustment applies. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute percentage_discount + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute [r] is_invoice_level + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. + # + # @return [Boolean, nil] + optional :is_invoice_level, Orb::BooleanModel + + # @!parse + # # @return [Boolean] + # attr_writer :is_invoice_level + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param percentage_discount [Float] + # # @param is_invoice_level [Boolean] + # # @param adjustment_type [Symbol, :percentage_discount] + # # + # def initialize( + # applies_to_price_ids:, + # percentage_discount:, + # is_invoice_level: nil, + # adjustment_type: :percentage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class NewUsageDiscount < Orb::BaseModel + # @!attribute adjustment_type + # + # @return [Symbol, :usage_discount] + required :adjustment_type, const: :usage_discount + + # @!attribute applies_to_price_ids + # The set of price IDs to which this adjustment applies. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute usage_discount + # + # @return [Float] + required :usage_discount, Float + + # @!attribute [r] is_invoice_level + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. + # + # @return [Boolean, nil] + optional :is_invoice_level, Orb::BooleanModel + + # @!parse + # # @return [Boolean] + # attr_writer :is_invoice_level + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param usage_discount [Float] + # # @param is_invoice_level [Boolean] + # # @param adjustment_type [Symbol, :usage_discount] + # # + # def initialize(applies_to_price_ids:, usage_discount:, is_invoice_level: nil, adjustment_type: :usage_discount, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class NewAmountDiscount < Orb::BaseModel + # @!attribute adjustment_type + # + # @return [Symbol, :amount_discount] + required :adjustment_type, const: :amount_discount + + # @!attribute amount_discount + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The set of price IDs to which this adjustment applies. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute [r] is_invoice_level + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. + # + # @return [Boolean, nil] + optional :is_invoice_level, Orb::BooleanModel + + # @!parse + # # @return [Boolean] + # attr_writer :is_invoice_level + + # @!parse + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param adjustment_type [Symbol, :amount_discount] + # # + # def initialize(amount_discount:, applies_to_price_ids:, is_invoice_level: nil, adjustment_type: :amount_discount, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class NewMinimum < Orb::BaseModel + # @!attribute adjustment_type + # + # @return [Symbol, :minimum] + required :adjustment_type, const: :minimum + + # @!attribute applies_to_price_ids + # The set of price IDs to which this adjustment applies. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute item_id + # The item ID that revenue from this minimum will be attributed to. + # + # @return [String] + required :item_id, String + + # @!attribute minimum_amount + # + # @return [String] + required :minimum_amount, String + + # @!attribute [r] is_invoice_level + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. + # + # @return [Boolean, nil] + optional :is_invoice_level, Orb::BooleanModel + + # @!parse + # # @return [Boolean] + # attr_writer :is_invoice_level + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param item_id [String] + # # @param minimum_amount [String] + # # @param is_invoice_level [Boolean] + # # @param adjustment_type [Symbol, :minimum] + # # + # def initialize(applies_to_price_ids:, item_id:, minimum_amount:, is_invoice_level: nil, adjustment_type: :minimum, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class NewMaximum < Orb::BaseModel + # @!attribute adjustment_type + # + # @return [Symbol, :maximum] + required :adjustment_type, const: :maximum + + # @!attribute applies_to_price_ids + # The set of price IDs to which this adjustment applies. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # + # @return [String] + required :maximum_amount, String + + # @!attribute [r] is_invoice_level + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. + # + # @return [Boolean, nil] + optional :is_invoice_level, Orb::BooleanModel + + # @!parse + # # @return [Boolean] + # attr_writer :is_invoice_level + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # @param is_invoice_level [Boolean] + # # @param adjustment_type [Symbol, :maximum] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, is_invoice_level: nil, adjustment_type: :maximum, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end end end end diff --git a/lib/orb/models/replace_subscription_price_params.rb b/lib/orb/models/replace_subscription_price_params.rb index 01508241..957d0857 100644 --- a/lib/orb/models/replace_subscription_price_params.rb +++ b/lib/orb/models/replace_subscription_price_params.rb @@ -12,15 +12,19 @@ class ReplaceSubscriptionPriceParams < Orb::BaseModel # @!attribute allocation_price # The definition of a new allocation price to create and add to the subscription. # - # @return [Orb::Models::NewAllocationPriceModel, nil] - optional :allocation_price, -> { Orb::Models::NewAllocationPriceModel }, nil?: true + # @return [Orb::Models::ReplaceSubscriptionPriceParams::AllocationPrice, nil] + optional :allocation_price, + -> { Orb::Models::ReplaceSubscriptionPriceParams::AllocationPrice }, + nil?: true # @!attribute discounts # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the # replacement price. # - # @return [Array, nil] - optional :discounts, -> { Orb::ArrayOf[Orb::Models::DiscountOverrideModel] }, nil?: true + # @return [Array, nil] + optional :discounts, + -> { Orb::ArrayOf[Orb::Models::ReplaceSubscriptionPriceParams::Discount] }, + nil?: true # @!attribute external_price_id # The external price id of the price to add to the subscription. @@ -51,8 +55,8 @@ class ReplaceSubscriptionPriceParams < Orb::BaseModel # @!attribute price # The definition of a new price to create and add to the subscription. # - # @return [Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice, nil] - optional :price, union: -> { Orb::Models::NewSubscriptionPriceModel }, nil?: true + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice, nil] + optional :price, union: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price }, nil?: true # @!attribute price_id # The id of the price to add to the subscription. @@ -62,13 +66,13 @@ class ReplaceSubscriptionPriceParams < Orb::BaseModel # @!parse # # @param replaces_price_id [String] - # # @param allocation_price [Orb::Models::NewAllocationPriceModel, nil] - # # @param discounts [Array, nil] + # # @param allocation_price [Orb::Models::ReplaceSubscriptionPriceParams::AllocationPrice, nil] + # # @param discounts [Array, nil] # # @param external_price_id [String, nil] # # @param fixed_price_quantity [Float, nil] # # @param maximum_amount [String, nil] # # @param minimum_amount [String, nil] - # # @param price [Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice, nil] + # # @param price [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice, nil] # # @param price_id [String, nil] # # # def initialize( @@ -87,6 +91,8037 @@ class ReplaceSubscriptionPriceParams < Orb::BaseModel # end # def initialize: (Hash | Orb::BaseModel) -> void + + class AllocationPrice < Orb::BaseModel + # @!attribute amount + # An amount of the currency to allocate to the customer at the specified cadence. + # + # @return [String] + required :amount, String + + # @!attribute cadence + # The cadence at which to allocate the amount to the customer. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::AllocationPrice::Cadence] + required :cadence, enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::AllocationPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string or a custom pricing unit identifier in which to bill + # this price. + # + # @return [String] + required :currency, String + + # @!attribute expires_at_end_of_cadence + # Whether the allocated amount should expire at the end of the cadence or roll + # over to the next period. + # + # @return [Boolean] + required :expires_at_end_of_cadence, Orb::BooleanModel + + # @!parse + # # The definition of a new allocation price to create and add to the subscription. + # # + # # @param amount [String] + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::AllocationPrice::Cadence] + # # @param currency [String] + # # @param expires_at_end_of_cadence [Boolean] + # # + # def initialize(amount:, cadence:, currency:, expires_at_end_of_cadence:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence at which to allocate the amount to the customer. + # + # @example + # ```ruby + # case cadence + # in :one_time + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :semi_annual + # # ... + # in :annual + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class Discount < Orb::BaseModel + # @!attribute discount_type + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Discount::DiscountType] + required :discount_type, enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Discount::DiscountType } + + # @!attribute amount_discount + # Only available if discount_type is `amount`. + # + # @return [String, nil] + optional :amount_discount, String, nil?: true + + # @!attribute percentage_discount + # Only available if discount_type is `percentage`. This is a number between 0 + # and 1. + # + # @return [Float, nil] + optional :percentage_discount, Float, nil?: true + + # @!attribute usage_discount + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for + # + # @return [Float, nil] + optional :usage_discount, Float, nil?: true + + # @!parse + # # @param discount_type [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Discount::DiscountType] + # # @param amount_discount [String, nil] + # # @param percentage_discount [Float, nil] + # # @param usage_discount [Float, nil] + # # + # def initialize(discount_type:, amount_discount: nil, percentage_discount: nil, usage_discount: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case discount_type + # in :percentage + # # ... + # in :usage + # # ... + # in :amount + # # ... + # end + # ``` + class DiscountType < Orb::Enum + PERCENTAGE = :percentage + USAGE = :usage + AMOUNT = :amount + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + # @abstract + # + # The definition of a new price to create and add to the subscription. + # + # @example + # ```ruby + # case price + # in { + # model_type: "unit", + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice ... + # in { + # model_type: "package", + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice ... + # in { + # model_type: "matrix", + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::Cadence, + # item_id: String, + # matrix_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice ... + # in { + # model_type: "tiered", + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice ... + # in { + # model_type: "tiered_bps", + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice ... + # in { + # model_type: "bps", + # bps_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig, + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::Cadence, + # item_id: String + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice ... + # in { + # model_type: "bulk_bps", + # bulk_bps_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig, + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::Cadence, + # item_id: String + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice ... + # in { + # model_type: "bulk", + # bulk_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig, + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::Cadence, + # item_id: String + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice ... + # in { + # model_type: "threshold_total_amount", + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice ... + # in { + # model_type: "tiered_package", + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice ... + # in { + # model_type: "tiered_with_minimum", + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice ... + # in { + # model_type: "unit_with_percent", + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice ... + # in { + # model_type: "package_with_allocation", + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice ... + # in { + # model_type: "tiered_with_proration", + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice ... + # in { + # model_type: "unit_with_proration", + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice ... + # in { + # model_type: "grouped_allocation", + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::Cadence, + # grouped_allocation_config: ^(Orb::HashOf[Orb::Unknown]), + # item_id: String + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice ... + # in { + # model_type: "grouped_with_prorated_minimum", + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::Cadence, + # grouped_with_prorated_minimum_config: ^(Orb::HashOf[Orb::Unknown]), + # item_id: String + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice ... + # in { + # model_type: "bulk_with_proration", + # bulk_with_proration_config: ^(Orb::HashOf[Orb::Unknown]), + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::Cadence, + # item_id: String + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice ... + # in { + # model_type: "scalable_matrix_with_unit_pricing", + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice ... + # in { + # model_type: "scalable_matrix_with_tiered_pricing", + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::Cadence, + # item_id: String, + # name: String + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice ... + # in { + # model_type: "cumulative_grouped_bulk", + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::Cadence, + # cumulative_grouped_bulk_config: ^(Orb::HashOf[Orb::Unknown]), + # item_id: String + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice ... + # in { + # model_type: "max_group_tiered_package", + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::Cadence, + # item_id: String, + # max_group_tiered_package_config: ^(Orb::HashOf[Orb::Unknown]) + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice ... + # in { + # model_type: "grouped_with_metered_minimum", + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::Cadence, + # grouped_with_metered_minimum_config: ^(Orb::HashOf[Orb::Unknown]), + # item_id: String + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice ... + # in { + # model_type: "matrix_with_display_name", + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::Cadence, + # item_id: String, + # matrix_with_display_name_config: ^(Orb::HashOf[Orb::Unknown]) + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice ... + # in { + # model_type: "grouped_tiered_package", + # cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::Cadence, + # grouped_tiered_package_config: ^(Orb::HashOf[Orb::Unknown]), + # item_id: String + # } + # # Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice ... + # end + # ``` + # + # @example + # ```ruby + # case price + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice + # # ... + # in Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice + # # ... + # end + # ``` + class Price < Orb::Union + discriminator :model_type + + variant :unit, -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice } + + variant :package, -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice } + + variant :matrix, -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice } + + variant :tiered, -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice } + + variant :tiered_bps, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice } + + variant :bps, -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice } + + variant :bulk_bps, -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice } + + variant :bulk, -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice } + + variant :threshold_total_amount, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice } + + variant :tiered_package, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice } + + variant :tiered_with_minimum, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice } + + variant :unit_with_percent, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice } + + variant :package_with_allocation, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice } + + variant :tiered_with_proration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice } + + variant :unit_with_proration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice } + + variant :grouped_allocation, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice } + + variant :grouped_with_prorated_minimum, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice } + + variant :bulk_with_proration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice } + + variant :scalable_matrix_with_unit_pricing, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice } + + variant :scalable_matrix_with_tiered_pricing, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice } + + variant :cumulative_grouped_bulk, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice } + + variant :max_group_tiered_package, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice } + + variant :grouped_with_metered_minimum, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice } + + variant :matrix_with_display_name, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice } + + variant :grouped_tiered_package, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice } + + class NewSubscriptionUnitPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :unit] + required :model_type, const: :unit + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute unit_config + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::UnitConfig] + required :unit_config, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::UnitConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param unit_config [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::UnitConfig] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :unit] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # unit_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :unit, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class UnitConfig < Orb::BaseModel + # @!attribute unit_amount + # Rate per unit of usage + # + # @return [String] + required :unit_amount, String + + # @!parse + # # @param unit_amount [String] + # # + # def initialize(unit_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionPackagePrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :package] + required :model_type, const: :package + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute package_config + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::PackageConfig] + required :package_config, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::PackageConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param package_config [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::PackageConfig] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :package] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # package_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :package, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class PackageConfig < Orb::BaseModel + # @!attribute package_amount + # A currency amount to rate usage by + # + # @return [String] + required :package_amount, String + + # @!attribute package_size + # An integer amount to represent package size. For example, 1000 here would divide + # usage by 1000 before multiplying by package_amount in rating + # + # @return [Integer] + required :package_size, Integer + + # @!parse + # # @param package_amount [String] + # # @param package_size [Integer] + # # + # def initialize(package_amount:, package_size:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionMatrixPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_config + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig] + required :matrix_config, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig } + + # @!attribute model_type + # + # @return [Symbol, :matrix] + required :model_type, const: :matrix + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::Cadence] + # # @param item_id [String] + # # @param matrix_config [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :matrix] + # # + # def initialize( + # cadence:, + # item_id:, + # matrix_config:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :matrix, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class MatrixConfig < Orb::BaseModel + # @!attribute default_unit_amount + # Default per unit rate for any usage not bucketed into a specified matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::ArrayOf[String, nil?: true] + + # @!attribute matrix_values + # Matrix values for specified matrix grouping keys + # + # @return [Array] + required :matrix_values, + -> { Orb::ArrayOf[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig::MatrixValue] } + + # @!parse + # # @param default_unit_amount [String] + # # @param dimensions [Array] + # # @param matrix_values [Array] + # # + # def initialize(default_unit_amount:, dimensions:, matrix_values:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class MatrixValue < Orb::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this Matrix value by. For example, + # ["region", "tier"] could be used to filter cloud usage by a cloud region and an + # instance tier. + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Unit price for the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!parse + # # @param dimension_values [Array] + # # @param unit_amount [String] + # # + # def initialize(dimension_values:, unit_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionTieredPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :tiered] + required :model_type, const: :tiered + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute tiered_config + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig] + required :tiered_config, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param tiered_config [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :tiered] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # tiered_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :tiered, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class TieredConfig < Orb::BaseModel + # @!attribute tiers + # Tiers for rating based on total usage quantities into the specified tier + # + # @return [Array] + required :tiers, + -> { Orb::ArrayOf[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig::Tier] } + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute first_unit + # Inclusive tier starting value + # + # @return [Float] + required :first_unit, Float + + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String + + # @!attribute last_unit + # Exclusive tier ending value. If null, this is treated as the last tier + # + # @return [Float, nil] + optional :last_unit, Float, nil?: true + + # @!parse + # # @param first_unit [Float] + # # @param unit_amount [String] + # # @param last_unit [Float, nil] + # # + # def initialize(first_unit:, unit_amount:, last_unit: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionTieredBpsPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :tiered_bps] + required :model_type, const: :tiered_bps + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute tiered_bps_config + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig] + required :tiered_bps_config, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param tiered_bps_config [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :tiered_bps] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # tiered_bps_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :tiered_bps, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class TieredBpsConfig < Orb::BaseModel + # @!attribute tiers + # Tiers for a Graduated BPS pricing model, where usage is bucketed into specified + # tiers + # + # @return [Array] + required :tiers, + -> { Orb::ArrayOf[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig::Tier] } + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute bps + # Per-event basis point rate + # + # @return [Float] + required :bps, Float + + # @!attribute minimum_amount + # Inclusive tier starting value + # + # @return [String] + required :minimum_amount, String + + # @!attribute maximum_amount + # Exclusive tier ending value + # + # @return [String, nil] + optional :maximum_amount, String, nil?: true + + # @!attribute per_unit_maximum + # Per unit maximum to charge + # + # @return [String, nil] + optional :per_unit_maximum, String, nil?: true + + # @!parse + # # @param bps [Float] + # # @param minimum_amount [String] + # # @param maximum_amount [String, nil] + # # @param per_unit_maximum [String, nil] + # # + # def initialize(bps:, minimum_amount:, maximum_amount: nil, per_unit_maximum: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionBpsPrice < Orb::BaseModel + # @!attribute bps_config + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig] + required :bps_config, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig } + + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :bps] + required :model_type, const: :bps + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param bps_config [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig] + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :bps] + # # + # def initialize( + # bps_config:, + # cadence:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :bps, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class BpsConfig < Orb::BaseModel + # @!attribute bps + # Basis point take rate per event + # + # @return [Float] + required :bps, Float + + # @!attribute per_unit_maximum + # Optional currency amount maximum to cap spend per event + # + # @return [String, nil] + optional :per_unit_maximum, String, nil?: true + + # @!parse + # # @param bps [Float] + # # @param per_unit_maximum [String, nil] + # # + # def initialize(bps:, per_unit_maximum: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionBulkBpsPrice < Orb::BaseModel + # @!attribute bulk_bps_config + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig] + required :bulk_bps_config, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig } + + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :bulk_bps] + required :model_type, const: :bulk_bps + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param bulk_bps_config [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig] + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :bulk_bps] + # # + # def initialize( + # bulk_bps_config:, + # cadence:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :bulk_bps, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class BulkBpsConfig < Orb::BaseModel + # @!attribute tiers + # Tiers for a bulk BPS pricing model where all usage is aggregated to a single + # tier based on total volume + # + # @return [Array] + required :tiers, + -> { Orb::ArrayOf[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig::Tier] } + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute bps + # Basis points to rate on + # + # @return [Float] + required :bps, Float + + # @!attribute maximum_amount + # Upper bound for tier + # + # @return [String, nil] + optional :maximum_amount, String, nil?: true + + # @!attribute per_unit_maximum + # The maximum amount to charge for any one event + # + # @return [String, nil] + optional :per_unit_maximum, String, nil?: true + + # @!parse + # # @param bps [Float] + # # @param maximum_amount [String, nil] + # # @param per_unit_maximum [String, nil] + # # + # def initialize(bps:, maximum_amount: nil, per_unit_maximum: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionBulkPrice < Orb::BaseModel + # @!attribute bulk_config + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig] + required :bulk_config, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig } + + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :bulk] + required :model_type, const: :bulk + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param bulk_config [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig] + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :bulk] + # # + # def initialize( + # bulk_config:, + # cadence:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :bulk, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class BulkConfig < Orb::BaseModel + # @!attribute tiers + # Bulk tiers for rating based on total usage volume + # + # @return [Array] + required :tiers, + -> { Orb::ArrayOf[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig::Tier] } + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String + + # @!attribute maximum_units + # Upper bound for this tier + # + # @return [Float, nil] + optional :maximum_units, Float, nil?: true + + # @!parse + # # @param unit_amount [String] + # # @param maximum_units [Float, nil] + # # + # def initialize(unit_amount:, maximum_units: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionThresholdTotalAmountPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :threshold_total_amount] + required :model_type, const: :threshold_total_amount + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute threshold_total_amount_config + # + # @return [Hash{Symbol=>Object}] + required :threshold_total_amount_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param threshold_total_amount_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :threshold_total_amount] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # threshold_total_amount_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :threshold_total_amount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionTieredPackagePrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :tiered_package] + required :model_type, const: :tiered_package + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute tiered_package_config + # + # @return [Hash{Symbol=>Object}] + required :tiered_package_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param tiered_package_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :tiered_package] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # tiered_package_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :tiered_package, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionTieredWithMinimumPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :tiered_with_minimum] + required :model_type, const: :tiered_with_minimum + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute tiered_with_minimum_config + # + # @return [Hash{Symbol=>Object}] + required :tiered_with_minimum_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param tiered_with_minimum_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :tiered_with_minimum] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # tiered_with_minimum_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :tiered_with_minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionUnitWithPercentPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :unit_with_percent] + required :model_type, const: :unit_with_percent + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute unit_with_percent_config + # + # @return [Hash{Symbol=>Object}] + required :unit_with_percent_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param unit_with_percent_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :unit_with_percent] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # unit_with_percent_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :unit_with_percent, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionPackageWithAllocationPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :package_with_allocation] + required :model_type, const: :package_with_allocation + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute package_with_allocation_config + # + # @return [Hash{Symbol=>Object}] + required :package_with_allocation_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param package_with_allocation_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :package_with_allocation] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # package_with_allocation_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :package_with_allocation, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionTierWithProrationPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :tiered_with_proration] + required :model_type, const: :tiered_with_proration + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute tiered_with_proration_config + # + # @return [Hash{Symbol=>Object}] + required :tiered_with_proration_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param tiered_with_proration_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :tiered_with_proration] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # tiered_with_proration_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :tiered_with_proration, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionUnitWithProrationPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :unit_with_proration] + required :model_type, const: :unit_with_proration + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute unit_with_proration_config + # + # @return [Hash{Symbol=>Object}] + required :unit_with_proration_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param unit_with_proration_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :unit_with_proration] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # unit_with_proration_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :unit_with_proration, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionGroupedAllocationPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::Cadence } + + # @!attribute grouped_allocation_config + # + # @return [Hash{Symbol=>Object}] + required :grouped_allocation_config, Orb::HashOf[Orb::Unknown] + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :grouped_allocation] + required :model_type, const: :grouped_allocation + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::Cadence] + # # @param grouped_allocation_config [Hash{Symbol=>Object}] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :grouped_allocation] + # # + # def initialize( + # cadence:, + # grouped_allocation_config:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :grouped_allocation, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionGroupedWithProratedMinimumPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::Cadence } + + # @!attribute grouped_with_prorated_minimum_config + # + # @return [Hash{Symbol=>Object}] + required :grouped_with_prorated_minimum_config, Orb::HashOf[Orb::Unknown] + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :grouped_with_prorated_minimum] + required :model_type, const: :grouped_with_prorated_minimum + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::Cadence] + # # @param grouped_with_prorated_minimum_config [Hash{Symbol=>Object}] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :grouped_with_prorated_minimum] + # # + # def initialize( + # cadence:, + # grouped_with_prorated_minimum_config:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :grouped_with_prorated_minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionBulkWithProrationPrice < Orb::BaseModel + # @!attribute bulk_with_proration_config + # + # @return [Hash{Symbol=>Object}] + required :bulk_with_proration_config, Orb::HashOf[Orb::Unknown] + + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :bulk_with_proration] + required :model_type, const: :bulk_with_proration + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param bulk_with_proration_config [Hash{Symbol=>Object}] + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :bulk_with_proration] + # # + # def initialize( + # bulk_with_proration_config:, + # cadence:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :bulk_with_proration, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionScalableMatrixWithUnitPricingPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :scalable_matrix_with_unit_pricing] + required :model_type, const: :scalable_matrix_with_unit_pricing + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute scalable_matrix_with_unit_pricing_config + # + # @return [Hash{Symbol=>Object}] + required :scalable_matrix_with_unit_pricing_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param scalable_matrix_with_unit_pricing_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :scalable_matrix_with_unit_pricing] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # scalable_matrix_with_unit_pricing_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :scalable_matrix_with_unit_pricing, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionScalableMatrixWithTieredPricingPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :scalable_matrix_with_tiered_pricing] + required :model_type, const: :scalable_matrix_with_tiered_pricing + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute scalable_matrix_with_tiered_pricing_config + # + # @return [Hash{Symbol=>Object}] + required :scalable_matrix_with_tiered_pricing_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::Cadence] + # # @param item_id [String] + # # @param name [String] + # # @param scalable_matrix_with_tiered_pricing_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :scalable_matrix_with_tiered_pricing] + # # + # def initialize( + # cadence:, + # item_id:, + # name:, + # scalable_matrix_with_tiered_pricing_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :scalable_matrix_with_tiered_pricing, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionCumulativeGroupedBulkPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::Cadence } + + # @!attribute cumulative_grouped_bulk_config + # + # @return [Hash{Symbol=>Object}] + required :cumulative_grouped_bulk_config, Orb::HashOf[Orb::Unknown] + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :cumulative_grouped_bulk] + required :model_type, const: :cumulative_grouped_bulk + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::Cadence] + # # @param cumulative_grouped_bulk_config [Hash{Symbol=>Object}] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :cumulative_grouped_bulk] + # # + # def initialize( + # cadence:, + # cumulative_grouped_bulk_config:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :cumulative_grouped_bulk, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionMaxGroupTieredPackagePrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute max_group_tiered_package_config + # + # @return [Hash{Symbol=>Object}] + required :max_group_tiered_package_config, Orb::HashOf[Orb::Unknown] + + # @!attribute model_type + # + # @return [Symbol, :max_group_tiered_package] + required :model_type, const: :max_group_tiered_package + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::Cadence] + # # @param item_id [String] + # # @param max_group_tiered_package_config [Hash{Symbol=>Object}] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :max_group_tiered_package] + # # + # def initialize( + # cadence:, + # item_id:, + # max_group_tiered_package_config:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :max_group_tiered_package, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionGroupedWithMeteredMinimumPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::Cadence } + + # @!attribute grouped_with_metered_minimum_config + # + # @return [Hash{Symbol=>Object}] + required :grouped_with_metered_minimum_config, Orb::HashOf[Orb::Unknown] + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :grouped_with_metered_minimum] + required :model_type, const: :grouped_with_metered_minimum + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::Cadence] + # # @param grouped_with_metered_minimum_config [Hash{Symbol=>Object}] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :grouped_with_metered_minimum] + # # + # def initialize( + # cadence:, + # grouped_with_metered_minimum_config:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :grouped_with_metered_minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionMatrixWithDisplayNamePrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_display_name_config + # + # @return [Hash{Symbol=>Object}] + required :matrix_with_display_name_config, Orb::HashOf[Orb::Unknown] + + # @!attribute model_type + # + # @return [Symbol, :matrix_with_display_name] + required :model_type, const: :matrix_with_display_name + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::Cadence] + # # @param item_id [String] + # # @param matrix_with_display_name_config [Hash{Symbol=>Object}] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :matrix_with_display_name] + # # + # def initialize( + # cadence:, + # item_id:, + # matrix_with_display_name_config:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :matrix_with_display_name, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewSubscriptionGroupedTieredPackagePrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::Cadence] + required :cadence, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::Cadence } + + # @!attribute grouped_tiered_package_config + # + # @return [Hash{Symbol=>Object}] + required :grouped_tiered_package_config, Orb::HashOf[Orb::Unknown] + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :grouped_tiered_package] + required :model_type, const: :grouped_tiered_package + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::Cadence] + # # @param grouped_tiered_package_config [Hash{Symbol=>Object}] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param currency [String, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param reference_id [String, nil] + # # @param model_type [Symbol, :grouped_tiered_package] + # # + # def initialize( + # cadence:, + # grouped_tiered_package_config:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # currency: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # reference_id: nil, + # model_type: :grouped_tiered_package, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + end end end end diff --git a/lib/orb/models/sub_line_item_grouping_model.rb b/lib/orb/models/sub_line_item_grouping_model.rb deleted file mode 100644 index c74c5481..00000000 --- a/lib/orb/models/sub_line_item_grouping_model.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class SubLineItemGroupingModel < Orb::BaseModel - # @!attribute key - # - # @return [String] - required :key, String - - # @!attribute value - # No value indicates the default group - # - # @return [String, nil] - required :value, String, nil?: true - - # @!parse - # # @param key [String] - # # @param value [String, nil] - # # - # def initialize(key:, value:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/subscription.rb b/lib/orb/models/subscription.rb index 8739947d..21d30e23 100644 --- a/lib/orb/models/subscription.rb +++ b/lib/orb/models/subscription.rb @@ -18,8 +18,8 @@ class Subscription < Orb::BaseModel # @!attribute adjustment_intervals # The adjustment intervals for this subscription. # - # @return [Array] - required :adjustment_intervals, -> { Orb::ArrayOf[Orb::Models::AdjustmentIntervalModel] } + # @return [Array] + required :adjustment_intervals, -> { Orb::ArrayOf[Orb::Models::Subscription::AdjustmentInterval] } # @!attribute auto_collection # Determines whether issued invoices for this subscription will automatically be @@ -31,8 +31,9 @@ class Subscription < Orb::BaseModel # @!attribute billing_cycle_anchor_configuration # - # @return [Orb::Models::BillingCycleAnchorConfigurationModel] - required :billing_cycle_anchor_configuration, -> { Orb::Models::BillingCycleAnchorConfigurationModel } + # @return [Orb::Models::Subscription::BillingCycleAnchorConfiguration] + required :billing_cycle_anchor_configuration, + -> { Orb::Models::Subscription::BillingCycleAnchorConfiguration } # @!attribute billing_cycle_day # The day of the month on which the billing cycle is anchored. If the maximum @@ -84,8 +85,8 @@ class Subscription < Orb::BaseModel # your account's timezone. See [Timezone localization](/essentials/timezones) for # information on what this timezone parameter influences within Orb. # - # @return [Orb::Models::CustomerModel] - required :customer, -> { Orb::Models::CustomerModel } + # @return [Orb::Models::Customer] + required :customer, -> { Orb::Models::Customer } # @!attribute default_invoice_memo # Determines the default memo on this subscriptions' invoices. Note that if this @@ -97,7 +98,7 @@ class Subscription < Orb::BaseModel # @!attribute discount_intervals # The discount intervals for this subscription. # - # @return [Array] + # @return [Array] required :discount_intervals, -> { Orb::ArrayOf[union: Orb::Models::Subscription::DiscountInterval] } # @!attribute end_date @@ -108,9 +109,9 @@ class Subscription < Orb::BaseModel # @!attribute fixed_fee_quantity_schedule # - # @return [Array] + # @return [Array] required :fixed_fee_quantity_schedule, - -> { Orb::ArrayOf[Orb::Models::FixedFeeQuantityScheduleEntryModel] } + -> { Orb::ArrayOf[Orb::Models::Subscription::FixedFeeQuantitySchedule] } # @!attribute invoicing_threshold # @@ -120,8 +121,8 @@ class Subscription < Orb::BaseModel # @!attribute maximum_intervals # The maximum intervals for this subscription. # - # @return [Array] - required :maximum_intervals, -> { Orb::ArrayOf[Orb::Models::MaximumIntervalModel] } + # @return [Array] + required :maximum_intervals, -> { Orb::ArrayOf[Orb::Models::Subscription::MaximumInterval] } # @!attribute metadata # User specified key-value pairs for the resource. If not present, this defaults @@ -135,8 +136,8 @@ class Subscription < Orb::BaseModel # @!attribute minimum_intervals # The minimum intervals for this subscription. # - # @return [Array] - required :minimum_intervals, -> { Orb::ArrayOf[Orb::Models::MinimumIntervalModel] } + # @return [Array] + required :minimum_intervals, -> { Orb::ArrayOf[Orb::Models::Subscription::MinimumInterval] } # @!attribute net_terms # Determines the difference between the invoice issue date for subscription @@ -153,19 +154,19 @@ class Subscription < Orb::BaseModel # subscription. You can see more about how to configure prices in the # [Price resource](/reference/price). # - # @return [Orb::Models::PlanModel] - required :plan, -> { Orb::Models::PlanModel } + # @return [Orb::Models::Plan] + required :plan, -> { Orb::Models::Plan } # @!attribute price_intervals # The price intervals for this subscription. # - # @return [Array] - required :price_intervals, -> { Orb::ArrayOf[Orb::Models::PriceIntervalModel] } + # @return [Array] + required :price_intervals, -> { Orb::ArrayOf[Orb::Models::Subscription::PriceInterval] } # @!attribute redeemed_coupon # - # @return [Orb::Models::CouponRedemptionModel, nil] - required :redeemed_coupon, -> { Orb::Models::CouponRedemptionModel }, nil?: true + # @return [Orb::Models::Subscription::RedeemedCoupon, nil] + required :redeemed_coupon, -> { Orb::Models::Subscription::RedeemedCoupon }, nil?: true # @!attribute start_date # The date Orb starts billing for this subscription. @@ -180,8 +181,8 @@ class Subscription < Orb::BaseModel # @!attribute trial_info # - # @return [Orb::Models::SubscriptionTrialInfoModel] - required :trial_info, -> { Orb::Models::SubscriptionTrialInfoModel } + # @return [Orb::Models::Subscription::TrialInfo] + required :trial_info, -> { Orb::Models::Subscription::TrialInfo } # @!parse # # A [subscription](/core-concepts#subscription) represents the purchase of a plan @@ -206,29 +207,29 @@ class Subscription < Orb::BaseModel # # # # @param id [String] # # @param active_plan_phase_order [Integer, nil] - # # @param adjustment_intervals [Array] + # # @param adjustment_intervals [Array] # # @param auto_collection [Boolean, nil] - # # @param billing_cycle_anchor_configuration [Orb::Models::BillingCycleAnchorConfigurationModel] + # # @param billing_cycle_anchor_configuration [Orb::Models::Subscription::BillingCycleAnchorConfiguration] # # @param billing_cycle_day [Integer] # # @param created_at [Time] # # @param current_billing_period_end_date [Time, nil] # # @param current_billing_period_start_date [Time, nil] - # # @param customer [Orb::Models::CustomerModel] + # # @param customer [Orb::Models::Customer] # # @param default_invoice_memo [String, nil] - # # @param discount_intervals [Array] + # # @param discount_intervals [Array] # # @param end_date [Time, nil] - # # @param fixed_fee_quantity_schedule [Array] + # # @param fixed_fee_quantity_schedule [Array] # # @param invoicing_threshold [String, nil] - # # @param maximum_intervals [Array] + # # @param maximum_intervals [Array] # # @param metadata [Hash{Symbol=>String}] - # # @param minimum_intervals [Array] + # # @param minimum_intervals [Array] # # @param net_terms [Integer] - # # @param plan [Orb::Models::PlanModel] - # # @param price_intervals [Array] - # # @param redeemed_coupon [Orb::Models::CouponRedemptionModel, nil] + # # @param plan [Orb::Models::Plan] + # # @param price_intervals [Array] + # # @param redeemed_coupon [Orb::Models::Subscription::RedeemedCoupon, nil] # # @param start_date [Time] # # @param status [Symbol, Orb::Models::Subscription::Status] - # # @param trial_info [Orb::Models::SubscriptionTrialInfoModel] + # # @param trial_info [Orb::Models::Subscription::TrialInfo] # # # def initialize( # id:, @@ -263,6 +264,507 @@ class Subscription < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class AdjustmentInterval < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment + # + # @return [Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] + required :adjustment, union: -> { Orb::Models::Subscription::AdjustmentInterval::Adjustment } + + # @!attribute applies_to_price_interval_ids + # The price interval IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the adjustment interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the adjustment interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param id [String] + # # @param adjustment [Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # + # def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case adjustment + # in { + # adjustment_type: "usage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment ... + # in { + # adjustment_type: "amount_discount", + # id: String, + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment ... + # in { + # adjustment_type: "percentage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment ... + # in { + # adjustment_type: "minimum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment ... + # in { + # adjustment_type: "maximum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment ... + # end + # ``` + # + # @example + # ```ruby + # case adjustment + # in Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment + # # ... + # in Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment + # # ... + # in Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment + # # ... + # in Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment + # # ... + # in Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + # # ... + # end + # ``` + class Adjustment < Orb::Union + discriminator :adjustment_type + + variant :usage_discount, + -> { Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment } + + variant :amount_discount, + -> { Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment } + + variant :percentage_discount, + -> { Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment } + + variant :minimum, + -> { Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment } + + variant :maximum, + -> { Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :usage_discount] + required :adjustment_type, const: :usage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!attribute usage_discount + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param usage_discount [Float] + # # @param adjustment_type [Symbol, :usage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # usage_discount:, + # adjustment_type: :usage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :amount_discount] + required :adjustment_type, const: :amount_discount + + # @!attribute amount_discount + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :amount_discount] + # # + # def initialize( + # id:, + # amount_discount:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # adjustment_type: :amount_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :percentage_discount] + required :adjustment_type, const: :percentage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute percentage_discount + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param percentage_discount [Float] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :percentage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # percentage_discount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :percentage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :minimum] + required :adjustment_type, const: :minimum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute item_id + # The item ID that revenue from this minimum will be attributed to. + # + # @return [String] + required :item_id, String + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param item_id [String] + # # @param minimum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :minimum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # item_id:, + # minimum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :maximum] + required :adjustment_type, const: :maximum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param maximum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :maximum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # maximum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :maximum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + # @!attribute day + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. + # + # @return [Integer] + required :day, Integer + + # @!attribute month + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). + # + # @return [Integer, nil] + optional :month, Integer, nil?: true + + # @!attribute year + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). + # + # @return [Integer, nil] + optional :year, Integer, nil?: true + + # @!parse + # # @param day [Integer] + # # @param month [Integer, nil] + # # @param year [Integer, nil] + # # + # def initialize(day:, month: nil, year: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -274,43 +776,508 @@ class Subscription < Orb::BaseModel # applies_to_price_ids: ^(Orb::ArrayOf[String]), # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]) # } - # # Orb::Models::AmountDiscountIntervalModel ... + # # Orb::Models::Subscription::DiscountInterval::AmountDiscountInterval ... # in { # discount_type: "percentage", # applies_to_price_ids: ^(Orb::ArrayOf[String]), # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), # end_date: Time # } - # # Orb::Models::PercentageDiscountIntervalModel ... + # # Orb::Models::Subscription::DiscountInterval::PercentageDiscountInterval ... # in { # discount_type: "usage", # applies_to_price_ids: ^(Orb::ArrayOf[String]), # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), # end_date: Time # } - # # Orb::Models::UsageDiscountIntervalModel ... + # # Orb::Models::Subscription::DiscountInterval::UsageDiscountInterval ... # end # ``` # # @example # ```ruby # case discount_interval - # in Orb::Models::AmountDiscountIntervalModel + # in Orb::Models::Subscription::DiscountInterval::AmountDiscountInterval # # ... - # in Orb::Models::PercentageDiscountIntervalModel + # in Orb::Models::Subscription::DiscountInterval::PercentageDiscountInterval # # ... - # in Orb::Models::UsageDiscountIntervalModel + # in Orb::Models::Subscription::DiscountInterval::UsageDiscountInterval # # ... # end # ``` class DiscountInterval < Orb::Union discriminator :discount_type - variant :amount, -> { Orb::Models::AmountDiscountIntervalModel } + variant :amount, -> { Orb::Models::Subscription::DiscountInterval::AmountDiscountInterval } + + variant :percentage, -> { Orb::Models::Subscription::DiscountInterval::PercentageDiscountInterval } + + variant :usage, -> { Orb::Models::Subscription::DiscountInterval::UsageDiscountInterval } + + class AmountDiscountInterval < Orb::BaseModel + # @!attribute amount_discount + # Only available if discount_type is `amount`. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :amount] + required :discount_type, const: :amount + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # @param discount_type [Symbol, :amount] + # # + # def initialize( + # amount_discount:, + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # start_date:, + # discount_type: :amount, + # ** + # ) + # super + # end - variant :percentage, -> { Orb::Models::PercentageDiscountIntervalModel } + # def initialize: (Hash | Orb::BaseModel) -> void + end - variant :usage, -> { Orb::Models::UsageDiscountIntervalModel } + class PercentageDiscountInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :percentage] + required :discount_type, const: :percentage + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute percentage_discount + # Only available if discount_type is `percentage`.This is a number between 0 + # and 1. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param percentage_discount [Float] + # # @param start_date [Time] + # # @param discount_type [Symbol, :percentage] + # # + # def initialize( + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # percentage_discount:, + # start_date:, + # discount_type: :percentage, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class UsageDiscountInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :usage] + required :discount_type, const: :usage + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!attribute usage_discount + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # @param usage_discount [Float] + # # @param discount_type [Symbol, :usage] + # # + # def initialize( + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # start_date:, + # usage_discount:, + # discount_type: :usage, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class FixedFeeQuantitySchedule < Orb::BaseModel + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute price_id + # + # @return [String] + required :price_id, String + + # @!attribute quantity + # + # @return [Float] + required :quantity, Float + + # @!attribute start_date + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param end_date [Time, nil] + # # @param price_id [String] + # # @param quantity [Float] + # # @param start_date [Time] + # # + # def initialize(end_date:, price_id:, quantity:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MaximumInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this maximum interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this maximum interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the maximum interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the price intervals + # this transform applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute start_date + # The start date of the maximum interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param maximum_amount [String] + # # @param start_date [Time] + # # + # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, maximum_amount:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MinimumInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this minimum interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this minimum interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the minimum interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the price intervals + # this minimum applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute start_date + # The start date of the minimum interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param minimum_amount [String] + # # @param start_date [Time] + # # + # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, minimum_amount:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PriceInterval < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute billing_cycle_day + # The day of the month that Orb bills for this price + # + # @return [Integer] + required :billing_cycle_day, Integer + + # @!attribute current_billing_period_end_date + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is exactly the end of the billing period. Set to null if + # this price interval is not currently active. + # + # @return [Time, nil] + required :current_billing_period_end_date, Time, nil?: true + + # @!attribute current_billing_period_start_date + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if this price interval is not currently active. + # + # @return [Time, nil] + required :current_billing_period_start_date, Time, nil?: true + + # @!attribute end_date + # The end date of the price interval. This is the date that Orb stops billing for + # this price. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute filter + # An additional filter to apply to usage queries. + # + # @return [String, nil] + required :filter, String, nil?: true + + # @!attribute fixed_fee_quantity_transitions + # The fixed fee quantity transitions for this price interval. This is only + # relevant for fixed fees. + # + # @return [Array, nil] + required :fixed_fee_quantity_transitions, + -> { Orb::ArrayOf[Orb::Models::Subscription::PriceInterval::FixedFeeQuantityTransition] }, + nil?: true + + # @!attribute price + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) + # + # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + required :price, union: -> { Orb::Models::Price } + + # @!attribute start_date + # The start date of the price interval. This is the date that Orb starts billing + # for this price. + # + # @return [Time] + required :start_date, Time + + # @!attribute usage_customer_ids + # A list of customer IDs whose usage events will be aggregated and billed under + # this price interval. + # + # @return [Array, nil] + required :usage_customer_ids, Orb::ArrayOf[String], nil?: true + + # @!parse + # # The Price Interval resource represents a period of time for which a price will + # # bill on a subscription. A subscription’s price intervals define its billing + # # behavior. + # # + # # @param id [String] + # # @param billing_cycle_day [Integer] + # # @param current_billing_period_end_date [Time, nil] + # # @param current_billing_period_start_date [Time, nil] + # # @param end_date [Time, nil] + # # @param filter [String, nil] + # # @param fixed_fee_quantity_transitions [Array, nil] + # # @param price [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + # # @param start_date [Time] + # # @param usage_customer_ids [Array, nil] + # # + # def initialize( + # id:, + # billing_cycle_day:, + # current_billing_period_end_date:, + # current_billing_period_start_date:, + # end_date:, + # filter:, + # fixed_fee_quantity_transitions:, + # price:, + # start_date:, + # usage_customer_ids:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class FixedFeeQuantityTransition < Orb::BaseModel + # @!attribute effective_date + # + # @return [Time] + required :effective_date, Time + + # @!attribute price_id + # + # @return [String] + required :price_id, String + + # @!attribute quantity + # + # @return [Integer] + required :quantity, Integer + + # @!parse + # # @param effective_date [Time] + # # @param price_id [String] + # # @param quantity [Integer] + # # + # def initialize(effective_date:, price_id:, quantity:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class RedeemedCoupon < Orb::BaseModel + # @!attribute coupon_id + # + # @return [String] + required :coupon_id, String + + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param coupon_id [String] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # + # def initialize(coupon_id:, end_date:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void end # @abstract @@ -338,6 +1305,20 @@ class Status < Orb::Enum # # # def self.values; end end + + class TrialInfo < Orb::BaseModel + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!parse + # # @param end_date [Time, nil] + # # + # def initialize(end_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end end end diff --git a/lib/orb/models/subscription_cancel_response.rb b/lib/orb/models/subscription_cancel_response.rb new file mode 100644 index 00000000..25b58b51 --- /dev/null +++ b/lib/orb/models/subscription_cancel_response.rb @@ -0,0 +1,1308 @@ +# frozen_string_literal: true + +module Orb + module Models + class SubscriptionCancelResponse < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute active_plan_phase_order + # The current plan phase that is active, only if the subscription's plan has + # phases. + # + # @return [Integer, nil] + required :active_plan_phase_order, Integer, nil?: true + + # @!attribute adjustment_intervals + # The adjustment intervals for this subscription. + # + # @return [Array] + required :adjustment_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionCancelResponse::AdjustmentInterval] } + + # @!attribute auto_collection + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. This property defaults to + # the plan's behavior. If null, defaults to the customer's setting. + # + # @return [Boolean, nil] + required :auto_collection, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_anchor_configuration + # + # @return [Orb::Models::SubscriptionCancelResponse::BillingCycleAnchorConfiguration] + required :billing_cycle_anchor_configuration, + -> { Orb::Models::SubscriptionCancelResponse::BillingCycleAnchorConfiguration } + + # @!attribute billing_cycle_day + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. + # + # @return [Integer] + required :billing_cycle_day, Integer + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute current_billing_period_end_date + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is not part of the billing period. Set to null for + # subscriptions that are not currently active. + # + # @return [Time, nil] + required :current_billing_period_end_date, Time, nil?: true + + # @!attribute current_billing_period_start_date + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if the subscription is not currently active. + # + # @return [Time, nil] + required :current_billing_period_start_date, Time, nil?: true + + # @!attribute customer + # A customer is a buyer of your products, and the other party to the billing + # relationship. + # + # In Orb, customers are assigned system generated identifiers automatically, but + # it's often desirable to have these match existing identifiers in your system. To + # avoid having to denormalize Orb ID information, you can pass in an + # `external_customer_id` with your own identifier. See + # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further + # information about how these aliases work in Orb. + # + # In addition to having an identifier in your system, a customer may exist in a + # payment provider solution like Stripe. Use the `payment_provider_id` and the + # `payment_provider` enum field to express this mapping. + # + # A customer also has a timezone (from the standard + # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to + # your account's timezone. See [Timezone localization](/essentials/timezones) for + # information on what this timezone parameter influences within Orb. + # + # @return [Orb::Models::Customer] + required :customer, -> { Orb::Models::Customer } + + # @!attribute default_invoice_memo + # Determines the default memo on this subscriptions' invoices. Note that if this + # is not provided, it is determined by the plan configuration. + # + # @return [String, nil] + required :default_invoice_memo, String, nil?: true + + # @!attribute discount_intervals + # The discount intervals for this subscription. + # + # @return [Array] + required :discount_intervals, + -> { Orb::ArrayOf[union: Orb::Models::SubscriptionCancelResponse::DiscountInterval] } + + # @!attribute end_date + # The date Orb stops billing for this subscription. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute fixed_fee_quantity_schedule + # + # @return [Array] + required :fixed_fee_quantity_schedule, + -> { Orb::ArrayOf[Orb::Models::SubscriptionCancelResponse::FixedFeeQuantitySchedule] } + + # @!attribute invoicing_threshold + # + # @return [String, nil] + required :invoicing_threshold, String, nil?: true + + # @!attribute maximum_intervals + # The maximum intervals for this subscription. + # + # @return [Array] + required :maximum_intervals, -> { Orb::ArrayOf[Orb::Models::SubscriptionCancelResponse::MaximumInterval] } + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute minimum_intervals + # The minimum intervals for this subscription. + # + # @return [Array] + required :minimum_intervals, -> { Orb::ArrayOf[Orb::Models::SubscriptionCancelResponse::MinimumInterval] } + + # @!attribute net_terms + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of `0` here represents that the + # invoice is due on issue, whereas a value of `30` represents that the customer + # has a month to pay the invoice. + # + # @return [Integer] + required :net_terms, Integer + + # @!attribute plan + # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + # subscribed to by a customer. Plans define the billing behavior of the + # subscription. You can see more about how to configure prices in the + # [Price resource](/reference/price). + # + # @return [Orb::Models::Plan] + required :plan, -> { Orb::Models::Plan } + + # @!attribute price_intervals + # The price intervals for this subscription. + # + # @return [Array] + required :price_intervals, -> { Orb::ArrayOf[Orb::Models::SubscriptionCancelResponse::PriceInterval] } + + # @!attribute redeemed_coupon + # + # @return [Orb::Models::SubscriptionCancelResponse::RedeemedCoupon, nil] + required :redeemed_coupon, -> { Orb::Models::SubscriptionCancelResponse::RedeemedCoupon }, nil?: true + + # @!attribute start_date + # The date Orb starts billing for this subscription. + # + # @return [Time] + required :start_date, Time + + # @!attribute status + # + # @return [Symbol, Orb::Models::SubscriptionCancelResponse::Status] + required :status, enum: -> { Orb::Models::SubscriptionCancelResponse::Status } + + # @!attribute trial_info + # + # @return [Orb::Models::SubscriptionCancelResponse::TrialInfo] + required :trial_info, -> { Orb::Models::SubscriptionCancelResponse::TrialInfo } + + # @!parse + # # @param id [String] + # # @param active_plan_phase_order [Integer, nil] + # # @param adjustment_intervals [Array] + # # @param auto_collection [Boolean, nil] + # # @param billing_cycle_anchor_configuration [Orb::Models::SubscriptionCancelResponse::BillingCycleAnchorConfiguration] + # # @param billing_cycle_day [Integer] + # # @param created_at [Time] + # # @param current_billing_period_end_date [Time, nil] + # # @param current_billing_period_start_date [Time, nil] + # # @param customer [Orb::Models::Customer] + # # @param default_invoice_memo [String, nil] + # # @param discount_intervals [Array] + # # @param end_date [Time, nil] + # # @param fixed_fee_quantity_schedule [Array] + # # @param invoicing_threshold [String, nil] + # # @param maximum_intervals [Array] + # # @param metadata [Hash{Symbol=>String}] + # # @param minimum_intervals [Array] + # # @param net_terms [Integer] + # # @param plan [Orb::Models::Plan] + # # @param price_intervals [Array] + # # @param redeemed_coupon [Orb::Models::SubscriptionCancelResponse::RedeemedCoupon, nil] + # # @param start_date [Time] + # # @param status [Symbol, Orb::Models::SubscriptionCancelResponse::Status] + # # @param trial_info [Orb::Models::SubscriptionCancelResponse::TrialInfo] + # # + # def initialize( + # id:, + # active_plan_phase_order:, + # adjustment_intervals:, + # auto_collection:, + # billing_cycle_anchor_configuration:, + # billing_cycle_day:, + # created_at:, + # current_billing_period_end_date:, + # current_billing_period_start_date:, + # customer:, + # default_invoice_memo:, + # discount_intervals:, + # end_date:, + # fixed_fee_quantity_schedule:, + # invoicing_threshold:, + # maximum_intervals:, + # metadata:, + # minimum_intervals:, + # net_terms:, + # plan:, + # price_intervals:, + # redeemed_coupon:, + # start_date:, + # status:, + # trial_info:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class AdjustmentInterval < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment + # + # @return [Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] + required :adjustment, + union: -> { Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment } + + # @!attribute applies_to_price_interval_ids + # The price interval IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the adjustment interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the adjustment interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param id [String] + # # @param adjustment [Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # + # def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case adjustment + # in { + # adjustment_type: "usage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment ... + # in { + # adjustment_type: "amount_discount", + # id: String, + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment ... + # in { + # adjustment_type: "percentage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment ... + # in { + # adjustment_type: "minimum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment ... + # in { + # adjustment_type: "maximum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment ... + # end + # ``` + # + # @example + # ```ruby + # case adjustment + # in Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment + # # ... + # in Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + # # ... + # end + # ``` + class Adjustment < Orb::Union + discriminator :adjustment_type + + variant :usage_discount, + -> { Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment } + + variant :amount_discount, + -> { Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment } + + variant :percentage_discount, + -> { Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment } + + variant :minimum, + -> { Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment } + + variant :maximum, + -> { Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :usage_discount] + required :adjustment_type, const: :usage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!attribute usage_discount + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param usage_discount [Float] + # # @param adjustment_type [Symbol, :usage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # usage_discount:, + # adjustment_type: :usage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :amount_discount] + required :adjustment_type, const: :amount_discount + + # @!attribute amount_discount + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :amount_discount] + # # + # def initialize( + # id:, + # amount_discount:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # adjustment_type: :amount_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :percentage_discount] + required :adjustment_type, const: :percentage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute percentage_discount + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param percentage_discount [Float] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :percentage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # percentage_discount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :percentage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :minimum] + required :adjustment_type, const: :minimum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute item_id + # The item ID that revenue from this minimum will be attributed to. + # + # @return [String] + required :item_id, String + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param item_id [String] + # # @param minimum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :minimum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # item_id:, + # minimum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :maximum] + required :adjustment_type, const: :maximum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param maximum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :maximum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # maximum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :maximum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + # @!attribute day + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. + # + # @return [Integer] + required :day, Integer + + # @!attribute month + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). + # + # @return [Integer, nil] + optional :month, Integer, nil?: true + + # @!attribute year + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). + # + # @return [Integer, nil] + optional :year, Integer, nil?: true + + # @!parse + # # @param day [Integer] + # # @param month [Integer, nil] + # # @param year [Integer, nil] + # # + # def initialize(day:, month: nil, year: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case discount_interval + # in { + # discount_type: "amount", + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::SubscriptionCancelResponse::DiscountInterval::AmountDiscountInterval ... + # in { + # discount_type: "percentage", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), + # end_date: Time + # } + # # Orb::Models::SubscriptionCancelResponse::DiscountInterval::PercentageDiscountInterval ... + # in { + # discount_type: "usage", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), + # end_date: Time + # } + # # Orb::Models::SubscriptionCancelResponse::DiscountInterval::UsageDiscountInterval ... + # end + # ``` + # + # @example + # ```ruby + # case discount_interval + # in Orb::Models::SubscriptionCancelResponse::DiscountInterval::AmountDiscountInterval + # # ... + # in Orb::Models::SubscriptionCancelResponse::DiscountInterval::PercentageDiscountInterval + # # ... + # in Orb::Models::SubscriptionCancelResponse::DiscountInterval::UsageDiscountInterval + # # ... + # end + # ``` + class DiscountInterval < Orb::Union + discriminator :discount_type + + variant :amount, -> { Orb::Models::SubscriptionCancelResponse::DiscountInterval::AmountDiscountInterval } + + variant :percentage, + -> { Orb::Models::SubscriptionCancelResponse::DiscountInterval::PercentageDiscountInterval } + + variant :usage, -> { Orb::Models::SubscriptionCancelResponse::DiscountInterval::UsageDiscountInterval } + + class AmountDiscountInterval < Orb::BaseModel + # @!attribute amount_discount + # Only available if discount_type is `amount`. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :amount] + required :discount_type, const: :amount + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # @param discount_type [Symbol, :amount] + # # + # def initialize( + # amount_discount:, + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # start_date:, + # discount_type: :amount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PercentageDiscountInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :percentage] + required :discount_type, const: :percentage + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute percentage_discount + # Only available if discount_type is `percentage`.This is a number between 0 + # and 1. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param percentage_discount [Float] + # # @param start_date [Time] + # # @param discount_type [Symbol, :percentage] + # # + # def initialize( + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # percentage_discount:, + # start_date:, + # discount_type: :percentage, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class UsageDiscountInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :usage] + required :discount_type, const: :usage + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!attribute usage_discount + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # @param usage_discount [Float] + # # @param discount_type [Symbol, :usage] + # # + # def initialize( + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # start_date:, + # usage_discount:, + # discount_type: :usage, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class FixedFeeQuantitySchedule < Orb::BaseModel + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute price_id + # + # @return [String] + required :price_id, String + + # @!attribute quantity + # + # @return [Float] + required :quantity, Float + + # @!attribute start_date + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param end_date [Time, nil] + # # @param price_id [String] + # # @param quantity [Float] + # # @param start_date [Time] + # # + # def initialize(end_date:, price_id:, quantity:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MaximumInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this maximum interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this maximum interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the maximum interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the price intervals + # this transform applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute start_date + # The start date of the maximum interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param maximum_amount [String] + # # @param start_date [Time] + # # + # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, maximum_amount:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MinimumInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this minimum interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this minimum interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the minimum interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the price intervals + # this minimum applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute start_date + # The start date of the minimum interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param minimum_amount [String] + # # @param start_date [Time] + # # + # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, minimum_amount:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PriceInterval < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute billing_cycle_day + # The day of the month that Orb bills for this price + # + # @return [Integer] + required :billing_cycle_day, Integer + + # @!attribute current_billing_period_end_date + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is exactly the end of the billing period. Set to null if + # this price interval is not currently active. + # + # @return [Time, nil] + required :current_billing_period_end_date, Time, nil?: true + + # @!attribute current_billing_period_start_date + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if this price interval is not currently active. + # + # @return [Time, nil] + required :current_billing_period_start_date, Time, nil?: true + + # @!attribute end_date + # The end date of the price interval. This is the date that Orb stops billing for + # this price. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute filter + # An additional filter to apply to usage queries. + # + # @return [String, nil] + required :filter, String, nil?: true + + # @!attribute fixed_fee_quantity_transitions + # The fixed fee quantity transitions for this price interval. This is only + # relevant for fixed fees. + # + # @return [Array, nil] + required :fixed_fee_quantity_transitions, + -> { Orb::ArrayOf[Orb::Models::SubscriptionCancelResponse::PriceInterval::FixedFeeQuantityTransition] }, + nil?: true + + # @!attribute price + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) + # + # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + required :price, union: -> { Orb::Models::Price } + + # @!attribute start_date + # The start date of the price interval. This is the date that Orb starts billing + # for this price. + # + # @return [Time] + required :start_date, Time + + # @!attribute usage_customer_ids + # A list of customer IDs whose usage events will be aggregated and billed under + # this price interval. + # + # @return [Array, nil] + required :usage_customer_ids, Orb::ArrayOf[String], nil?: true + + # @!parse + # # The Price Interval resource represents a period of time for which a price will + # # bill on a subscription. A subscription’s price intervals define its billing + # # behavior. + # # + # # @param id [String] + # # @param billing_cycle_day [Integer] + # # @param current_billing_period_end_date [Time, nil] + # # @param current_billing_period_start_date [Time, nil] + # # @param end_date [Time, nil] + # # @param filter [String, nil] + # # @param fixed_fee_quantity_transitions [Array, nil] + # # @param price [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + # # @param start_date [Time] + # # @param usage_customer_ids [Array, nil] + # # + # def initialize( + # id:, + # billing_cycle_day:, + # current_billing_period_end_date:, + # current_billing_period_start_date:, + # end_date:, + # filter:, + # fixed_fee_quantity_transitions:, + # price:, + # start_date:, + # usage_customer_ids:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class FixedFeeQuantityTransition < Orb::BaseModel + # @!attribute effective_date + # + # @return [Time] + required :effective_date, Time + + # @!attribute price_id + # + # @return [String] + required :price_id, String + + # @!attribute quantity + # + # @return [Integer] + required :quantity, Integer + + # @!parse + # # @param effective_date [Time] + # # @param price_id [String] + # # @param quantity [Integer] + # # + # def initialize(effective_date:, price_id:, quantity:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class RedeemedCoupon < Orb::BaseModel + # @!attribute coupon_id + # + # @return [String] + required :coupon_id, String + + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param coupon_id [String] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # + # def initialize(coupon_id:, end_date:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case status + # in :active + # # ... + # in :ended + # # ... + # in :upcoming + # # ... + # end + # ``` + class Status < Orb::Enum + ACTIVE = :active + ENDED = :ended + UPCOMING = :upcoming + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class TrialInfo < Orb::BaseModel + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!parse + # # @param end_date [Time, nil] + # # + # def initialize(end_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end +end diff --git a/lib/orb/models/subscription_create_params.rb b/lib/orb/models/subscription_create_params.rb index c36b5e4b..d22b74ee 100644 --- a/lib/orb/models/subscription_create_params.rb +++ b/lib/orb/models/subscription_create_params.rb @@ -45,9 +45,9 @@ class SubscriptionCreateParams < Orb::BaseModel # @!attribute billing_cycle_anchor_configuration # - # @return [Orb::Models::BillingCycleAnchorConfigurationModel, nil] + # @return [Orb::Models::SubscriptionCreateParams::BillingCycleAnchorConfiguration, nil] optional :billing_cycle_anchor_configuration, - -> { Orb::Models::BillingCycleAnchorConfigurationModel }, + -> { Orb::Models::SubscriptionCreateParams::BillingCycleAnchorConfiguration }, nil?: true # @!attribute coupon_redemption_code @@ -231,7 +231,7 @@ class SubscriptionCreateParams < Orb::BaseModel # # @param align_billing_with_subscription_start_date [Boolean] # # @param auto_collection [Boolean, nil] # # @param aws_region [String, nil] - # # @param billing_cycle_anchor_configuration [Orb::Models::BillingCycleAnchorConfigurationModel, nil] + # # @param billing_cycle_anchor_configuration [Orb::Models::SubscriptionCreateParams::BillingCycleAnchorConfiguration, nil] # # @param coupon_redemption_code [String, nil] # # @param credits_overage_rate [Float, nil] # # @param customer_id [String, nil] @@ -299,6 +299,41 @@ class SubscriptionCreateParams < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void + class BillingCycleAnchorConfiguration < Orb::BaseModel + # @!attribute day + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. + # + # @return [Integer] + required :day, Integer + + # @!attribute month + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). + # + # @return [Integer, nil] + optional :month, Integer, nil?: true + + # @!attribute year + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). + # + # @return [Integer, nil] + optional :year, Integer, nil?: true + + # @!parse + # # @param day [Integer] + # # @param month [Integer, nil] + # # @param year [Integer, nil] + # # + # def initialize(day:, month: nil, year: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @deprecated diff --git a/lib/orb/models/subscription_create_response.rb b/lib/orb/models/subscription_create_response.rb new file mode 100644 index 00000000..f9726940 --- /dev/null +++ b/lib/orb/models/subscription_create_response.rb @@ -0,0 +1,1308 @@ +# frozen_string_literal: true + +module Orb + module Models + class SubscriptionCreateResponse < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute active_plan_phase_order + # The current plan phase that is active, only if the subscription's plan has + # phases. + # + # @return [Integer, nil] + required :active_plan_phase_order, Integer, nil?: true + + # @!attribute adjustment_intervals + # The adjustment intervals for this subscription. + # + # @return [Array] + required :adjustment_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionCreateResponse::AdjustmentInterval] } + + # @!attribute auto_collection + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. This property defaults to + # the plan's behavior. If null, defaults to the customer's setting. + # + # @return [Boolean, nil] + required :auto_collection, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_anchor_configuration + # + # @return [Orb::Models::SubscriptionCreateResponse::BillingCycleAnchorConfiguration] + required :billing_cycle_anchor_configuration, + -> { Orb::Models::SubscriptionCreateResponse::BillingCycleAnchorConfiguration } + + # @!attribute billing_cycle_day + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. + # + # @return [Integer] + required :billing_cycle_day, Integer + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute current_billing_period_end_date + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is not part of the billing period. Set to null for + # subscriptions that are not currently active. + # + # @return [Time, nil] + required :current_billing_period_end_date, Time, nil?: true + + # @!attribute current_billing_period_start_date + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if the subscription is not currently active. + # + # @return [Time, nil] + required :current_billing_period_start_date, Time, nil?: true + + # @!attribute customer + # A customer is a buyer of your products, and the other party to the billing + # relationship. + # + # In Orb, customers are assigned system generated identifiers automatically, but + # it's often desirable to have these match existing identifiers in your system. To + # avoid having to denormalize Orb ID information, you can pass in an + # `external_customer_id` with your own identifier. See + # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further + # information about how these aliases work in Orb. + # + # In addition to having an identifier in your system, a customer may exist in a + # payment provider solution like Stripe. Use the `payment_provider_id` and the + # `payment_provider` enum field to express this mapping. + # + # A customer also has a timezone (from the standard + # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to + # your account's timezone. See [Timezone localization](/essentials/timezones) for + # information on what this timezone parameter influences within Orb. + # + # @return [Orb::Models::Customer] + required :customer, -> { Orb::Models::Customer } + + # @!attribute default_invoice_memo + # Determines the default memo on this subscriptions' invoices. Note that if this + # is not provided, it is determined by the plan configuration. + # + # @return [String, nil] + required :default_invoice_memo, String, nil?: true + + # @!attribute discount_intervals + # The discount intervals for this subscription. + # + # @return [Array] + required :discount_intervals, + -> { Orb::ArrayOf[union: Orb::Models::SubscriptionCreateResponse::DiscountInterval] } + + # @!attribute end_date + # The date Orb stops billing for this subscription. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute fixed_fee_quantity_schedule + # + # @return [Array] + required :fixed_fee_quantity_schedule, + -> { Orb::ArrayOf[Orb::Models::SubscriptionCreateResponse::FixedFeeQuantitySchedule] } + + # @!attribute invoicing_threshold + # + # @return [String, nil] + required :invoicing_threshold, String, nil?: true + + # @!attribute maximum_intervals + # The maximum intervals for this subscription. + # + # @return [Array] + required :maximum_intervals, -> { Orb::ArrayOf[Orb::Models::SubscriptionCreateResponse::MaximumInterval] } + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute minimum_intervals + # The minimum intervals for this subscription. + # + # @return [Array] + required :minimum_intervals, -> { Orb::ArrayOf[Orb::Models::SubscriptionCreateResponse::MinimumInterval] } + + # @!attribute net_terms + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of `0` here represents that the + # invoice is due on issue, whereas a value of `30` represents that the customer + # has a month to pay the invoice. + # + # @return [Integer] + required :net_terms, Integer + + # @!attribute plan + # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + # subscribed to by a customer. Plans define the billing behavior of the + # subscription. You can see more about how to configure prices in the + # [Price resource](/reference/price). + # + # @return [Orb::Models::Plan] + required :plan, -> { Orb::Models::Plan } + + # @!attribute price_intervals + # The price intervals for this subscription. + # + # @return [Array] + required :price_intervals, -> { Orb::ArrayOf[Orb::Models::SubscriptionCreateResponse::PriceInterval] } + + # @!attribute redeemed_coupon + # + # @return [Orb::Models::SubscriptionCreateResponse::RedeemedCoupon, nil] + required :redeemed_coupon, -> { Orb::Models::SubscriptionCreateResponse::RedeemedCoupon }, nil?: true + + # @!attribute start_date + # The date Orb starts billing for this subscription. + # + # @return [Time] + required :start_date, Time + + # @!attribute status + # + # @return [Symbol, Orb::Models::SubscriptionCreateResponse::Status] + required :status, enum: -> { Orb::Models::SubscriptionCreateResponse::Status } + + # @!attribute trial_info + # + # @return [Orb::Models::SubscriptionCreateResponse::TrialInfo] + required :trial_info, -> { Orb::Models::SubscriptionCreateResponse::TrialInfo } + + # @!parse + # # @param id [String] + # # @param active_plan_phase_order [Integer, nil] + # # @param adjustment_intervals [Array] + # # @param auto_collection [Boolean, nil] + # # @param billing_cycle_anchor_configuration [Orb::Models::SubscriptionCreateResponse::BillingCycleAnchorConfiguration] + # # @param billing_cycle_day [Integer] + # # @param created_at [Time] + # # @param current_billing_period_end_date [Time, nil] + # # @param current_billing_period_start_date [Time, nil] + # # @param customer [Orb::Models::Customer] + # # @param default_invoice_memo [String, nil] + # # @param discount_intervals [Array] + # # @param end_date [Time, nil] + # # @param fixed_fee_quantity_schedule [Array] + # # @param invoicing_threshold [String, nil] + # # @param maximum_intervals [Array] + # # @param metadata [Hash{Symbol=>String}] + # # @param minimum_intervals [Array] + # # @param net_terms [Integer] + # # @param plan [Orb::Models::Plan] + # # @param price_intervals [Array] + # # @param redeemed_coupon [Orb::Models::SubscriptionCreateResponse::RedeemedCoupon, nil] + # # @param start_date [Time] + # # @param status [Symbol, Orb::Models::SubscriptionCreateResponse::Status] + # # @param trial_info [Orb::Models::SubscriptionCreateResponse::TrialInfo] + # # + # def initialize( + # id:, + # active_plan_phase_order:, + # adjustment_intervals:, + # auto_collection:, + # billing_cycle_anchor_configuration:, + # billing_cycle_day:, + # created_at:, + # current_billing_period_end_date:, + # current_billing_period_start_date:, + # customer:, + # default_invoice_memo:, + # discount_intervals:, + # end_date:, + # fixed_fee_quantity_schedule:, + # invoicing_threshold:, + # maximum_intervals:, + # metadata:, + # minimum_intervals:, + # net_terms:, + # plan:, + # price_intervals:, + # redeemed_coupon:, + # start_date:, + # status:, + # trial_info:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class AdjustmentInterval < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment + # + # @return [Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] + required :adjustment, + union: -> { Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment } + + # @!attribute applies_to_price_interval_ids + # The price interval IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the adjustment interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the adjustment interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param id [String] + # # @param adjustment [Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # + # def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case adjustment + # in { + # adjustment_type: "usage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment ... + # in { + # adjustment_type: "amount_discount", + # id: String, + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment ... + # in { + # adjustment_type: "percentage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment ... + # in { + # adjustment_type: "minimum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment ... + # in { + # adjustment_type: "maximum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment ... + # end + # ``` + # + # @example + # ```ruby + # case adjustment + # in Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment + # # ... + # in Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + # # ... + # end + # ``` + class Adjustment < Orb::Union + discriminator :adjustment_type + + variant :usage_discount, + -> { Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment } + + variant :amount_discount, + -> { Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment } + + variant :percentage_discount, + -> { Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment } + + variant :minimum, + -> { Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment } + + variant :maximum, + -> { Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :usage_discount] + required :adjustment_type, const: :usage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!attribute usage_discount + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param usage_discount [Float] + # # @param adjustment_type [Symbol, :usage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # usage_discount:, + # adjustment_type: :usage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :amount_discount] + required :adjustment_type, const: :amount_discount + + # @!attribute amount_discount + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :amount_discount] + # # + # def initialize( + # id:, + # amount_discount:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # adjustment_type: :amount_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :percentage_discount] + required :adjustment_type, const: :percentage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute percentage_discount + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param percentage_discount [Float] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :percentage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # percentage_discount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :percentage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :minimum] + required :adjustment_type, const: :minimum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute item_id + # The item ID that revenue from this minimum will be attributed to. + # + # @return [String] + required :item_id, String + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param item_id [String] + # # @param minimum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :minimum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # item_id:, + # minimum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :maximum] + required :adjustment_type, const: :maximum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param maximum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :maximum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # maximum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :maximum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + # @!attribute day + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. + # + # @return [Integer] + required :day, Integer + + # @!attribute month + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). + # + # @return [Integer, nil] + optional :month, Integer, nil?: true + + # @!attribute year + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). + # + # @return [Integer, nil] + optional :year, Integer, nil?: true + + # @!parse + # # @param day [Integer] + # # @param month [Integer, nil] + # # @param year [Integer, nil] + # # + # def initialize(day:, month: nil, year: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case discount_interval + # in { + # discount_type: "amount", + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::SubscriptionCreateResponse::DiscountInterval::AmountDiscountInterval ... + # in { + # discount_type: "percentage", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), + # end_date: Time + # } + # # Orb::Models::SubscriptionCreateResponse::DiscountInterval::PercentageDiscountInterval ... + # in { + # discount_type: "usage", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), + # end_date: Time + # } + # # Orb::Models::SubscriptionCreateResponse::DiscountInterval::UsageDiscountInterval ... + # end + # ``` + # + # @example + # ```ruby + # case discount_interval + # in Orb::Models::SubscriptionCreateResponse::DiscountInterval::AmountDiscountInterval + # # ... + # in Orb::Models::SubscriptionCreateResponse::DiscountInterval::PercentageDiscountInterval + # # ... + # in Orb::Models::SubscriptionCreateResponse::DiscountInterval::UsageDiscountInterval + # # ... + # end + # ``` + class DiscountInterval < Orb::Union + discriminator :discount_type + + variant :amount, -> { Orb::Models::SubscriptionCreateResponse::DiscountInterval::AmountDiscountInterval } + + variant :percentage, + -> { Orb::Models::SubscriptionCreateResponse::DiscountInterval::PercentageDiscountInterval } + + variant :usage, -> { Orb::Models::SubscriptionCreateResponse::DiscountInterval::UsageDiscountInterval } + + class AmountDiscountInterval < Orb::BaseModel + # @!attribute amount_discount + # Only available if discount_type is `amount`. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :amount] + required :discount_type, const: :amount + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # @param discount_type [Symbol, :amount] + # # + # def initialize( + # amount_discount:, + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # start_date:, + # discount_type: :amount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PercentageDiscountInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :percentage] + required :discount_type, const: :percentage + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute percentage_discount + # Only available if discount_type is `percentage`.This is a number between 0 + # and 1. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param percentage_discount [Float] + # # @param start_date [Time] + # # @param discount_type [Symbol, :percentage] + # # + # def initialize( + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # percentage_discount:, + # start_date:, + # discount_type: :percentage, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class UsageDiscountInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :usage] + required :discount_type, const: :usage + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!attribute usage_discount + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # @param usage_discount [Float] + # # @param discount_type [Symbol, :usage] + # # + # def initialize( + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # start_date:, + # usage_discount:, + # discount_type: :usage, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class FixedFeeQuantitySchedule < Orb::BaseModel + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute price_id + # + # @return [String] + required :price_id, String + + # @!attribute quantity + # + # @return [Float] + required :quantity, Float + + # @!attribute start_date + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param end_date [Time, nil] + # # @param price_id [String] + # # @param quantity [Float] + # # @param start_date [Time] + # # + # def initialize(end_date:, price_id:, quantity:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MaximumInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this maximum interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this maximum interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the maximum interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the price intervals + # this transform applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute start_date + # The start date of the maximum interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param maximum_amount [String] + # # @param start_date [Time] + # # + # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, maximum_amount:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MinimumInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this minimum interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this minimum interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the minimum interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the price intervals + # this minimum applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute start_date + # The start date of the minimum interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param minimum_amount [String] + # # @param start_date [Time] + # # + # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, minimum_amount:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PriceInterval < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute billing_cycle_day + # The day of the month that Orb bills for this price + # + # @return [Integer] + required :billing_cycle_day, Integer + + # @!attribute current_billing_period_end_date + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is exactly the end of the billing period. Set to null if + # this price interval is not currently active. + # + # @return [Time, nil] + required :current_billing_period_end_date, Time, nil?: true + + # @!attribute current_billing_period_start_date + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if this price interval is not currently active. + # + # @return [Time, nil] + required :current_billing_period_start_date, Time, nil?: true + + # @!attribute end_date + # The end date of the price interval. This is the date that Orb stops billing for + # this price. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute filter + # An additional filter to apply to usage queries. + # + # @return [String, nil] + required :filter, String, nil?: true + + # @!attribute fixed_fee_quantity_transitions + # The fixed fee quantity transitions for this price interval. This is only + # relevant for fixed fees. + # + # @return [Array, nil] + required :fixed_fee_quantity_transitions, + -> { Orb::ArrayOf[Orb::Models::SubscriptionCreateResponse::PriceInterval::FixedFeeQuantityTransition] }, + nil?: true + + # @!attribute price + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) + # + # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + required :price, union: -> { Orb::Models::Price } + + # @!attribute start_date + # The start date of the price interval. This is the date that Orb starts billing + # for this price. + # + # @return [Time] + required :start_date, Time + + # @!attribute usage_customer_ids + # A list of customer IDs whose usage events will be aggregated and billed under + # this price interval. + # + # @return [Array, nil] + required :usage_customer_ids, Orb::ArrayOf[String], nil?: true + + # @!parse + # # The Price Interval resource represents a period of time for which a price will + # # bill on a subscription. A subscription’s price intervals define its billing + # # behavior. + # # + # # @param id [String] + # # @param billing_cycle_day [Integer] + # # @param current_billing_period_end_date [Time, nil] + # # @param current_billing_period_start_date [Time, nil] + # # @param end_date [Time, nil] + # # @param filter [String, nil] + # # @param fixed_fee_quantity_transitions [Array, nil] + # # @param price [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + # # @param start_date [Time] + # # @param usage_customer_ids [Array, nil] + # # + # def initialize( + # id:, + # billing_cycle_day:, + # current_billing_period_end_date:, + # current_billing_period_start_date:, + # end_date:, + # filter:, + # fixed_fee_quantity_transitions:, + # price:, + # start_date:, + # usage_customer_ids:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class FixedFeeQuantityTransition < Orb::BaseModel + # @!attribute effective_date + # + # @return [Time] + required :effective_date, Time + + # @!attribute price_id + # + # @return [String] + required :price_id, String + + # @!attribute quantity + # + # @return [Integer] + required :quantity, Integer + + # @!parse + # # @param effective_date [Time] + # # @param price_id [String] + # # @param quantity [Integer] + # # + # def initialize(effective_date:, price_id:, quantity:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class RedeemedCoupon < Orb::BaseModel + # @!attribute coupon_id + # + # @return [String] + required :coupon_id, String + + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param coupon_id [String] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # + # def initialize(coupon_id:, end_date:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case status + # in :active + # # ... + # in :ended + # # ... + # in :upcoming + # # ... + # end + # ``` + class Status < Orb::Enum + ACTIVE = :active + ENDED = :ended + UPCOMING = :upcoming + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class TrialInfo < Orb::BaseModel + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!parse + # # @param end_date [Time, nil] + # # + # def initialize(end_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end +end diff --git a/lib/orb/models/subscription_fetch_costs_response.rb b/lib/orb/models/subscription_fetch_costs_response.rb index 2ae0a6eb..9ed47e19 100644 --- a/lib/orb/models/subscription_fetch_costs_response.rb +++ b/lib/orb/models/subscription_fetch_costs_response.rb @@ -5,15 +5,99 @@ module Models class SubscriptionFetchCostsResponse < Orb::BaseModel # @!attribute data # - # @return [Array] - required :data, -> { Orb::ArrayOf[Orb::Models::AggregatedCostModel] } + # @return [Array] + required :data, -> { Orb::ArrayOf[Orb::Models::SubscriptionFetchCostsResponse::Data] } # @!parse - # # @param data [Array] + # # @param data [Array] # # # def initialize(data:, **) = super # def initialize: (Hash | Orb::BaseModel) -> void + + class Data < Orb::BaseModel + # @!attribute per_price_costs + # + # @return [Array] + required :per_price_costs, + -> { Orb::ArrayOf[Orb::Models::SubscriptionFetchCostsResponse::Data::PerPriceCost] } + + # @!attribute subtotal + # Total costs for the timeframe, excluding any minimums and discounts. + # + # @return [String] + required :subtotal, String + + # @!attribute timeframe_end + # + # @return [Time] + required :timeframe_end, Time + + # @!attribute timeframe_start + # + # @return [Time] + required :timeframe_start, Time + + # @!attribute total + # Total costs for the timeframe, including any minimums and discounts. + # + # @return [String] + required :total, String + + # @!parse + # # @param per_price_costs [Array] + # # @param subtotal [String] + # # @param timeframe_end [Time] + # # @param timeframe_start [Time] + # # @param total [String] + # # + # def initialize(per_price_costs:, subtotal:, timeframe_end:, timeframe_start:, total:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class PerPriceCost < Orb::BaseModel + # @!attribute price + # The price object + # + # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + required :price, union: -> { Orb::Models::Price } + + # @!attribute price_id + # The price the cost is associated with + # + # @return [String] + required :price_id, String + + # @!attribute subtotal + # Price's contributions for the timeframe, excluding any minimums and discounts. + # + # @return [String] + required :subtotal, String + + # @!attribute total + # Price's contributions for the timeframe, including minimums and discounts. + # + # @return [String] + required :total, String + + # @!attribute quantity + # The price's quantity for the timeframe + # + # @return [Float, nil] + optional :quantity, Float, nil?: true + + # @!parse + # # @param price [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + # # @param price_id [String] + # # @param subtotal [String] + # # @param total [String] + # # @param quantity [Float, nil] + # # + # def initialize(price:, price_id:, subtotal:, total:, quantity: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end end end end diff --git a/lib/orb/models/subscription_fetch_schedule_response.rb b/lib/orb/models/subscription_fetch_schedule_response.rb index 4fdf2cb9..38ccc9d7 100644 --- a/lib/orb/models/subscription_fetch_schedule_response.rb +++ b/lib/orb/models/subscription_fetch_schedule_response.rb @@ -15,8 +15,8 @@ class SubscriptionFetchScheduleResponse < Orb::BaseModel # @!attribute plan # - # @return [Orb::Models::PlanMinifiedModel] - required :plan, -> { Orb::Models::PlanMinifiedModel } + # @return [Orb::Models::SubscriptionFetchScheduleResponse::Plan] + required :plan, -> { Orb::Models::SubscriptionFetchScheduleResponse::Plan } # @!attribute start_date # @@ -26,12 +26,41 @@ class SubscriptionFetchScheduleResponse < Orb::BaseModel # @!parse # # @param created_at [Time] # # @param end_date [Time, nil] - # # @param plan [Orb::Models::PlanMinifiedModel] + # # @param plan [Orb::Models::SubscriptionFetchScheduleResponse::Plan] # # @param start_date [Time] # # # def initialize(created_at:, end_date:, plan:, start_date:, **) = super # def initialize: (Hash | Orb::BaseModel) -> void + + class Plan < Orb::BaseModel + # @!attribute id + # + # @return [String, nil] + required :id, String, nil?: true + + # @!attribute external_plan_id + # An optional user-defined ID for this plan resource, used throughout the system + # as an alias for this Plan. Use this field to identify a plan by an existing + # identifier in your system. + # + # @return [String, nil] + required :external_plan_id, String, nil?: true + + # @!attribute name + # + # @return [String, nil] + required :name, String, nil?: true + + # @!parse + # # @param id [String, nil] + # # @param external_plan_id [String, nil] + # # @param name [String, nil] + # # + # def initialize(id:, external_plan_id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end end end diff --git a/lib/orb/models/subscription_minified_model.rb b/lib/orb/models/subscription_minified_model.rb deleted file mode 100644 index b4c534f8..00000000 --- a/lib/orb/models/subscription_minified_model.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class SubscriptionMinifiedModel < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!parse - # # @param id [String] - # # - # def initialize(id:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/subscription_model.rb b/lib/orb/models/subscription_model.rb deleted file mode 100644 index 68d165eb..00000000 --- a/lib/orb/models/subscription_model.rb +++ /dev/null @@ -1,343 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class SubscriptionModel < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute active_plan_phase_order - # The current plan phase that is active, only if the subscription's plan has - # phases. - # - # @return [Integer, nil] - required :active_plan_phase_order, Integer, nil?: true - - # @!attribute adjustment_intervals - # The adjustment intervals for this subscription. - # - # @return [Array] - required :adjustment_intervals, -> { Orb::ArrayOf[Orb::Models::AdjustmentIntervalModel] } - - # @!attribute auto_collection - # Determines whether issued invoices for this subscription will automatically be - # charged with the saved payment method on the due date. This property defaults to - # the plan's behavior. If null, defaults to the customer's setting. - # - # @return [Boolean, nil] - required :auto_collection, Orb::BooleanModel, nil?: true - - # @!attribute billing_cycle_anchor_configuration - # - # @return [Orb::Models::BillingCycleAnchorConfigurationModel] - required :billing_cycle_anchor_configuration, -> { Orb::Models::BillingCycleAnchorConfigurationModel } - - # @!attribute billing_cycle_day - # The day of the month on which the billing cycle is anchored. If the maximum - # number of days in a month is greater than this value, the last day of the month - # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing - # period begins on the 30th. - # - # @return [Integer] - required :billing_cycle_day, Integer - - # @!attribute created_at - # - # @return [Time] - required :created_at, Time - - # @!attribute current_billing_period_end_date - # The end of the current billing period. This is an exclusive timestamp, such that - # the instant returned is not part of the billing period. Set to null for - # subscriptions that are not currently active. - # - # @return [Time, nil] - required :current_billing_period_end_date, Time, nil?: true - - # @!attribute current_billing_period_start_date - # The start date of the current billing period. This is an inclusive timestamp; - # the instant returned is exactly the beginning of the billing period. Set to null - # if the subscription is not currently active. - # - # @return [Time, nil] - required :current_billing_period_start_date, Time, nil?: true - - # @!attribute customer - # A customer is a buyer of your products, and the other party to the billing - # relationship. - # - # In Orb, customers are assigned system generated identifiers automatically, but - # it's often desirable to have these match existing identifiers in your system. To - # avoid having to denormalize Orb ID information, you can pass in an - # `external_customer_id` with your own identifier. See - # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further - # information about how these aliases work in Orb. - # - # In addition to having an identifier in your system, a customer may exist in a - # payment provider solution like Stripe. Use the `payment_provider_id` and the - # `payment_provider` enum field to express this mapping. - # - # A customer also has a timezone (from the standard - # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to - # your account's timezone. See [Timezone localization](/essentials/timezones) for - # information on what this timezone parameter influences within Orb. - # - # @return [Orb::Models::CustomerModel] - required :customer, -> { Orb::Models::CustomerModel } - - # @!attribute default_invoice_memo - # Determines the default memo on this subscriptions' invoices. Note that if this - # is not provided, it is determined by the plan configuration. - # - # @return [String, nil] - required :default_invoice_memo, String, nil?: true - - # @!attribute discount_intervals - # The discount intervals for this subscription. - # - # @return [Array] - required :discount_intervals, -> { Orb::ArrayOf[union: Orb::Models::SubscriptionModel::DiscountInterval] } - - # @!attribute end_date - # The date Orb stops billing for this subscription. - # - # @return [Time, nil] - required :end_date, Time, nil?: true - - # @!attribute fixed_fee_quantity_schedule - # - # @return [Array] - required :fixed_fee_quantity_schedule, - -> { Orb::ArrayOf[Orb::Models::FixedFeeQuantityScheduleEntryModel] } - - # @!attribute invoicing_threshold - # - # @return [String, nil] - required :invoicing_threshold, String, nil?: true - - # @!attribute maximum_intervals - # The maximum intervals for this subscription. - # - # @return [Array] - required :maximum_intervals, -> { Orb::ArrayOf[Orb::Models::MaximumIntervalModel] } - - # @!attribute metadata - # User specified key-value pairs for the resource. If not present, this defaults - # to an empty dictionary. Individual keys can be removed by setting the value to - # `null`, and the entire metadata mapping can be cleared by setting `metadata` to - # `null`. - # - # @return [Hash{Symbol=>String}] - required :metadata, Orb::HashOf[String] - - # @!attribute minimum_intervals - # The minimum intervals for this subscription. - # - # @return [Array] - required :minimum_intervals, -> { Orb::ArrayOf[Orb::Models::MinimumIntervalModel] } - - # @!attribute net_terms - # Determines the difference between the invoice issue date for subscription - # invoices as the date that they are due. A value of `0` here represents that the - # invoice is due on issue, whereas a value of `30` represents that the customer - # has a month to pay the invoice. - # - # @return [Integer] - required :net_terms, Integer - - # @!attribute plan - # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be - # subscribed to by a customer. Plans define the billing behavior of the - # subscription. You can see more about how to configure prices in the - # [Price resource](/reference/price). - # - # @return [Orb::Models::PlanModel] - required :plan, -> { Orb::Models::PlanModel } - - # @!attribute price_intervals - # The price intervals for this subscription. - # - # @return [Array] - required :price_intervals, -> { Orb::ArrayOf[Orb::Models::PriceIntervalModel] } - - # @!attribute redeemed_coupon - # - # @return [Orb::Models::CouponRedemptionModel, nil] - required :redeemed_coupon, -> { Orb::Models::CouponRedemptionModel }, nil?: true - - # @!attribute start_date - # The date Orb starts billing for this subscription. - # - # @return [Time] - required :start_date, Time - - # @!attribute status - # - # @return [Symbol, Orb::Models::SubscriptionModel::Status] - required :status, enum: -> { Orb::Models::SubscriptionModel::Status } - - # @!attribute trial_info - # - # @return [Orb::Models::SubscriptionTrialInfoModel] - required :trial_info, -> { Orb::Models::SubscriptionTrialInfoModel } - - # @!parse - # # A [subscription](/core-concepts#subscription) represents the purchase of a plan - # # by a customer. - # # - # # By default, subscriptions begin on the day that they're created and renew - # # automatically for each billing cycle at the cadence that's configured in the - # # plan definition. - # # - # # Subscriptions also default to **beginning of month alignment**, which means the - # # first invoice issued for the subscription will have pro-rated charges between - # # the `start_date` and the first of the following month. Subsequent billing - # # periods will always start and end on a month boundary (e.g. subsequent month - # # starts for monthly billing). - # # - # # Depending on the plan configuration, any _flat_ recurring fees will be billed - # # either at the beginning (in-advance) or end (in-arrears) of each billing cycle. - # # Plans default to **in-advance billing**. Usage-based fees are billed in arrears - # # as usage is accumulated. In the normal course of events, you can expect an - # # invoice to contain usage-based charges for the previous period, and a recurring - # # fee for the following period. - # # - # # @param id [String] - # # @param active_plan_phase_order [Integer, nil] - # # @param adjustment_intervals [Array] - # # @param auto_collection [Boolean, nil] - # # @param billing_cycle_anchor_configuration [Orb::Models::BillingCycleAnchorConfigurationModel] - # # @param billing_cycle_day [Integer] - # # @param created_at [Time] - # # @param current_billing_period_end_date [Time, nil] - # # @param current_billing_period_start_date [Time, nil] - # # @param customer [Orb::Models::CustomerModel] - # # @param default_invoice_memo [String, nil] - # # @param discount_intervals [Array] - # # @param end_date [Time, nil] - # # @param fixed_fee_quantity_schedule [Array] - # # @param invoicing_threshold [String, nil] - # # @param maximum_intervals [Array] - # # @param metadata [Hash{Symbol=>String}] - # # @param minimum_intervals [Array] - # # @param net_terms [Integer] - # # @param plan [Orb::Models::PlanModel] - # # @param price_intervals [Array] - # # @param redeemed_coupon [Orb::Models::CouponRedemptionModel, nil] - # # @param start_date [Time] - # # @param status [Symbol, Orb::Models::SubscriptionModel::Status] - # # @param trial_info [Orb::Models::SubscriptionTrialInfoModel] - # # - # def initialize( - # id:, - # active_plan_phase_order:, - # adjustment_intervals:, - # auto_collection:, - # billing_cycle_anchor_configuration:, - # billing_cycle_day:, - # created_at:, - # current_billing_period_end_date:, - # current_billing_period_start_date:, - # customer:, - # default_invoice_memo:, - # discount_intervals:, - # end_date:, - # fixed_fee_quantity_schedule:, - # invoicing_threshold:, - # maximum_intervals:, - # metadata:, - # minimum_intervals:, - # net_terms:, - # plan:, - # price_intervals:, - # redeemed_coupon:, - # start_date:, - # status:, - # trial_info:, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case discount_interval - # in { - # discount_type: "amount", - # amount_discount: String, - # applies_to_price_ids: ^(Orb::ArrayOf[String]), - # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]) - # } - # # Orb::Models::AmountDiscountIntervalModel ... - # in { - # discount_type: "percentage", - # applies_to_price_ids: ^(Orb::ArrayOf[String]), - # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), - # end_date: Time - # } - # # Orb::Models::PercentageDiscountIntervalModel ... - # in { - # discount_type: "usage", - # applies_to_price_ids: ^(Orb::ArrayOf[String]), - # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), - # end_date: Time - # } - # # Orb::Models::UsageDiscountIntervalModel ... - # end - # ``` - # - # @example - # ```ruby - # case discount_interval - # in Orb::Models::AmountDiscountIntervalModel - # # ... - # in Orb::Models::PercentageDiscountIntervalModel - # # ... - # in Orb::Models::UsageDiscountIntervalModel - # # ... - # end - # ``` - class DiscountInterval < Orb::Union - discriminator :discount_type - - variant :amount, -> { Orb::Models::AmountDiscountIntervalModel } - - variant :percentage, -> { Orb::Models::PercentageDiscountIntervalModel } - - variant :usage, -> { Orb::Models::UsageDiscountIntervalModel } - end - - # @abstract - # - # @example - # ```ruby - # case status - # in :active - # # ... - # in :ended - # # ... - # in :upcoming - # # ... - # end - # ``` - class Status < Orb::Enum - ACTIVE = :active - ENDED = :ended - UPCOMING = :upcoming - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end -end diff --git a/lib/orb/models/subscription_price_intervals_params.rb b/lib/orb/models/subscription_price_intervals_params.rb index 884501f1..60b7d7f8 100644 --- a/lib/orb/models/subscription_price_intervals_params.rb +++ b/lib/orb/models/subscription_price_intervals_params.rb @@ -90,8 +90,10 @@ class Add < Orb::BaseModel # @!attribute allocation_price # The definition of a new allocation price to create and add to the subscription. # - # @return [Orb::Models::NewAllocationPriceModel, nil] - optional :allocation_price, -> { Orb::Models::NewAllocationPriceModel }, nil?: true + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice, nil] + optional :allocation_price, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice }, + nil?: true # @!attribute discounts # A list of discounts to initialize on the price interval. @@ -126,9 +128,9 @@ class Add < Orb::BaseModel # @!attribute fixed_fee_quantity_transitions # A list of fixed fee quantity transitions to initialize on the price interval. # - # @return [Array, nil] + # @return [Array, nil] optional :fixed_fee_quantity_transitions, - -> { Orb::ArrayOf[Orb::Models::PriceIntervalFixedFeeQuantityTransitionModel] }, + -> { Orb::ArrayOf[Orb::Models::SubscriptionPriceIntervalsParams::Add::FixedFeeQuantityTransition] }, nil?: true # @!attribute maximum_amount @@ -148,8 +150,8 @@ class Add < Orb::BaseModel # @!attribute price # The definition of a new price to create and add to the subscription. # - # @return [Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice, Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice, Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice, Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice, Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice, Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice, nil] - optional :price, union: -> { Orb::Models::NewFloatingPriceModel }, nil?: true + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice, nil] + optional :price, union: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price }, nil?: true # @!attribute price_id # The id of the price to add to the subscription. @@ -170,15 +172,15 @@ class Add < Orb::BaseModel # @!parse # # @param start_date [Time, Symbol, Orb::Models::BillingCycleRelativeDate] - # # @param allocation_price [Orb::Models::NewAllocationPriceModel, nil] + # # @param allocation_price [Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice, nil] # # @param discounts [Array, nil] # # @param end_date [Time, Symbol, Orb::Models::BillingCycleRelativeDate, nil] # # @param external_price_id [String, nil] # # @param filter [String, nil] - # # @param fixed_fee_quantity_transitions [Array, nil] + # # @param fixed_fee_quantity_transitions [Array, nil] # # @param maximum_amount [Float, nil] # # @param minimum_amount [Float, nil] - # # @param price [Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice, Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice, Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice, Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice, Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice, Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice, nil] + # # @param price [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice, nil] # # @param price_id [String, nil] # # @param usage_customer_ids [Array, nil] # # @@ -222,6 +224,84 @@ class StartDate < Orb::Union variant enum: -> { Orb::Models::BillingCycleRelativeDate } end + class AllocationPrice < Orb::BaseModel + # @!attribute amount + # An amount of the currency to allocate to the customer at the specified cadence. + # + # @return [String] + required :amount, String + + # @!attribute cadence + # The cadence at which to allocate the amount to the customer. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string or a custom pricing unit identifier in which to bill + # this price. + # + # @return [String] + required :currency, String + + # @!attribute expires_at_end_of_cadence + # Whether the allocated amount should expire at the end of the cadence or roll + # over to the next period. + # + # @return [Boolean] + required :expires_at_end_of_cadence, Orb::BooleanModel + + # @!parse + # # The definition of a new allocation price to create and add to the subscription. + # # + # # @param amount [String] + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice::Cadence] + # # @param currency [String] + # # @param expires_at_end_of_cadence [Boolean] + # # + # def initialize(amount:, cadence:, currency:, expires_at_end_of_cadence:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence at which to allocate the amount to the customer. + # + # @example + # ```ruby + # case cadence + # in :one_time + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :semi_annual + # # ... + # in :annual + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + # @abstract # # @example @@ -344,187 +424,9117 @@ class EndDate < Orb::Union variant enum: -> { Orb::Models::BillingCycleRelativeDate } end - end - - class AddAdjustment < Orb::BaseModel - # @!attribute adjustment - # The definition of a new adjustment to create and add to the subscription. - # - # @return [Orb::Models::NewAdjustmentModel::NewPercentageDiscount, Orb::Models::NewAdjustmentModel::NewUsageDiscount, Orb::Models::NewAdjustmentModel::NewAmountDiscount, Orb::Models::NewAdjustmentModel::NewMinimum, Orb::Models::NewAdjustmentModel::NewMaximum] - required :adjustment, union: -> { Orb::Models::NewAdjustmentModel } - # @!attribute start_date - # The start date of the adjustment interval. This is the date that the adjustment - # will start affecting prices on the subscription. - # - # @return [Time, Symbol, Orb::Models::BillingCycleRelativeDate] - required :start_date, - union: -> { Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::StartDate } + class FixedFeeQuantityTransition < Orb::BaseModel + # @!attribute effective_date + # The date that the fixed fee quantity transition should take effect. + # + # @return [Time] + required :effective_date, Time - # @!attribute end_date - # The end date of the adjustment interval. This is the date that the adjustment - # will stop affecting prices on the subscription. - # - # @return [Time, Symbol, Orb::Models::BillingCycleRelativeDate, nil] - optional :end_date, - union: -> { Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::EndDate }, - nil?: true + # @!attribute quantity + # The quantity of the fixed fee quantity transition. + # + # @return [Integer] + required :quantity, Integer - # @!parse - # # @param adjustment [Orb::Models::NewAdjustmentModel::NewPercentageDiscount, Orb::Models::NewAdjustmentModel::NewUsageDiscount, Orb::Models::NewAdjustmentModel::NewAmountDiscount, Orb::Models::NewAdjustmentModel::NewMinimum, Orb::Models::NewAdjustmentModel::NewMaximum] - # # @param start_date [Time, Symbol, Orb::Models::BillingCycleRelativeDate] - # # @param end_date [Time, Symbol, Orb::Models::BillingCycleRelativeDate, nil] - # # - # def initialize(adjustment:, start_date:, end_date: nil, **) = super + # @!parse + # # @param effective_date [Time] + # # @param quantity [Integer] + # # + # def initialize(effective_date:, quantity:, **) = super - # def initialize: (Hash | Orb::BaseModel) -> void + # def initialize: (Hash | Orb::BaseModel) -> void + end # @abstract # - # The start date of the adjustment interval. This is the date that the adjustment - # will start affecting prices on the subscription. + # The definition of a new price to create and add to the subscription. # # @example # ```ruby - # case start_date - # in Time - # # ... - # in Orb::Models::BillingCycleRelativeDate - # # ... + # case price + # in { + # model_type: "unit", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::Cadence, + # currency: String, + # item_id: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice ... + # in { + # model_type: "package", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::Cadence, + # currency: String, + # item_id: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice ... + # in { + # model_type: "matrix", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::Cadence, + # currency: String, + # item_id: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice ... + # in { + # model_type: "matrix_with_allocation", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::Cadence, + # currency: String, + # item_id: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice ... + # in { + # model_type: "tiered", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::Cadence, + # currency: String, + # item_id: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice ... + # in { + # model_type: "tiered_bps", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::Cadence, + # currency: String, + # item_id: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice ... + # in { + # model_type: "bps", + # bps_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BpsConfig, + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::Cadence, + # currency: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice ... + # in { + # model_type: "bulk_bps", + # bulk_bps_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig, + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::Cadence, + # currency: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice ... + # in { + # model_type: "bulk", + # bulk_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig, + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::Cadence, + # currency: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice ... + # in { + # model_type: "threshold_total_amount", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::Cadence, + # currency: String, + # item_id: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice ... + # in { + # model_type: "tiered_package", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::Cadence, + # currency: String, + # item_id: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice ... + # in { + # model_type: "grouped_tiered", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::Cadence, + # currency: String, + # grouped_tiered_config: ^(Orb::HashOf[Orb::Unknown]) + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice ... + # in { + # model_type: "max_group_tiered_package", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::Cadence, + # currency: String, + # item_id: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice ... + # in { + # model_type: "tiered_with_minimum", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::Cadence, + # currency: String, + # item_id: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice ... + # in { + # model_type: "package_with_allocation", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::Cadence, + # currency: String, + # item_id: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice ... + # in { + # model_type: "tiered_package_with_minimum", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::Cadence, + # currency: String, + # item_id: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice ... + # in { + # model_type: "unit_with_percent", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::Cadence, + # currency: String, + # item_id: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice ... + # in { + # model_type: "tiered_with_proration", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::Cadence, + # currency: String, + # item_id: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice ... + # in { + # model_type: "unit_with_proration", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::Cadence, + # currency: String, + # item_id: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice ... + # in { + # model_type: "grouped_allocation", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::Cadence, + # currency: String, + # grouped_allocation_config: ^(Orb::HashOf[Orb::Unknown]) + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice ... + # in { + # model_type: "grouped_with_prorated_minimum", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::Cadence, + # currency: String, + # grouped_with_prorated_minimum_config: ^(Orb::HashOf[Orb::Unknown]) + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice ... + # in { + # model_type: "grouped_with_metered_minimum", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::Cadence, + # currency: String, + # grouped_with_metered_minimum_config: ^(Orb::HashOf[Orb::Unknown]) + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice ... + # in { + # model_type: "matrix_with_display_name", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::Cadence, + # currency: String, + # item_id: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice ... + # in { + # model_type: "bulk_with_proration", + # bulk_with_proration_config: ^(Orb::HashOf[Orb::Unknown]), + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::Cadence, + # currency: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice ... + # in { + # model_type: "grouped_tiered_package", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::Cadence, + # currency: String, + # grouped_tiered_package_config: ^(Orb::HashOf[Orb::Unknown]) + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice ... + # in { + # model_type: "scalable_matrix_with_unit_pricing", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::Cadence, + # currency: String, + # item_id: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice ... + # in { + # model_type: "scalable_matrix_with_tiered_pricing", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::Cadence, + # currency: String, + # item_id: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice ... + # in { + # model_type: "cumulative_grouped_bulk", + # cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::Cadence, + # cumulative_grouped_bulk_config: ^(Orb::HashOf[Orb::Unknown]), + # currency: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice ... # end # ``` - class StartDate < Orb::Union - variant Time - - variant enum: -> { Orb::Models::BillingCycleRelativeDate } - end - - # @abstract - # - # The end date of the adjustment interval. This is the date that the adjustment - # will stop affecting prices on the subscription. # # @example # ```ruby - # case end_date - # in Time + # case price + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice # # ... - # in Orb::Models::BillingCycleRelativeDate + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice # # ... # end # ``` - class EndDate < Orb::Union - variant Time + class Price < Orb::Union + discriminator :model_type - variant enum: -> { Orb::Models::BillingCycleRelativeDate } - end - end + variant :unit, -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice } - class Edit < Orb::BaseModel - # @!attribute price_interval_id - # The id of the price interval to edit. - # - # @return [String] - required :price_interval_id, String + variant :package, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice } - # @!attribute billing_cycle_day - # The updated billing cycle day for this price interval. If not specified, the - # billing cycle day will not be updated. Note that overlapping price intervals - # must have the same billing cycle day. - # - # @return [Integer, nil] - optional :billing_cycle_day, Integer, nil?: true + variant :matrix, -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice } - # @!attribute end_date - # The updated end date of this price interval. If not specified, the start date - # will not be updated. - # - # @return [Time, Symbol, Orb::Models::BillingCycleRelativeDate, nil] - optional :end_date, union: -> { Orb::Models::SubscriptionPriceIntervalsParams::Edit::EndDate }, nil?: true + variant :matrix_with_allocation, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice } - # @!attribute filter - # An additional filter to apply to usage queries. This filter must be expressed as - # a boolean - # [computed property](/extensibility/advanced-metrics#computed-properties). If - # null, usage queries will not include any additional filter. - # - # @return [String, nil] - optional :filter, String, nil?: true + variant :tiered, -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice } - # @!attribute fixed_fee_quantity_transitions - # A list of fixed fee quantity transitions to use for this price interval. Note - # that this list will overwrite all existing fixed fee quantity transitions on the - # price interval. - # - # @return [Array, nil] - optional :fixed_fee_quantity_transitions, - -> { Orb::ArrayOf[Orb::Models::PriceIntervalFixedFeeQuantityTransitionModel] }, - nil?: true + variant :tiered_bps, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice } - # @!attribute [r] start_date - # The updated start date of this price interval. If not specified, the start date - # will not be updated. - # - # @return [Time, Symbol, Orb::Models::BillingCycleRelativeDate, nil] - optional :start_date, union: -> { Orb::Models::SubscriptionPriceIntervalsParams::Edit::StartDate } + variant :bps, -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice } - # @!parse - # # @return [Time, Symbol, Orb::Models::BillingCycleRelativeDate] - # attr_writer :start_date + variant :bulk_bps, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice } - # @!attribute usage_customer_ids - # A list of customer IDs whose usage events will be aggregated and billed under - # this subscription. By default, a subscription only considers usage events - # associated with its attached customer's customer_id. When usage_customer_ids is - # provided, the subscription includes usage events from the specified customers - # only. Provided usage_customer_ids must be either the customer for this - # subscription itself, or any of that customer's children. - # - # @return [Array, nil] - optional :usage_customer_ids, Orb::ArrayOf[String], nil?: true + variant :bulk, -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice } - # @!parse - # # @param price_interval_id [String] - # # @param billing_cycle_day [Integer, nil] - # # @param end_date [Time, Symbol, Orb::Models::BillingCycleRelativeDate, nil] - # # @param filter [String, nil] - # # @param fixed_fee_quantity_transitions [Array, nil] - # # @param start_date [Time, Symbol, Orb::Models::BillingCycleRelativeDate] - # # @param usage_customer_ids [Array, nil] - # # - # def initialize( - # price_interval_id:, - # billing_cycle_day: nil, - # end_date: nil, - # filter: nil, - # fixed_fee_quantity_transitions: nil, - # start_date: nil, - # usage_customer_ids: nil, - # ** - # ) - # super - # end + variant :threshold_total_amount, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice } - # def initialize: (Hash | Orb::BaseModel) -> void + variant :tiered_package, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice } - # @abstract - # - # The updated end date of this price interval. If not specified, the start date - # will not be updated. - # - # @example - # ```ruby - # case end_date - # in Time - # # ... - # in Orb::Models::BillingCycleRelativeDate - # # ... - # end - # ``` - class EndDate < Orb::Union - variant Time + variant :grouped_tiered, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice } - variant enum: -> { Orb::Models::BillingCycleRelativeDate } + variant :max_group_tiered_package, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice } + + variant :tiered_with_minimum, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice } + + variant :package_with_allocation, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice } + + variant :tiered_package_with_minimum, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice } + + variant :unit_with_percent, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice } + + variant :tiered_with_proration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice } + + variant :unit_with_proration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice } + + variant :grouped_allocation, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice } + + variant :grouped_with_prorated_minimum, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice } + + variant :grouped_with_metered_minimum, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice } + + variant :matrix_with_display_name, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice } + + variant :bulk_with_proration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice } + + variant :grouped_tiered_package, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice } + + variant :scalable_matrix_with_unit_pricing, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice } + + variant :scalable_matrix_with_tiered_pricing, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice } + + variant :cumulative_grouped_bulk, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice } + + class NewFloatingUnitPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :unit] + required :model_type, const: :unit + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute unit_config + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::UnitConfig] + required :unit_config, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::UnitConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::Cadence] + # # @param currency [String] + # # @param item_id [String] + # # @param name [String] + # # @param unit_config [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::UnitConfig] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :unit] + # # + # def initialize( + # cadence:, + # currency:, + # item_id:, + # name:, + # unit_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :unit, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class UnitConfig < Orb::BaseModel + # @!attribute unit_amount + # Rate per unit of usage + # + # @return [String] + required :unit_amount, String + + # @!parse + # # @param unit_amount [String] + # # + # def initialize(unit_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingPackagePrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :package] + required :model_type, const: :package + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute package_config + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::PackageConfig] + required :package_config, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::PackageConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::Cadence] + # # @param currency [String] + # # @param item_id [String] + # # @param name [String] + # # @param package_config [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::PackageConfig] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :package] + # # + # def initialize( + # cadence:, + # currency:, + # item_id:, + # name:, + # package_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :package, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class PackageConfig < Orb::BaseModel + # @!attribute package_amount + # A currency amount to rate usage by + # + # @return [String] + required :package_amount, String + + # @!attribute package_size + # An integer amount to represent package size. For example, 1000 here would divide + # usage by 1000 before multiplying by package_amount in rating + # + # @return [Integer] + required :package_size, Integer + + # @!parse + # # @param package_amount [String] + # # @param package_size [Integer] + # # + # def initialize(package_amount:, package_size:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingMatrixPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_config + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::MatrixConfig] + required :matrix_config, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::MatrixConfig } + + # @!attribute model_type + # + # @return [Symbol, :matrix] + required :model_type, const: :matrix + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::Cadence] + # # @param currency [String] + # # @param item_id [String] + # # @param matrix_config [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::MatrixConfig] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :matrix] + # # + # def initialize( + # cadence:, + # currency:, + # item_id:, + # matrix_config:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :matrix, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class MatrixConfig < Orb::BaseModel + # @!attribute default_unit_amount + # Default per unit rate for any usage not bucketed into a specified matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::ArrayOf[String, nil?: true] + + # @!attribute matrix_values + # Matrix values for specified matrix grouping keys + # + # @return [Array] + required :matrix_values, + -> do + Orb::ArrayOf[ + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::MatrixConfig::MatrixValue + ] + end + + # @!parse + # # @param default_unit_amount [String] + # # @param dimensions [Array] + # # @param matrix_values [Array] + # # + # def initialize(default_unit_amount:, dimensions:, matrix_values:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class MatrixValue < Orb::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this Matrix value by. For example, + # ["region", "tier"] could be used to filter cloud usage by a cloud region and an + # instance tier. + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Unit price for the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!parse + # # @param dimension_values [Array] + # # @param unit_amount [String] + # # + # def initialize(dimension_values:, unit_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingMatrixWithAllocationPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_allocation_config + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::MatrixWithAllocationConfig] + required :matrix_with_allocation_config, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::MatrixWithAllocationConfig } + + # @!attribute model_type + # + # @return [Symbol, :matrix_with_allocation] + required :model_type, const: :matrix_with_allocation + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::Cadence] + # # @param currency [String] + # # @param item_id [String] + # # @param matrix_with_allocation_config [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::MatrixWithAllocationConfig] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :matrix_with_allocation] + # # + # def initialize( + # cadence:, + # currency:, + # item_id:, + # matrix_with_allocation_config:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :matrix_with_allocation, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class MatrixWithAllocationConfig < Orb::BaseModel + # @!attribute allocation + # Allocation to be used to calculate the price + # + # @return [Float] + required :allocation, Float + + # @!attribute default_unit_amount + # Default per unit rate for any usage not bucketed into a specified matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::ArrayOf[String, nil?: true] + + # @!attribute matrix_values + # Matrix values for specified matrix grouping keys + # + # @return [Array] + required :matrix_values, + -> do + Orb::ArrayOf[ + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::MatrixWithAllocationConfig::MatrixValue + ] + end + + # @!parse + # # @param allocation [Float] + # # @param default_unit_amount [String] + # # @param dimensions [Array] + # # @param matrix_values [Array] + # # + # def initialize(allocation:, default_unit_amount:, dimensions:, matrix_values:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class MatrixValue < Orb::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this Matrix value by. For example, + # ["region", "tier"] could be used to filter cloud usage by a cloud region and an + # instance tier. + # + # @return [Array] + required :dimension_values, Orb::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Unit price for the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!parse + # # @param dimension_values [Array] + # # @param unit_amount [String] + # # + # def initialize(dimension_values:, unit_amount:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingTieredPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :tiered] + required :model_type, const: :tiered + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute tiered_config + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::TieredConfig] + required :tiered_config, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::TieredConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::Cadence] + # # @param currency [String] + # # @param item_id [String] + # # @param name [String] + # # @param tiered_config [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::TieredConfig] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :tiered] + # # + # def initialize( + # cadence:, + # currency:, + # item_id:, + # name:, + # tiered_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :tiered, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class TieredConfig < Orb::BaseModel + # @!attribute tiers + # Tiers for rating based on total usage quantities into the specified tier + # + # @return [Array] + required :tiers, + -> { Orb::ArrayOf[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::TieredConfig::Tier] } + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute first_unit + # Inclusive tier starting value + # + # @return [Float] + required :first_unit, Float + + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String + + # @!attribute last_unit + # Exclusive tier ending value. If null, this is treated as the last tier + # + # @return [Float, nil] + optional :last_unit, Float, nil?: true + + # @!parse + # # @param first_unit [Float] + # # @param unit_amount [String] + # # @param last_unit [Float, nil] + # # + # def initialize(first_unit:, unit_amount:, last_unit: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingTieredBpsPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :tiered_bps] + required :model_type, const: :tiered_bps + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute tiered_bps_config + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::TieredBpsConfig] + required :tiered_bps_config, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::TieredBpsConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::Cadence] + # # @param currency [String] + # # @param item_id [String] + # # @param name [String] + # # @param tiered_bps_config [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::TieredBpsConfig] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :tiered_bps] + # # + # def initialize( + # cadence:, + # currency:, + # item_id:, + # name:, + # tiered_bps_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :tiered_bps, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class TieredBpsConfig < Orb::BaseModel + # @!attribute tiers + # Tiers for a Graduated BPS pricing model, where usage is bucketed into specified + # tiers + # + # @return [Array] + required :tiers, + -> do + Orb::ArrayOf[ + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::TieredBpsConfig::Tier + ] + end + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute bps + # Per-event basis point rate + # + # @return [Float] + required :bps, Float + + # @!attribute minimum_amount + # Inclusive tier starting value + # + # @return [String] + required :minimum_amount, String + + # @!attribute maximum_amount + # Exclusive tier ending value + # + # @return [String, nil] + optional :maximum_amount, String, nil?: true + + # @!attribute per_unit_maximum + # Per unit maximum to charge + # + # @return [String, nil] + optional :per_unit_maximum, String, nil?: true + + # @!parse + # # @param bps [Float] + # # @param minimum_amount [String] + # # @param maximum_amount [String, nil] + # # @param per_unit_maximum [String, nil] + # # + # def initialize(bps:, minimum_amount:, maximum_amount: nil, per_unit_maximum: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingBpsPrice < Orb::BaseModel + # @!attribute bps_config + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BpsConfig] + required :bps_config, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BpsConfig } + + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :bps] + required :model_type, const: :bps + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param bps_config [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BpsConfig] + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::Cadence] + # # @param currency [String] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :bps] + # # + # def initialize( + # bps_config:, + # cadence:, + # currency:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :bps, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class BpsConfig < Orb::BaseModel + # @!attribute bps + # Basis point take rate per event + # + # @return [Float] + required :bps, Float + + # @!attribute per_unit_maximum + # Optional currency amount maximum to cap spend per event + # + # @return [String, nil] + optional :per_unit_maximum, String, nil?: true + + # @!parse + # # @param bps [Float] + # # @param per_unit_maximum [String, nil] + # # + # def initialize(bps:, per_unit_maximum: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingBulkBpsPrice < Orb::BaseModel + # @!attribute bulk_bps_config + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig] + required :bulk_bps_config, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig } + + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :bulk_bps] + required :model_type, const: :bulk_bps + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param bulk_bps_config [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig] + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::Cadence] + # # @param currency [String] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :bulk_bps] + # # + # def initialize( + # bulk_bps_config:, + # cadence:, + # currency:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :bulk_bps, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class BulkBpsConfig < Orb::BaseModel + # @!attribute tiers + # Tiers for a bulk BPS pricing model where all usage is aggregated to a single + # tier based on total volume + # + # @return [Array] + required :tiers, + -> { Orb::ArrayOf[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig::Tier] } + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute bps + # Basis points to rate on + # + # @return [Float] + required :bps, Float + + # @!attribute maximum_amount + # Upper bound for tier + # + # @return [String, nil] + optional :maximum_amount, String, nil?: true + + # @!attribute per_unit_maximum + # The maximum amount to charge for any one event + # + # @return [String, nil] + optional :per_unit_maximum, String, nil?: true + + # @!parse + # # @param bps [Float] + # # @param maximum_amount [String, nil] + # # @param per_unit_maximum [String, nil] + # # + # def initialize(bps:, maximum_amount: nil, per_unit_maximum: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingBulkPrice < Orb::BaseModel + # @!attribute bulk_config + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig] + required :bulk_config, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig } + + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :bulk] + required :model_type, const: :bulk + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param bulk_config [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig] + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::Cadence] + # # @param currency [String] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :bulk] + # # + # def initialize( + # bulk_config:, + # cadence:, + # currency:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :bulk, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class BulkConfig < Orb::BaseModel + # @!attribute tiers + # Bulk tiers for rating based on total usage volume + # + # @return [Array] + required :tiers, + -> { Orb::ArrayOf[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig::Tier] } + + # @!parse + # # @param tiers [Array] + # # + # def initialize(tiers:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + class Tier < Orb::BaseModel + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String + + # @!attribute maximum_units + # Upper bound for this tier + # + # @return [Float, nil] + optional :maximum_units, Float, nil?: true + + # @!parse + # # @param unit_amount [String] + # # @param maximum_units [Float, nil] + # # + # def initialize(unit_amount:, maximum_units: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingThresholdTotalAmountPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :threshold_total_amount] + required :model_type, const: :threshold_total_amount + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute threshold_total_amount_config + # + # @return [Hash{Symbol=>Object}] + required :threshold_total_amount_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::Cadence] + # # @param currency [String] + # # @param item_id [String] + # # @param name [String] + # # @param threshold_total_amount_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :threshold_total_amount] + # # + # def initialize( + # cadence:, + # currency:, + # item_id:, + # name:, + # threshold_total_amount_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :threshold_total_amount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingTieredPackagePrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :tiered_package] + required :model_type, const: :tiered_package + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute tiered_package_config + # + # @return [Hash{Symbol=>Object}] + required :tiered_package_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::Cadence] + # # @param currency [String] + # # @param item_id [String] + # # @param name [String] + # # @param tiered_package_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :tiered_package] + # # + # def initialize( + # cadence:, + # currency:, + # item_id:, + # name:, + # tiered_package_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :tiered_package, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingGroupedTieredPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute grouped_tiered_config + # + # @return [Hash{Symbol=>Object}] + required :grouped_tiered_config, Orb::HashOf[Orb::Unknown] + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :grouped_tiered] + required :model_type, const: :grouped_tiered + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::Cadence] + # # @param currency [String] + # # @param grouped_tiered_config [Hash{Symbol=>Object}] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :grouped_tiered] + # # + # def initialize( + # cadence:, + # currency:, + # grouped_tiered_config:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :grouped_tiered, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingMaxGroupTieredPackagePrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute max_group_tiered_package_config + # + # @return [Hash{Symbol=>Object}] + required :max_group_tiered_package_config, Orb::HashOf[Orb::Unknown] + + # @!attribute model_type + # + # @return [Symbol, :max_group_tiered_package] + required :model_type, const: :max_group_tiered_package + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::Cadence] + # # @param currency [String] + # # @param item_id [String] + # # @param max_group_tiered_package_config [Hash{Symbol=>Object}] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :max_group_tiered_package] + # # + # def initialize( + # cadence:, + # currency:, + # item_id:, + # max_group_tiered_package_config:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :max_group_tiered_package, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingTieredWithMinimumPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :tiered_with_minimum] + required :model_type, const: :tiered_with_minimum + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute tiered_with_minimum_config + # + # @return [Hash{Symbol=>Object}] + required :tiered_with_minimum_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::Cadence] + # # @param currency [String] + # # @param item_id [String] + # # @param name [String] + # # @param tiered_with_minimum_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :tiered_with_minimum] + # # + # def initialize( + # cadence:, + # currency:, + # item_id:, + # name:, + # tiered_with_minimum_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :tiered_with_minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingPackageWithAllocationPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :package_with_allocation] + required :model_type, const: :package_with_allocation + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute package_with_allocation_config + # + # @return [Hash{Symbol=>Object}] + required :package_with_allocation_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::Cadence] + # # @param currency [String] + # # @param item_id [String] + # # @param name [String] + # # @param package_with_allocation_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :package_with_allocation] + # # + # def initialize( + # cadence:, + # currency:, + # item_id:, + # name:, + # package_with_allocation_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :package_with_allocation, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingTieredPackageWithMinimumPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :tiered_package_with_minimum] + required :model_type, const: :tiered_package_with_minimum + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute tiered_package_with_minimum_config + # + # @return [Hash{Symbol=>Object}] + required :tiered_package_with_minimum_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::Cadence] + # # @param currency [String] + # # @param item_id [String] + # # @param name [String] + # # @param tiered_package_with_minimum_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :tiered_package_with_minimum] + # # + # def initialize( + # cadence:, + # currency:, + # item_id:, + # name:, + # tiered_package_with_minimum_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :tiered_package_with_minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingUnitWithPercentPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :unit_with_percent] + required :model_type, const: :unit_with_percent + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute unit_with_percent_config + # + # @return [Hash{Symbol=>Object}] + required :unit_with_percent_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::Cadence] + # # @param currency [String] + # # @param item_id [String] + # # @param name [String] + # # @param unit_with_percent_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :unit_with_percent] + # # + # def initialize( + # cadence:, + # currency:, + # item_id:, + # name:, + # unit_with_percent_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :unit_with_percent, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingTieredWithProrationPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :tiered_with_proration] + required :model_type, const: :tiered_with_proration + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute tiered_with_proration_config + # + # @return [Hash{Symbol=>Object}] + required :tiered_with_proration_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::Cadence] + # # @param currency [String] + # # @param item_id [String] + # # @param name [String] + # # @param tiered_with_proration_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :tiered_with_proration] + # # + # def initialize( + # cadence:, + # currency:, + # item_id:, + # name:, + # tiered_with_proration_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :tiered_with_proration, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingUnitWithProrationPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :unit_with_proration] + required :model_type, const: :unit_with_proration + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute unit_with_proration_config + # + # @return [Hash{Symbol=>Object}] + required :unit_with_proration_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::Cadence] + # # @param currency [String] + # # @param item_id [String] + # # @param name [String] + # # @param unit_with_proration_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :unit_with_proration] + # # + # def initialize( + # cadence:, + # currency:, + # item_id:, + # name:, + # unit_with_proration_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :unit_with_proration, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingGroupedAllocationPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute grouped_allocation_config + # + # @return [Hash{Symbol=>Object}] + required :grouped_allocation_config, Orb::HashOf[Orb::Unknown] + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :grouped_allocation] + required :model_type, const: :grouped_allocation + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::Cadence] + # # @param currency [String] + # # @param grouped_allocation_config [Hash{Symbol=>Object}] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :grouped_allocation] + # # + # def initialize( + # cadence:, + # currency:, + # grouped_allocation_config:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :grouped_allocation, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingGroupedWithProratedMinimumPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute grouped_with_prorated_minimum_config + # + # @return [Hash{Symbol=>Object}] + required :grouped_with_prorated_minimum_config, Orb::HashOf[Orb::Unknown] + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :grouped_with_prorated_minimum] + required :model_type, const: :grouped_with_prorated_minimum + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::Cadence] + # # @param currency [String] + # # @param grouped_with_prorated_minimum_config [Hash{Symbol=>Object}] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :grouped_with_prorated_minimum] + # # + # def initialize( + # cadence:, + # currency:, + # grouped_with_prorated_minimum_config:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :grouped_with_prorated_minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingGroupedWithMeteredMinimumPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute grouped_with_metered_minimum_config + # + # @return [Hash{Symbol=>Object}] + required :grouped_with_metered_minimum_config, Orb::HashOf[Orb::Unknown] + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :grouped_with_metered_minimum] + required :model_type, const: :grouped_with_metered_minimum + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::Cadence] + # # @param currency [String] + # # @param grouped_with_metered_minimum_config [Hash{Symbol=>Object}] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :grouped_with_metered_minimum] + # # + # def initialize( + # cadence:, + # currency:, + # grouped_with_metered_minimum_config:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :grouped_with_metered_minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingMatrixWithDisplayNamePrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_display_name_config + # + # @return [Hash{Symbol=>Object}] + required :matrix_with_display_name_config, Orb::HashOf[Orb::Unknown] + + # @!attribute model_type + # + # @return [Symbol, :matrix_with_display_name] + required :model_type, const: :matrix_with_display_name + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::Cadence] + # # @param currency [String] + # # @param item_id [String] + # # @param matrix_with_display_name_config [Hash{Symbol=>Object}] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :matrix_with_display_name] + # # + # def initialize( + # cadence:, + # currency:, + # item_id:, + # matrix_with_display_name_config:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :matrix_with_display_name, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingBulkWithProrationPrice < Orb::BaseModel + # @!attribute bulk_with_proration_config + # + # @return [Hash{Symbol=>Object}] + required :bulk_with_proration_config, Orb::HashOf[Orb::Unknown] + + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :bulk_with_proration] + required :model_type, const: :bulk_with_proration + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param bulk_with_proration_config [Hash{Symbol=>Object}] + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::Cadence] + # # @param currency [String] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :bulk_with_proration] + # # + # def initialize( + # bulk_with_proration_config:, + # cadence:, + # currency:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :bulk_with_proration, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingGroupedTieredPackagePrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute grouped_tiered_package_config + # + # @return [Hash{Symbol=>Object}] + required :grouped_tiered_package_config, Orb::HashOf[Orb::Unknown] + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :grouped_tiered_package] + required :model_type, const: :grouped_tiered_package + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::Cadence] + # # @param currency [String] + # # @param grouped_tiered_package_config [Hash{Symbol=>Object}] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :grouped_tiered_package] + # # + # def initialize( + # cadence:, + # currency:, + # grouped_tiered_package_config:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :grouped_tiered_package, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingScalableMatrixWithUnitPricingPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :scalable_matrix_with_unit_pricing] + required :model_type, const: :scalable_matrix_with_unit_pricing + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute scalable_matrix_with_unit_pricing_config + # + # @return [Hash{Symbol=>Object}] + required :scalable_matrix_with_unit_pricing_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::Cadence] + # # @param currency [String] + # # @param item_id [String] + # # @param name [String] + # # @param scalable_matrix_with_unit_pricing_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :scalable_matrix_with_unit_pricing] + # # + # def initialize( + # cadence:, + # currency:, + # item_id:, + # name:, + # scalable_matrix_with_unit_pricing_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :scalable_matrix_with_unit_pricing, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingScalableMatrixWithTieredPricingPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :scalable_matrix_with_tiered_pricing] + required :model_type, const: :scalable_matrix_with_tiered_pricing + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute scalable_matrix_with_tiered_pricing_config + # + # @return [Hash{Symbol=>Object}] + required :scalable_matrix_with_tiered_pricing_config, Orb::HashOf[Orb::Unknown] + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::Cadence] + # # @param currency [String] + # # @param item_id [String] + # # @param name [String] + # # @param scalable_matrix_with_tiered_pricing_config [Hash{Symbol=>Object}] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :scalable_matrix_with_tiered_pricing] + # # + # def initialize( + # cadence:, + # currency:, + # item_id:, + # name:, + # scalable_matrix_with_tiered_pricing_config:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :scalable_matrix_with_tiered_pricing, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + + class NewFloatingCumulativeGroupedBulkPrice < Orb::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::Cadence] + required :cadence, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::Cadence } + + # @!attribute cumulative_grouped_bulk_config + # + # @return [Hash{Symbol=>Object}] + required :cumulative_grouped_bulk_config, Orb::HashOf[Orb::Unknown] + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # + # @return [Symbol, :cumulative_grouped_bulk] + required :model_type, const: :cumulative_grouped_bulk + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::BillingCycleConfiguration, nil] + optional :billing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::BillingCycleConfiguration }, + nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::InvoicingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::InvoicingCycleConfiguration }, + nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::HashOf[String, nil?: true], nil?: true + + # @!parse + # # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::Cadence] + # # @param cumulative_grouped_bulk_config [Hash{Symbol=>Object}] + # # @param currency [String] + # # @param item_id [String] + # # @param name [String] + # # @param billable_metric_id [String, nil] + # # @param billed_in_advance [Boolean, nil] + # # @param billing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::BillingCycleConfiguration, nil] + # # @param conversion_rate [Float, nil] + # # @param external_price_id [String, nil] + # # @param fixed_price_quantity [Float, nil] + # # @param invoice_grouping_key [String, nil] + # # @param invoicing_cycle_configuration [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::InvoicingCycleConfiguration, nil] + # # @param metadata [Hash{Symbol=>String, nil}, nil] + # # @param model_type [Symbol, :cumulative_grouped_bulk] + # # + # def initialize( + # cadence:, + # cumulative_grouped_bulk_config:, + # currency:, + # item_id:, + # name:, + # billable_metric_id: nil, + # billed_in_advance: nil, + # billing_cycle_configuration: nil, + # conversion_rate: nil, + # external_price_id: nil, + # fixed_price_quantity: nil, + # invoice_grouping_key: nil, + # invoicing_cycle_configuration: nil, + # metadata: nil, + # model_type: :cumulative_grouped_bulk, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The cadence to bill for this price on. + # + # @example + # ```ruby + # case cadence + # in :annual + # # ... + # in :semi_annual + # # ... + # in :monthly + # # ... + # in :quarterly + # # ... + # in :one_time + # # ... + # in ... + # #... + # end + # ``` + class Cadence < Orb::Enum + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class BillingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::BillingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::BillingCycleConfiguration::DurationUnit } + + # @!parse + # # For custom cadence: specifies the duration of the billing period in days or + # # months. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::BillingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + # @!attribute duration + # The duration of the billing period. + # + # @return [Integer] + required :duration, Integer + + # @!attribute duration_unit + # The unit of billing period duration. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::DurationUnit] + required :duration_unit, + enum: -> { Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::DurationUnit } + + # @!parse + # # Within each billing cycle, specifies the cadence at which invoices are produced. + # # If unspecified, a single invoice is produced per billing cycle. + # # + # # @param duration [Integer] + # # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::DurationUnit] + # # + # def initialize(duration:, duration_unit:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The unit of billing period duration. + # + # @example + # ```ruby + # case duration_unit + # in :day + # # ... + # in :month + # # ... + # end + # ``` + class DurationUnit < Orb::Enum + DAY = :day + MONTH = :month + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + end + end + end + end + + class AddAdjustment < Orb::BaseModel + # @!attribute adjustment + # The definition of a new adjustment to create and add to the subscription. + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewPercentageDiscount, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewUsageDiscount, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewAmountDiscount, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMinimum, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMaximum] + required :adjustment, + union: -> { Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment } + + # @!attribute start_date + # The start date of the adjustment interval. This is the date that the adjustment + # will start affecting prices on the subscription. + # + # @return [Time, Symbol, Orb::Models::BillingCycleRelativeDate] + required :start_date, + union: -> { Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::StartDate } + + # @!attribute end_date + # The end date of the adjustment interval. This is the date that the adjustment + # will stop affecting prices on the subscription. + # + # @return [Time, Symbol, Orb::Models::BillingCycleRelativeDate, nil] + optional :end_date, + union: -> { Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::EndDate }, + nil?: true + + # @!parse + # # @param adjustment [Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewPercentageDiscount, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewUsageDiscount, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewAmountDiscount, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMinimum, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMaximum] + # # @param start_date [Time, Symbol, Orb::Models::BillingCycleRelativeDate] + # # @param end_date [Time, Symbol, Orb::Models::BillingCycleRelativeDate, nil] + # # + # def initialize(adjustment:, start_date:, end_date: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The definition of a new adjustment to create and add to the subscription. + # + # @example + # ```ruby + # case adjustment + # in { + # adjustment_type: "percentage_discount", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # percentage_discount: Float, + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewPercentageDiscount ... + # in { + # adjustment_type: "usage_discount", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # usage_discount: Float, + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewUsageDiscount ... + # in { + # adjustment_type: "amount_discount", + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewAmountDiscount ... + # in { + # adjustment_type: "minimum", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # item_id: String, + # minimum_amount: String + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMinimum ... + # in { + # adjustment_type: "maximum", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # maximum_amount: String, + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMaximum ... + # end + # ``` + # + # @example + # ```ruby + # case adjustment + # in Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewPercentageDiscount + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewUsageDiscount + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewAmountDiscount + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMinimum + # # ... + # in Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMaximum + # # ... + # end + # ``` + class Adjustment < Orb::Union + discriminator :adjustment_type + + variant :percentage_discount, + -> { Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewPercentageDiscount } + + variant :usage_discount, + -> { Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewUsageDiscount } + + variant :amount_discount, + -> { Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewAmountDiscount } + + variant :minimum, + -> { Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMinimum } + + variant :maximum, + -> { Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMaximum } + + class NewPercentageDiscount < Orb::BaseModel + # @!attribute adjustment_type + # + # @return [Symbol, :percentage_discount] + required :adjustment_type, const: :percentage_discount + + # @!attribute applies_to_price_ids + # The set of price IDs to which this adjustment applies. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute percentage_discount + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute [r] is_invoice_level + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. + # + # @return [Boolean, nil] + optional :is_invoice_level, Orb::BooleanModel + + # @!parse + # # @return [Boolean] + # attr_writer :is_invoice_level + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param percentage_discount [Float] + # # @param is_invoice_level [Boolean] + # # @param adjustment_type [Symbol, :percentage_discount] + # # + # def initialize( + # applies_to_price_ids:, + # percentage_discount:, + # is_invoice_level: nil, + # adjustment_type: :percentage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class NewUsageDiscount < Orb::BaseModel + # @!attribute adjustment_type + # + # @return [Symbol, :usage_discount] + required :adjustment_type, const: :usage_discount + + # @!attribute applies_to_price_ids + # The set of price IDs to which this adjustment applies. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute usage_discount + # + # @return [Float] + required :usage_discount, Float + + # @!attribute [r] is_invoice_level + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. + # + # @return [Boolean, nil] + optional :is_invoice_level, Orb::BooleanModel + + # @!parse + # # @return [Boolean] + # attr_writer :is_invoice_level + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param usage_discount [Float] + # # @param is_invoice_level [Boolean] + # # @param adjustment_type [Symbol, :usage_discount] + # # + # def initialize(applies_to_price_ids:, usage_discount:, is_invoice_level: nil, adjustment_type: :usage_discount, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class NewAmountDiscount < Orb::BaseModel + # @!attribute adjustment_type + # + # @return [Symbol, :amount_discount] + required :adjustment_type, const: :amount_discount + + # @!attribute amount_discount + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The set of price IDs to which this adjustment applies. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute [r] is_invoice_level + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. + # + # @return [Boolean, nil] + optional :is_invoice_level, Orb::BooleanModel + + # @!parse + # # @return [Boolean] + # attr_writer :is_invoice_level + + # @!parse + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param adjustment_type [Symbol, :amount_discount] + # # + # def initialize(amount_discount:, applies_to_price_ids:, is_invoice_level: nil, adjustment_type: :amount_discount, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class NewMinimum < Orb::BaseModel + # @!attribute adjustment_type + # + # @return [Symbol, :minimum] + required :adjustment_type, const: :minimum + + # @!attribute applies_to_price_ids + # The set of price IDs to which this adjustment applies. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute item_id + # The item ID that revenue from this minimum will be attributed to. + # + # @return [String] + required :item_id, String + + # @!attribute minimum_amount + # + # @return [String] + required :minimum_amount, String + + # @!attribute [r] is_invoice_level + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. + # + # @return [Boolean, nil] + optional :is_invoice_level, Orb::BooleanModel + + # @!parse + # # @return [Boolean] + # attr_writer :is_invoice_level + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param item_id [String] + # # @param minimum_amount [String] + # # @param is_invoice_level [Boolean] + # # @param adjustment_type [Symbol, :minimum] + # # + # def initialize(applies_to_price_ids:, item_id:, minimum_amount:, is_invoice_level: nil, adjustment_type: :minimum, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class NewMaximum < Orb::BaseModel + # @!attribute adjustment_type + # + # @return [Symbol, :maximum] + required :adjustment_type, const: :maximum + + # @!attribute applies_to_price_ids + # The set of price IDs to which this adjustment applies. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute maximum_amount + # + # @return [String] + required :maximum_amount, String + + # @!attribute [r] is_invoice_level + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. + # + # @return [Boolean, nil] + optional :is_invoice_level, Orb::BooleanModel + + # @!parse + # # @return [Boolean] + # attr_writer :is_invoice_level + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param maximum_amount [String] + # # @param is_invoice_level [Boolean] + # # @param adjustment_type [Symbol, :maximum] + # # + # def initialize(applies_to_price_ids:, maximum_amount:, is_invoice_level: nil, adjustment_type: :maximum, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + # @abstract + # + # The start date of the adjustment interval. This is the date that the adjustment + # will start affecting prices on the subscription. + # + # @example + # ```ruby + # case start_date + # in Time + # # ... + # in Orb::Models::BillingCycleRelativeDate + # # ... + # end + # ``` + class StartDate < Orb::Union + variant Time + + variant enum: -> { Orb::Models::BillingCycleRelativeDate } + end + + # @abstract + # + # The end date of the adjustment interval. This is the date that the adjustment + # will stop affecting prices on the subscription. + # + # @example + # ```ruby + # case end_date + # in Time + # # ... + # in Orb::Models::BillingCycleRelativeDate + # # ... + # end + # ``` + class EndDate < Orb::Union + variant Time + + variant enum: -> { Orb::Models::BillingCycleRelativeDate } + end + end + + class Edit < Orb::BaseModel + # @!attribute price_interval_id + # The id of the price interval to edit. + # + # @return [String] + required :price_interval_id, String + + # @!attribute billing_cycle_day + # The updated billing cycle day for this price interval. If not specified, the + # billing cycle day will not be updated. Note that overlapping price intervals + # must have the same billing cycle day. + # + # @return [Integer, nil] + optional :billing_cycle_day, Integer, nil?: true + + # @!attribute end_date + # The updated end date of this price interval. If not specified, the start date + # will not be updated. + # + # @return [Time, Symbol, Orb::Models::BillingCycleRelativeDate, nil] + optional :end_date, union: -> { Orb::Models::SubscriptionPriceIntervalsParams::Edit::EndDate }, nil?: true + + # @!attribute filter + # An additional filter to apply to usage queries. This filter must be expressed as + # a boolean + # [computed property](/extensibility/advanced-metrics#computed-properties). If + # null, usage queries will not include any additional filter. + # + # @return [String, nil] + optional :filter, String, nil?: true + + # @!attribute fixed_fee_quantity_transitions + # A list of fixed fee quantity transitions to use for this price interval. Note + # that this list will overwrite all existing fixed fee quantity transitions on the + # price interval. + # + # @return [Array, nil] + optional :fixed_fee_quantity_transitions, + -> { Orb::ArrayOf[Orb::Models::SubscriptionPriceIntervalsParams::Edit::FixedFeeQuantityTransition] }, + nil?: true + + # @!attribute [r] start_date + # The updated start date of this price interval. If not specified, the start date + # will not be updated. + # + # @return [Time, Symbol, Orb::Models::BillingCycleRelativeDate, nil] + optional :start_date, union: -> { Orb::Models::SubscriptionPriceIntervalsParams::Edit::StartDate } + + # @!parse + # # @return [Time, Symbol, Orb::Models::BillingCycleRelativeDate] + # attr_writer :start_date + + # @!attribute usage_customer_ids + # A list of customer IDs whose usage events will be aggregated and billed under + # this subscription. By default, a subscription only considers usage events + # associated with its attached customer's customer_id. When usage_customer_ids is + # provided, the subscription includes usage events from the specified customers + # only. Provided usage_customer_ids must be either the customer for this + # subscription itself, or any of that customer's children. + # + # @return [Array, nil] + optional :usage_customer_ids, Orb::ArrayOf[String], nil?: true + + # @!parse + # # @param price_interval_id [String] + # # @param billing_cycle_day [Integer, nil] + # # @param end_date [Time, Symbol, Orb::Models::BillingCycleRelativeDate, nil] + # # @param filter [String, nil] + # # @param fixed_fee_quantity_transitions [Array, nil] + # # @param start_date [Time, Symbol, Orb::Models::BillingCycleRelativeDate] + # # @param usage_customer_ids [Array, nil] + # # + # def initialize( + # price_interval_id:, + # billing_cycle_day: nil, + # end_date: nil, + # filter: nil, + # fixed_fee_quantity_transitions: nil, + # start_date: nil, + # usage_customer_ids: nil, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # The updated end date of this price interval. If not specified, the start date + # will not be updated. + # + # @example + # ```ruby + # case end_date + # in Time + # # ... + # in Orb::Models::BillingCycleRelativeDate + # # ... + # end + # ``` + class EndDate < Orb::Union + variant Time + + variant enum: -> { Orb::Models::BillingCycleRelativeDate } + end + + class FixedFeeQuantityTransition < Orb::BaseModel + # @!attribute effective_date + # The date that the fixed fee quantity transition should take effect. + # + # @return [Time] + required :effective_date, Time + + # @!attribute quantity + # The quantity of the fixed fee quantity transition. + # + # @return [Integer] + required :quantity, Integer + + # @!parse + # # @param effective_date [Time] + # # @param quantity [Integer] + # # + # def initialize(effective_date:, quantity:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void end # @abstract diff --git a/lib/orb/models/subscription_price_intervals_response.rb b/lib/orb/models/subscription_price_intervals_response.rb new file mode 100644 index 00000000..852c30f3 --- /dev/null +++ b/lib/orb/models/subscription_price_intervals_response.rb @@ -0,0 +1,1315 @@ +# frozen_string_literal: true + +module Orb + module Models + class SubscriptionPriceIntervalsResponse < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute active_plan_phase_order + # The current plan phase that is active, only if the subscription's plan has + # phases. + # + # @return [Integer, nil] + required :active_plan_phase_order, Integer, nil?: true + + # @!attribute adjustment_intervals + # The adjustment intervals for this subscription. + # + # @return [Array] + required :adjustment_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval] } + + # @!attribute auto_collection + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. This property defaults to + # the plan's behavior. If null, defaults to the customer's setting. + # + # @return [Boolean, nil] + required :auto_collection, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_anchor_configuration + # + # @return [Orb::Models::SubscriptionPriceIntervalsResponse::BillingCycleAnchorConfiguration] + required :billing_cycle_anchor_configuration, + -> { Orb::Models::SubscriptionPriceIntervalsResponse::BillingCycleAnchorConfiguration } + + # @!attribute billing_cycle_day + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. + # + # @return [Integer] + required :billing_cycle_day, Integer + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute current_billing_period_end_date + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is not part of the billing period. Set to null for + # subscriptions that are not currently active. + # + # @return [Time, nil] + required :current_billing_period_end_date, Time, nil?: true + + # @!attribute current_billing_period_start_date + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if the subscription is not currently active. + # + # @return [Time, nil] + required :current_billing_period_start_date, Time, nil?: true + + # @!attribute customer + # A customer is a buyer of your products, and the other party to the billing + # relationship. + # + # In Orb, customers are assigned system generated identifiers automatically, but + # it's often desirable to have these match existing identifiers in your system. To + # avoid having to denormalize Orb ID information, you can pass in an + # `external_customer_id` with your own identifier. See + # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further + # information about how these aliases work in Orb. + # + # In addition to having an identifier in your system, a customer may exist in a + # payment provider solution like Stripe. Use the `payment_provider_id` and the + # `payment_provider` enum field to express this mapping. + # + # A customer also has a timezone (from the standard + # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to + # your account's timezone. See [Timezone localization](/essentials/timezones) for + # information on what this timezone parameter influences within Orb. + # + # @return [Orb::Models::Customer] + required :customer, -> { Orb::Models::Customer } + + # @!attribute default_invoice_memo + # Determines the default memo on this subscriptions' invoices. Note that if this + # is not provided, it is determined by the plan configuration. + # + # @return [String, nil] + required :default_invoice_memo, String, nil?: true + + # @!attribute discount_intervals + # The discount intervals for this subscription. + # + # @return [Array] + required :discount_intervals, + -> { Orb::ArrayOf[union: Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval] } + + # @!attribute end_date + # The date Orb stops billing for this subscription. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute fixed_fee_quantity_schedule + # + # @return [Array] + required :fixed_fee_quantity_schedule, + -> { Orb::ArrayOf[Orb::Models::SubscriptionPriceIntervalsResponse::FixedFeeQuantitySchedule] } + + # @!attribute invoicing_threshold + # + # @return [String, nil] + required :invoicing_threshold, String, nil?: true + + # @!attribute maximum_intervals + # The maximum intervals for this subscription. + # + # @return [Array] + required :maximum_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionPriceIntervalsResponse::MaximumInterval] } + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute minimum_intervals + # The minimum intervals for this subscription. + # + # @return [Array] + required :minimum_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionPriceIntervalsResponse::MinimumInterval] } + + # @!attribute net_terms + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of `0` here represents that the + # invoice is due on issue, whereas a value of `30` represents that the customer + # has a month to pay the invoice. + # + # @return [Integer] + required :net_terms, Integer + + # @!attribute plan + # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + # subscribed to by a customer. Plans define the billing behavior of the + # subscription. You can see more about how to configure prices in the + # [Price resource](/reference/price). + # + # @return [Orb::Models::Plan] + required :plan, -> { Orb::Models::Plan } + + # @!attribute price_intervals + # The price intervals for this subscription. + # + # @return [Array] + required :price_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval] } + + # @!attribute redeemed_coupon + # + # @return [Orb::Models::SubscriptionPriceIntervalsResponse::RedeemedCoupon, nil] + required :redeemed_coupon, + -> { Orb::Models::SubscriptionPriceIntervalsResponse::RedeemedCoupon }, + nil?: true + + # @!attribute start_date + # The date Orb starts billing for this subscription. + # + # @return [Time] + required :start_date, Time + + # @!attribute status + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsResponse::Status] + required :status, enum: -> { Orb::Models::SubscriptionPriceIntervalsResponse::Status } + + # @!attribute trial_info + # + # @return [Orb::Models::SubscriptionPriceIntervalsResponse::TrialInfo] + required :trial_info, -> { Orb::Models::SubscriptionPriceIntervalsResponse::TrialInfo } + + # @!parse + # # @param id [String] + # # @param active_plan_phase_order [Integer, nil] + # # @param adjustment_intervals [Array] + # # @param auto_collection [Boolean, nil] + # # @param billing_cycle_anchor_configuration [Orb::Models::SubscriptionPriceIntervalsResponse::BillingCycleAnchorConfiguration] + # # @param billing_cycle_day [Integer] + # # @param created_at [Time] + # # @param current_billing_period_end_date [Time, nil] + # # @param current_billing_period_start_date [Time, nil] + # # @param customer [Orb::Models::Customer] + # # @param default_invoice_memo [String, nil] + # # @param discount_intervals [Array] + # # @param end_date [Time, nil] + # # @param fixed_fee_quantity_schedule [Array] + # # @param invoicing_threshold [String, nil] + # # @param maximum_intervals [Array] + # # @param metadata [Hash{Symbol=>String}] + # # @param minimum_intervals [Array] + # # @param net_terms [Integer] + # # @param plan [Orb::Models::Plan] + # # @param price_intervals [Array] + # # @param redeemed_coupon [Orb::Models::SubscriptionPriceIntervalsResponse::RedeemedCoupon, nil] + # # @param start_date [Time] + # # @param status [Symbol, Orb::Models::SubscriptionPriceIntervalsResponse::Status] + # # @param trial_info [Orb::Models::SubscriptionPriceIntervalsResponse::TrialInfo] + # # + # def initialize( + # id:, + # active_plan_phase_order:, + # adjustment_intervals:, + # auto_collection:, + # billing_cycle_anchor_configuration:, + # billing_cycle_day:, + # created_at:, + # current_billing_period_end_date:, + # current_billing_period_start_date:, + # customer:, + # default_invoice_memo:, + # discount_intervals:, + # end_date:, + # fixed_fee_quantity_schedule:, + # invoicing_threshold:, + # maximum_intervals:, + # metadata:, + # minimum_intervals:, + # net_terms:, + # plan:, + # price_intervals:, + # redeemed_coupon:, + # start_date:, + # status:, + # trial_info:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class AdjustmentInterval < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment + # + # @return [Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] + required :adjustment, + union: -> { Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment } + + # @!attribute applies_to_price_interval_ids + # The price interval IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the adjustment interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the adjustment interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param id [String] + # # @param adjustment [Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # + # def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case adjustment + # in { + # adjustment_type: "usage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment ... + # in { + # adjustment_type: "amount_discount", + # id: String, + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment ... + # in { + # adjustment_type: "percentage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment ... + # in { + # adjustment_type: "minimum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment ... + # in { + # adjustment_type: "maximum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment ... + # end + # ``` + # + # @example + # ```ruby + # case adjustment + # in Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment + # # ... + # in Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + # # ... + # end + # ``` + class Adjustment < Orb::Union + discriminator :adjustment_type + + variant :usage_discount, + -> { Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment } + + variant :amount_discount, + -> { Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment } + + variant :percentage_discount, + -> { Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment } + + variant :minimum, + -> { Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment } + + variant :maximum, + -> { Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :usage_discount] + required :adjustment_type, const: :usage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!attribute usage_discount + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param usage_discount [Float] + # # @param adjustment_type [Symbol, :usage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # usage_discount:, + # adjustment_type: :usage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :amount_discount] + required :adjustment_type, const: :amount_discount + + # @!attribute amount_discount + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :amount_discount] + # # + # def initialize( + # id:, + # amount_discount:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # adjustment_type: :amount_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :percentage_discount] + required :adjustment_type, const: :percentage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute percentage_discount + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param percentage_discount [Float] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :percentage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # percentage_discount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :percentage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :minimum] + required :adjustment_type, const: :minimum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute item_id + # The item ID that revenue from this minimum will be attributed to. + # + # @return [String] + required :item_id, String + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param item_id [String] + # # @param minimum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :minimum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # item_id:, + # minimum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :maximum] + required :adjustment_type, const: :maximum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param maximum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :maximum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # maximum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :maximum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + # @!attribute day + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. + # + # @return [Integer] + required :day, Integer + + # @!attribute month + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). + # + # @return [Integer, nil] + optional :month, Integer, nil?: true + + # @!attribute year + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). + # + # @return [Integer, nil] + optional :year, Integer, nil?: true + + # @!parse + # # @param day [Integer] + # # @param month [Integer, nil] + # # @param year [Integer, nil] + # # + # def initialize(day:, month: nil, year: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case discount_interval + # in { + # discount_type: "amount", + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::AmountDiscountInterval ... + # in { + # discount_type: "percentage", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), + # end_date: Time + # } + # # Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::PercentageDiscountInterval ... + # in { + # discount_type: "usage", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), + # end_date: Time + # } + # # Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::UsageDiscountInterval ... + # end + # ``` + # + # @example + # ```ruby + # case discount_interval + # in Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::AmountDiscountInterval + # # ... + # in Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::PercentageDiscountInterval + # # ... + # in Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::UsageDiscountInterval + # # ... + # end + # ``` + class DiscountInterval < Orb::Union + discriminator :discount_type + + variant :amount, + -> { Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::AmountDiscountInterval } + + variant :percentage, + -> { Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::PercentageDiscountInterval } + + variant :usage, + -> { Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::UsageDiscountInterval } + + class AmountDiscountInterval < Orb::BaseModel + # @!attribute amount_discount + # Only available if discount_type is `amount`. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :amount] + required :discount_type, const: :amount + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # @param discount_type [Symbol, :amount] + # # + # def initialize( + # amount_discount:, + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # start_date:, + # discount_type: :amount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PercentageDiscountInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :percentage] + required :discount_type, const: :percentage + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute percentage_discount + # Only available if discount_type is `percentage`.This is a number between 0 + # and 1. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param percentage_discount [Float] + # # @param start_date [Time] + # # @param discount_type [Symbol, :percentage] + # # + # def initialize( + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # percentage_discount:, + # start_date:, + # discount_type: :percentage, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class UsageDiscountInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :usage] + required :discount_type, const: :usage + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!attribute usage_discount + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # @param usage_discount [Float] + # # @param discount_type [Symbol, :usage] + # # + # def initialize( + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # start_date:, + # usage_discount:, + # discount_type: :usage, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class FixedFeeQuantitySchedule < Orb::BaseModel + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute price_id + # + # @return [String] + required :price_id, String + + # @!attribute quantity + # + # @return [Float] + required :quantity, Float + + # @!attribute start_date + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param end_date [Time, nil] + # # @param price_id [String] + # # @param quantity [Float] + # # @param start_date [Time] + # # + # def initialize(end_date:, price_id:, quantity:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MaximumInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this maximum interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this maximum interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the maximum interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the price intervals + # this transform applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute start_date + # The start date of the maximum interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param maximum_amount [String] + # # @param start_date [Time] + # # + # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, maximum_amount:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MinimumInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this minimum interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this minimum interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the minimum interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the price intervals + # this minimum applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute start_date + # The start date of the minimum interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param minimum_amount [String] + # # @param start_date [Time] + # # + # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, minimum_amount:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PriceInterval < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute billing_cycle_day + # The day of the month that Orb bills for this price + # + # @return [Integer] + required :billing_cycle_day, Integer + + # @!attribute current_billing_period_end_date + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is exactly the end of the billing period. Set to null if + # this price interval is not currently active. + # + # @return [Time, nil] + required :current_billing_period_end_date, Time, nil?: true + + # @!attribute current_billing_period_start_date + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if this price interval is not currently active. + # + # @return [Time, nil] + required :current_billing_period_start_date, Time, nil?: true + + # @!attribute end_date + # The end date of the price interval. This is the date that Orb stops billing for + # this price. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute filter + # An additional filter to apply to usage queries. + # + # @return [String, nil] + required :filter, String, nil?: true + + # @!attribute fixed_fee_quantity_transitions + # The fixed fee quantity transitions for this price interval. This is only + # relevant for fixed fees. + # + # @return [Array, nil] + required :fixed_fee_quantity_transitions, + -> { Orb::ArrayOf[Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval::FixedFeeQuantityTransition] }, + nil?: true + + # @!attribute price + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) + # + # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + required :price, union: -> { Orb::Models::Price } + + # @!attribute start_date + # The start date of the price interval. This is the date that Orb starts billing + # for this price. + # + # @return [Time] + required :start_date, Time + + # @!attribute usage_customer_ids + # A list of customer IDs whose usage events will be aggregated and billed under + # this price interval. + # + # @return [Array, nil] + required :usage_customer_ids, Orb::ArrayOf[String], nil?: true + + # @!parse + # # The Price Interval resource represents a period of time for which a price will + # # bill on a subscription. A subscription’s price intervals define its billing + # # behavior. + # # + # # @param id [String] + # # @param billing_cycle_day [Integer] + # # @param current_billing_period_end_date [Time, nil] + # # @param current_billing_period_start_date [Time, nil] + # # @param end_date [Time, nil] + # # @param filter [String, nil] + # # @param fixed_fee_quantity_transitions [Array, nil] + # # @param price [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + # # @param start_date [Time] + # # @param usage_customer_ids [Array, nil] + # # + # def initialize( + # id:, + # billing_cycle_day:, + # current_billing_period_end_date:, + # current_billing_period_start_date:, + # end_date:, + # filter:, + # fixed_fee_quantity_transitions:, + # price:, + # start_date:, + # usage_customer_ids:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class FixedFeeQuantityTransition < Orb::BaseModel + # @!attribute effective_date + # + # @return [Time] + required :effective_date, Time + + # @!attribute price_id + # + # @return [String] + required :price_id, String + + # @!attribute quantity + # + # @return [Integer] + required :quantity, Integer + + # @!parse + # # @param effective_date [Time] + # # @param price_id [String] + # # @param quantity [Integer] + # # + # def initialize(effective_date:, price_id:, quantity:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class RedeemedCoupon < Orb::BaseModel + # @!attribute coupon_id + # + # @return [String] + required :coupon_id, String + + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param coupon_id [String] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # + # def initialize(coupon_id:, end_date:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case status + # in :active + # # ... + # in :ended + # # ... + # in :upcoming + # # ... + # end + # ``` + class Status < Orb::Enum + ACTIVE = :active + ENDED = :ended + UPCOMING = :upcoming + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class TrialInfo < Orb::BaseModel + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!parse + # # @param end_date [Time, nil] + # # + # def initialize(end_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end +end diff --git a/lib/orb/models/subscription_schedule_plan_change_params.rb b/lib/orb/models/subscription_schedule_plan_change_params.rb index 956a7a08..efe047c3 100644 --- a/lib/orb/models/subscription_schedule_plan_change_params.rb +++ b/lib/orb/models/subscription_schedule_plan_change_params.rb @@ -53,9 +53,9 @@ class SubscriptionSchedulePlanChangeParams < Orb::BaseModel # @!attribute billing_cycle_anchor_configuration # - # @return [Orb::Models::BillingCycleAnchorConfigurationModel, nil] + # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::BillingCycleAnchorConfiguration, nil] optional :billing_cycle_anchor_configuration, - -> { Orb::Models::BillingCycleAnchorConfigurationModel }, + -> { Orb::Models::SubscriptionSchedulePlanChangeParams::BillingCycleAnchorConfiguration }, nil?: true # @!attribute change_date @@ -208,7 +208,7 @@ class SubscriptionSchedulePlanChangeParams < Orb::BaseModel # # @param align_billing_with_plan_change_date [Boolean, nil] # # @param auto_collection [Boolean, nil] # # @param billing_cycle_alignment [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment, nil] - # # @param billing_cycle_anchor_configuration [Orb::Models::BillingCycleAnchorConfigurationModel, nil] + # # @param billing_cycle_anchor_configuration [Orb::Models::SubscriptionSchedulePlanChangeParams::BillingCycleAnchorConfiguration, nil] # # @param change_date [Time, nil] # # @param coupon_redemption_code [String, nil] # # @param credits_overage_rate [Float, nil] @@ -320,6 +320,41 @@ class BillingCycleAlignment < Orb::Enum # # # def self.values; end end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + # @!attribute day + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. + # + # @return [Integer] + required :day, Integer + + # @!attribute month + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). + # + # @return [Integer, nil] + optional :month, Integer, nil?: true + + # @!attribute year + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). + # + # @return [Integer, nil] + optional :year, Integer, nil?: true + + # @!parse + # # @param day [Integer] + # # @param month [Integer, nil] + # # @param year [Integer, nil] + # # + # def initialize(day:, month: nil, year: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end end end end diff --git a/lib/orb/models/subscription_schedule_plan_change_response.rb b/lib/orb/models/subscription_schedule_plan_change_response.rb new file mode 100644 index 00000000..cea99f8c --- /dev/null +++ b/lib/orb/models/subscription_schedule_plan_change_response.rb @@ -0,0 +1,1315 @@ +# frozen_string_literal: true + +module Orb + module Models + class SubscriptionSchedulePlanChangeResponse < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute active_plan_phase_order + # The current plan phase that is active, only if the subscription's plan has + # phases. + # + # @return [Integer, nil] + required :active_plan_phase_order, Integer, nil?: true + + # @!attribute adjustment_intervals + # The adjustment intervals for this subscription. + # + # @return [Array] + required :adjustment_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval] } + + # @!attribute auto_collection + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. This property defaults to + # the plan's behavior. If null, defaults to the customer's setting. + # + # @return [Boolean, nil] + required :auto_collection, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_anchor_configuration + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeResponse::BillingCycleAnchorConfiguration] + required :billing_cycle_anchor_configuration, + -> { Orb::Models::SubscriptionSchedulePlanChangeResponse::BillingCycleAnchorConfiguration } + + # @!attribute billing_cycle_day + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. + # + # @return [Integer] + required :billing_cycle_day, Integer + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute current_billing_period_end_date + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is not part of the billing period. Set to null for + # subscriptions that are not currently active. + # + # @return [Time, nil] + required :current_billing_period_end_date, Time, nil?: true + + # @!attribute current_billing_period_start_date + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if the subscription is not currently active. + # + # @return [Time, nil] + required :current_billing_period_start_date, Time, nil?: true + + # @!attribute customer + # A customer is a buyer of your products, and the other party to the billing + # relationship. + # + # In Orb, customers are assigned system generated identifiers automatically, but + # it's often desirable to have these match existing identifiers in your system. To + # avoid having to denormalize Orb ID information, you can pass in an + # `external_customer_id` with your own identifier. See + # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further + # information about how these aliases work in Orb. + # + # In addition to having an identifier in your system, a customer may exist in a + # payment provider solution like Stripe. Use the `payment_provider_id` and the + # `payment_provider` enum field to express this mapping. + # + # A customer also has a timezone (from the standard + # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to + # your account's timezone. See [Timezone localization](/essentials/timezones) for + # information on what this timezone parameter influences within Orb. + # + # @return [Orb::Models::Customer] + required :customer, -> { Orb::Models::Customer } + + # @!attribute default_invoice_memo + # Determines the default memo on this subscriptions' invoices. Note that if this + # is not provided, it is determined by the plan configuration. + # + # @return [String, nil] + required :default_invoice_memo, String, nil?: true + + # @!attribute discount_intervals + # The discount intervals for this subscription. + # + # @return [Array] + required :discount_intervals, + -> { Orb::ArrayOf[union: Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval] } + + # @!attribute end_date + # The date Orb stops billing for this subscription. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute fixed_fee_quantity_schedule + # + # @return [Array] + required :fixed_fee_quantity_schedule, + -> { Orb::ArrayOf[Orb::Models::SubscriptionSchedulePlanChangeResponse::FixedFeeQuantitySchedule] } + + # @!attribute invoicing_threshold + # + # @return [String, nil] + required :invoicing_threshold, String, nil?: true + + # @!attribute maximum_intervals + # The maximum intervals for this subscription. + # + # @return [Array] + required :maximum_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionSchedulePlanChangeResponse::MaximumInterval] } + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute minimum_intervals + # The minimum intervals for this subscription. + # + # @return [Array] + required :minimum_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionSchedulePlanChangeResponse::MinimumInterval] } + + # @!attribute net_terms + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of `0` here represents that the + # invoice is due on issue, whereas a value of `30` represents that the customer + # has a month to pay the invoice. + # + # @return [Integer] + required :net_terms, Integer + + # @!attribute plan + # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + # subscribed to by a customer. Plans define the billing behavior of the + # subscription. You can see more about how to configure prices in the + # [Price resource](/reference/price). + # + # @return [Orb::Models::Plan] + required :plan, -> { Orb::Models::Plan } + + # @!attribute price_intervals + # The price intervals for this subscription. + # + # @return [Array] + required :price_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval] } + + # @!attribute redeemed_coupon + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeResponse::RedeemedCoupon, nil] + required :redeemed_coupon, + -> { Orb::Models::SubscriptionSchedulePlanChangeResponse::RedeemedCoupon }, + nil?: true + + # @!attribute start_date + # The date Orb starts billing for this subscription. + # + # @return [Time] + required :start_date, Time + + # @!attribute status + # + # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeResponse::Status] + required :status, enum: -> { Orb::Models::SubscriptionSchedulePlanChangeResponse::Status } + + # @!attribute trial_info + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeResponse::TrialInfo] + required :trial_info, -> { Orb::Models::SubscriptionSchedulePlanChangeResponse::TrialInfo } + + # @!parse + # # @param id [String] + # # @param active_plan_phase_order [Integer, nil] + # # @param adjustment_intervals [Array] + # # @param auto_collection [Boolean, nil] + # # @param billing_cycle_anchor_configuration [Orb::Models::SubscriptionSchedulePlanChangeResponse::BillingCycleAnchorConfiguration] + # # @param billing_cycle_day [Integer] + # # @param created_at [Time] + # # @param current_billing_period_end_date [Time, nil] + # # @param current_billing_period_start_date [Time, nil] + # # @param customer [Orb::Models::Customer] + # # @param default_invoice_memo [String, nil] + # # @param discount_intervals [Array] + # # @param end_date [Time, nil] + # # @param fixed_fee_quantity_schedule [Array] + # # @param invoicing_threshold [String, nil] + # # @param maximum_intervals [Array] + # # @param metadata [Hash{Symbol=>String}] + # # @param minimum_intervals [Array] + # # @param net_terms [Integer] + # # @param plan [Orb::Models::Plan] + # # @param price_intervals [Array] + # # @param redeemed_coupon [Orb::Models::SubscriptionSchedulePlanChangeResponse::RedeemedCoupon, nil] + # # @param start_date [Time] + # # @param status [Symbol, Orb::Models::SubscriptionSchedulePlanChangeResponse::Status] + # # @param trial_info [Orb::Models::SubscriptionSchedulePlanChangeResponse::TrialInfo] + # # + # def initialize( + # id:, + # active_plan_phase_order:, + # adjustment_intervals:, + # auto_collection:, + # billing_cycle_anchor_configuration:, + # billing_cycle_day:, + # created_at:, + # current_billing_period_end_date:, + # current_billing_period_start_date:, + # customer:, + # default_invoice_memo:, + # discount_intervals:, + # end_date:, + # fixed_fee_quantity_schedule:, + # invoicing_threshold:, + # maximum_intervals:, + # metadata:, + # minimum_intervals:, + # net_terms:, + # plan:, + # price_intervals:, + # redeemed_coupon:, + # start_date:, + # status:, + # trial_info:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class AdjustmentInterval < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] + required :adjustment, + union: -> { Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment } + + # @!attribute applies_to_price_interval_ids + # The price interval IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the adjustment interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the adjustment interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param id [String] + # # @param adjustment [Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # + # def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case adjustment + # in { + # adjustment_type: "usage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment ... + # in { + # adjustment_type: "amount_discount", + # id: String, + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment ... + # in { + # adjustment_type: "percentage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment ... + # in { + # adjustment_type: "minimum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment ... + # in { + # adjustment_type: "maximum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment ... + # end + # ``` + # + # @example + # ```ruby + # case adjustment + # in Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment + # # ... + # in Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + # # ... + # end + # ``` + class Adjustment < Orb::Union + discriminator :adjustment_type + + variant :usage_discount, + -> { Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment } + + variant :amount_discount, + -> { Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment } + + variant :percentage_discount, + -> { Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment } + + variant :minimum, + -> { Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment } + + variant :maximum, + -> { Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :usage_discount] + required :adjustment_type, const: :usage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!attribute usage_discount + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param usage_discount [Float] + # # @param adjustment_type [Symbol, :usage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # usage_discount:, + # adjustment_type: :usage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :amount_discount] + required :adjustment_type, const: :amount_discount + + # @!attribute amount_discount + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :amount_discount] + # # + # def initialize( + # id:, + # amount_discount:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # adjustment_type: :amount_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :percentage_discount] + required :adjustment_type, const: :percentage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute percentage_discount + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param percentage_discount [Float] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :percentage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # percentage_discount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :percentage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :minimum] + required :adjustment_type, const: :minimum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute item_id + # The item ID that revenue from this minimum will be attributed to. + # + # @return [String] + required :item_id, String + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param item_id [String] + # # @param minimum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :minimum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # item_id:, + # minimum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :maximum] + required :adjustment_type, const: :maximum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param maximum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :maximum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # maximum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :maximum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + # @!attribute day + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. + # + # @return [Integer] + required :day, Integer + + # @!attribute month + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). + # + # @return [Integer, nil] + optional :month, Integer, nil?: true + + # @!attribute year + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). + # + # @return [Integer, nil] + optional :year, Integer, nil?: true + + # @!parse + # # @param day [Integer] + # # @param month [Integer, nil] + # # @param year [Integer, nil] + # # + # def initialize(day:, month: nil, year: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case discount_interval + # in { + # discount_type: "amount", + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::AmountDiscountInterval ... + # in { + # discount_type: "percentage", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), + # end_date: Time + # } + # # Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::PercentageDiscountInterval ... + # in { + # discount_type: "usage", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), + # end_date: Time + # } + # # Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::UsageDiscountInterval ... + # end + # ``` + # + # @example + # ```ruby + # case discount_interval + # in Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::AmountDiscountInterval + # # ... + # in Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::PercentageDiscountInterval + # # ... + # in Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::UsageDiscountInterval + # # ... + # end + # ``` + class DiscountInterval < Orb::Union + discriminator :discount_type + + variant :amount, + -> { Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::AmountDiscountInterval } + + variant :percentage, + -> { Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::PercentageDiscountInterval } + + variant :usage, + -> { Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::UsageDiscountInterval } + + class AmountDiscountInterval < Orb::BaseModel + # @!attribute amount_discount + # Only available if discount_type is `amount`. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :amount] + required :discount_type, const: :amount + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # @param discount_type [Symbol, :amount] + # # + # def initialize( + # amount_discount:, + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # start_date:, + # discount_type: :amount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PercentageDiscountInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :percentage] + required :discount_type, const: :percentage + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute percentage_discount + # Only available if discount_type is `percentage`.This is a number between 0 + # and 1. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param percentage_discount [Float] + # # @param start_date [Time] + # # @param discount_type [Symbol, :percentage] + # # + # def initialize( + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # percentage_discount:, + # start_date:, + # discount_type: :percentage, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class UsageDiscountInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :usage] + required :discount_type, const: :usage + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!attribute usage_discount + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # @param usage_discount [Float] + # # @param discount_type [Symbol, :usage] + # # + # def initialize( + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # start_date:, + # usage_discount:, + # discount_type: :usage, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class FixedFeeQuantitySchedule < Orb::BaseModel + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute price_id + # + # @return [String] + required :price_id, String + + # @!attribute quantity + # + # @return [Float] + required :quantity, Float + + # @!attribute start_date + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param end_date [Time, nil] + # # @param price_id [String] + # # @param quantity [Float] + # # @param start_date [Time] + # # + # def initialize(end_date:, price_id:, quantity:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MaximumInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this maximum interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this maximum interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the maximum interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the price intervals + # this transform applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute start_date + # The start date of the maximum interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param maximum_amount [String] + # # @param start_date [Time] + # # + # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, maximum_amount:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MinimumInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this minimum interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this minimum interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the minimum interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the price intervals + # this minimum applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute start_date + # The start date of the minimum interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param minimum_amount [String] + # # @param start_date [Time] + # # + # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, minimum_amount:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PriceInterval < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute billing_cycle_day + # The day of the month that Orb bills for this price + # + # @return [Integer] + required :billing_cycle_day, Integer + + # @!attribute current_billing_period_end_date + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is exactly the end of the billing period. Set to null if + # this price interval is not currently active. + # + # @return [Time, nil] + required :current_billing_period_end_date, Time, nil?: true + + # @!attribute current_billing_period_start_date + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if this price interval is not currently active. + # + # @return [Time, nil] + required :current_billing_period_start_date, Time, nil?: true + + # @!attribute end_date + # The end date of the price interval. This is the date that Orb stops billing for + # this price. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute filter + # An additional filter to apply to usage queries. + # + # @return [String, nil] + required :filter, String, nil?: true + + # @!attribute fixed_fee_quantity_transitions + # The fixed fee quantity transitions for this price interval. This is only + # relevant for fixed fees. + # + # @return [Array, nil] + required :fixed_fee_quantity_transitions, + -> { Orb::ArrayOf[Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval::FixedFeeQuantityTransition] }, + nil?: true + + # @!attribute price + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) + # + # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + required :price, union: -> { Orb::Models::Price } + + # @!attribute start_date + # The start date of the price interval. This is the date that Orb starts billing + # for this price. + # + # @return [Time] + required :start_date, Time + + # @!attribute usage_customer_ids + # A list of customer IDs whose usage events will be aggregated and billed under + # this price interval. + # + # @return [Array, nil] + required :usage_customer_ids, Orb::ArrayOf[String], nil?: true + + # @!parse + # # The Price Interval resource represents a period of time for which a price will + # # bill on a subscription. A subscription’s price intervals define its billing + # # behavior. + # # + # # @param id [String] + # # @param billing_cycle_day [Integer] + # # @param current_billing_period_end_date [Time, nil] + # # @param current_billing_period_start_date [Time, nil] + # # @param end_date [Time, nil] + # # @param filter [String, nil] + # # @param fixed_fee_quantity_transitions [Array, nil] + # # @param price [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + # # @param start_date [Time] + # # @param usage_customer_ids [Array, nil] + # # + # def initialize( + # id:, + # billing_cycle_day:, + # current_billing_period_end_date:, + # current_billing_period_start_date:, + # end_date:, + # filter:, + # fixed_fee_quantity_transitions:, + # price:, + # start_date:, + # usage_customer_ids:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class FixedFeeQuantityTransition < Orb::BaseModel + # @!attribute effective_date + # + # @return [Time] + required :effective_date, Time + + # @!attribute price_id + # + # @return [String] + required :price_id, String + + # @!attribute quantity + # + # @return [Integer] + required :quantity, Integer + + # @!parse + # # @param effective_date [Time] + # # @param price_id [String] + # # @param quantity [Integer] + # # + # def initialize(effective_date:, price_id:, quantity:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class RedeemedCoupon < Orb::BaseModel + # @!attribute coupon_id + # + # @return [String] + required :coupon_id, String + + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param coupon_id [String] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # + # def initialize(coupon_id:, end_date:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case status + # in :active + # # ... + # in :ended + # # ... + # in :upcoming + # # ... + # end + # ``` + class Status < Orb::Enum + ACTIVE = :active + ENDED = :ended + UPCOMING = :upcoming + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class TrialInfo < Orb::BaseModel + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!parse + # # @param end_date [Time, nil] + # # + # def initialize(end_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end +end diff --git a/lib/orb/models/subscription_trial_info_model.rb b/lib/orb/models/subscription_trial_info_model.rb deleted file mode 100644 index 0b5dbd7a..00000000 --- a/lib/orb/models/subscription_trial_info_model.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class SubscriptionTrialInfoModel < Orb::BaseModel - # @!attribute end_date - # - # @return [Time, nil] - required :end_date, Time, nil?: true - - # @!parse - # # @param end_date [Time, nil] - # # - # def initialize(end_date:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/subscription_trigger_phase_response.rb b/lib/orb/models/subscription_trigger_phase_response.rb new file mode 100644 index 00000000..7b844737 --- /dev/null +++ b/lib/orb/models/subscription_trigger_phase_response.rb @@ -0,0 +1,1315 @@ +# frozen_string_literal: true + +module Orb + module Models + class SubscriptionTriggerPhaseResponse < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute active_plan_phase_order + # The current plan phase that is active, only if the subscription's plan has + # phases. + # + # @return [Integer, nil] + required :active_plan_phase_order, Integer, nil?: true + + # @!attribute adjustment_intervals + # The adjustment intervals for this subscription. + # + # @return [Array] + required :adjustment_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval] } + + # @!attribute auto_collection + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. This property defaults to + # the plan's behavior. If null, defaults to the customer's setting. + # + # @return [Boolean, nil] + required :auto_collection, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_anchor_configuration + # + # @return [Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration] + required :billing_cycle_anchor_configuration, + -> { Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration } + + # @!attribute billing_cycle_day + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. + # + # @return [Integer] + required :billing_cycle_day, Integer + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute current_billing_period_end_date + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is not part of the billing period. Set to null for + # subscriptions that are not currently active. + # + # @return [Time, nil] + required :current_billing_period_end_date, Time, nil?: true + + # @!attribute current_billing_period_start_date + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if the subscription is not currently active. + # + # @return [Time, nil] + required :current_billing_period_start_date, Time, nil?: true + + # @!attribute customer + # A customer is a buyer of your products, and the other party to the billing + # relationship. + # + # In Orb, customers are assigned system generated identifiers automatically, but + # it's often desirable to have these match existing identifiers in your system. To + # avoid having to denormalize Orb ID information, you can pass in an + # `external_customer_id` with your own identifier. See + # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further + # information about how these aliases work in Orb. + # + # In addition to having an identifier in your system, a customer may exist in a + # payment provider solution like Stripe. Use the `payment_provider_id` and the + # `payment_provider` enum field to express this mapping. + # + # A customer also has a timezone (from the standard + # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to + # your account's timezone. See [Timezone localization](/essentials/timezones) for + # information on what this timezone parameter influences within Orb. + # + # @return [Orb::Models::Customer] + required :customer, -> { Orb::Models::Customer } + + # @!attribute default_invoice_memo + # Determines the default memo on this subscriptions' invoices. Note that if this + # is not provided, it is determined by the plan configuration. + # + # @return [String, nil] + required :default_invoice_memo, String, nil?: true + + # @!attribute discount_intervals + # The discount intervals for this subscription. + # + # @return [Array] + required :discount_intervals, + -> { Orb::ArrayOf[union: Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval] } + + # @!attribute end_date + # The date Orb stops billing for this subscription. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute fixed_fee_quantity_schedule + # + # @return [Array] + required :fixed_fee_quantity_schedule, + -> { Orb::ArrayOf[Orb::Models::SubscriptionTriggerPhaseResponse::FixedFeeQuantitySchedule] } + + # @!attribute invoicing_threshold + # + # @return [String, nil] + required :invoicing_threshold, String, nil?: true + + # @!attribute maximum_intervals + # The maximum intervals for this subscription. + # + # @return [Array] + required :maximum_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionTriggerPhaseResponse::MaximumInterval] } + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute minimum_intervals + # The minimum intervals for this subscription. + # + # @return [Array] + required :minimum_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionTriggerPhaseResponse::MinimumInterval] } + + # @!attribute net_terms + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of `0` here represents that the + # invoice is due on issue, whereas a value of `30` represents that the customer + # has a month to pay the invoice. + # + # @return [Integer] + required :net_terms, Integer + + # @!attribute plan + # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + # subscribed to by a customer. Plans define the billing behavior of the + # subscription. You can see more about how to configure prices in the + # [Price resource](/reference/price). + # + # @return [Orb::Models::Plan] + required :plan, -> { Orb::Models::Plan } + + # @!attribute price_intervals + # The price intervals for this subscription. + # + # @return [Array] + required :price_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval] } + + # @!attribute redeemed_coupon + # + # @return [Orb::Models::SubscriptionTriggerPhaseResponse::RedeemedCoupon, nil] + required :redeemed_coupon, + -> { Orb::Models::SubscriptionTriggerPhaseResponse::RedeemedCoupon }, + nil?: true + + # @!attribute start_date + # The date Orb starts billing for this subscription. + # + # @return [Time] + required :start_date, Time + + # @!attribute status + # + # @return [Symbol, Orb::Models::SubscriptionTriggerPhaseResponse::Status] + required :status, enum: -> { Orb::Models::SubscriptionTriggerPhaseResponse::Status } + + # @!attribute trial_info + # + # @return [Orb::Models::SubscriptionTriggerPhaseResponse::TrialInfo] + required :trial_info, -> { Orb::Models::SubscriptionTriggerPhaseResponse::TrialInfo } + + # @!parse + # # @param id [String] + # # @param active_plan_phase_order [Integer, nil] + # # @param adjustment_intervals [Array] + # # @param auto_collection [Boolean, nil] + # # @param billing_cycle_anchor_configuration [Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration] + # # @param billing_cycle_day [Integer] + # # @param created_at [Time] + # # @param current_billing_period_end_date [Time, nil] + # # @param current_billing_period_start_date [Time, nil] + # # @param customer [Orb::Models::Customer] + # # @param default_invoice_memo [String, nil] + # # @param discount_intervals [Array] + # # @param end_date [Time, nil] + # # @param fixed_fee_quantity_schedule [Array] + # # @param invoicing_threshold [String, nil] + # # @param maximum_intervals [Array] + # # @param metadata [Hash{Symbol=>String}] + # # @param minimum_intervals [Array] + # # @param net_terms [Integer] + # # @param plan [Orb::Models::Plan] + # # @param price_intervals [Array] + # # @param redeemed_coupon [Orb::Models::SubscriptionTriggerPhaseResponse::RedeemedCoupon, nil] + # # @param start_date [Time] + # # @param status [Symbol, Orb::Models::SubscriptionTriggerPhaseResponse::Status] + # # @param trial_info [Orb::Models::SubscriptionTriggerPhaseResponse::TrialInfo] + # # + # def initialize( + # id:, + # active_plan_phase_order:, + # adjustment_intervals:, + # auto_collection:, + # billing_cycle_anchor_configuration:, + # billing_cycle_day:, + # created_at:, + # current_billing_period_end_date:, + # current_billing_period_start_date:, + # customer:, + # default_invoice_memo:, + # discount_intervals:, + # end_date:, + # fixed_fee_quantity_schedule:, + # invoicing_threshold:, + # maximum_intervals:, + # metadata:, + # minimum_intervals:, + # net_terms:, + # plan:, + # price_intervals:, + # redeemed_coupon:, + # start_date:, + # status:, + # trial_info:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class AdjustmentInterval < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment + # + # @return [Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] + required :adjustment, + union: -> { Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment } + + # @!attribute applies_to_price_interval_ids + # The price interval IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the adjustment interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the adjustment interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param id [String] + # # @param adjustment [Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # + # def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case adjustment + # in { + # adjustment_type: "usage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment ... + # in { + # adjustment_type: "amount_discount", + # id: String, + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment ... + # in { + # adjustment_type: "percentage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment ... + # in { + # adjustment_type: "minimum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment ... + # in { + # adjustment_type: "maximum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment ... + # end + # ``` + # + # @example + # ```ruby + # case adjustment + # in Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment + # # ... + # in Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + # # ... + # end + # ``` + class Adjustment < Orb::Union + discriminator :adjustment_type + + variant :usage_discount, + -> { Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment } + + variant :amount_discount, + -> { Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment } + + variant :percentage_discount, + -> { Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment } + + variant :minimum, + -> { Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment } + + variant :maximum, + -> { Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :usage_discount] + required :adjustment_type, const: :usage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!attribute usage_discount + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param usage_discount [Float] + # # @param adjustment_type [Symbol, :usage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # usage_discount:, + # adjustment_type: :usage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :amount_discount] + required :adjustment_type, const: :amount_discount + + # @!attribute amount_discount + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :amount_discount] + # # + # def initialize( + # id:, + # amount_discount:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # adjustment_type: :amount_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :percentage_discount] + required :adjustment_type, const: :percentage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute percentage_discount + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param percentage_discount [Float] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :percentage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # percentage_discount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :percentage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :minimum] + required :adjustment_type, const: :minimum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute item_id + # The item ID that revenue from this minimum will be attributed to. + # + # @return [String] + required :item_id, String + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param item_id [String] + # # @param minimum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :minimum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # item_id:, + # minimum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :maximum] + required :adjustment_type, const: :maximum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param maximum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :maximum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # maximum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :maximum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + # @!attribute day + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. + # + # @return [Integer] + required :day, Integer + + # @!attribute month + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). + # + # @return [Integer, nil] + optional :month, Integer, nil?: true + + # @!attribute year + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). + # + # @return [Integer, nil] + optional :year, Integer, nil?: true + + # @!parse + # # @param day [Integer] + # # @param month [Integer, nil] + # # @param year [Integer, nil] + # # + # def initialize(day:, month: nil, year: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case discount_interval + # in { + # discount_type: "amount", + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::AmountDiscountInterval ... + # in { + # discount_type: "percentage", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), + # end_date: Time + # } + # # Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::PercentageDiscountInterval ... + # in { + # discount_type: "usage", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), + # end_date: Time + # } + # # Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::UsageDiscountInterval ... + # end + # ``` + # + # @example + # ```ruby + # case discount_interval + # in Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::AmountDiscountInterval + # # ... + # in Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::PercentageDiscountInterval + # # ... + # in Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::UsageDiscountInterval + # # ... + # end + # ``` + class DiscountInterval < Orb::Union + discriminator :discount_type + + variant :amount, + -> { Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::AmountDiscountInterval } + + variant :percentage, + -> { Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::PercentageDiscountInterval } + + variant :usage, + -> { Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::UsageDiscountInterval } + + class AmountDiscountInterval < Orb::BaseModel + # @!attribute amount_discount + # Only available if discount_type is `amount`. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :amount] + required :discount_type, const: :amount + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # @param discount_type [Symbol, :amount] + # # + # def initialize( + # amount_discount:, + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # start_date:, + # discount_type: :amount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PercentageDiscountInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :percentage] + required :discount_type, const: :percentage + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute percentage_discount + # Only available if discount_type is `percentage`.This is a number between 0 + # and 1. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param percentage_discount [Float] + # # @param start_date [Time] + # # @param discount_type [Symbol, :percentage] + # # + # def initialize( + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # percentage_discount:, + # start_date:, + # discount_type: :percentage, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class UsageDiscountInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :usage] + required :discount_type, const: :usage + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!attribute usage_discount + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # @param usage_discount [Float] + # # @param discount_type [Symbol, :usage] + # # + # def initialize( + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # start_date:, + # usage_discount:, + # discount_type: :usage, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class FixedFeeQuantitySchedule < Orb::BaseModel + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute price_id + # + # @return [String] + required :price_id, String + + # @!attribute quantity + # + # @return [Float] + required :quantity, Float + + # @!attribute start_date + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param end_date [Time, nil] + # # @param price_id [String] + # # @param quantity [Float] + # # @param start_date [Time] + # # + # def initialize(end_date:, price_id:, quantity:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MaximumInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this maximum interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this maximum interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the maximum interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the price intervals + # this transform applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute start_date + # The start date of the maximum interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param maximum_amount [String] + # # @param start_date [Time] + # # + # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, maximum_amount:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MinimumInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this minimum interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this minimum interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the minimum interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the price intervals + # this minimum applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute start_date + # The start date of the minimum interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param minimum_amount [String] + # # @param start_date [Time] + # # + # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, minimum_amount:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PriceInterval < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute billing_cycle_day + # The day of the month that Orb bills for this price + # + # @return [Integer] + required :billing_cycle_day, Integer + + # @!attribute current_billing_period_end_date + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is exactly the end of the billing period. Set to null if + # this price interval is not currently active. + # + # @return [Time, nil] + required :current_billing_period_end_date, Time, nil?: true + + # @!attribute current_billing_period_start_date + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if this price interval is not currently active. + # + # @return [Time, nil] + required :current_billing_period_start_date, Time, nil?: true + + # @!attribute end_date + # The end date of the price interval. This is the date that Orb stops billing for + # this price. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute filter + # An additional filter to apply to usage queries. + # + # @return [String, nil] + required :filter, String, nil?: true + + # @!attribute fixed_fee_quantity_transitions + # The fixed fee quantity transitions for this price interval. This is only + # relevant for fixed fees. + # + # @return [Array, nil] + required :fixed_fee_quantity_transitions, + -> { Orb::ArrayOf[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval::FixedFeeQuantityTransition] }, + nil?: true + + # @!attribute price + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) + # + # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + required :price, union: -> { Orb::Models::Price } + + # @!attribute start_date + # The start date of the price interval. This is the date that Orb starts billing + # for this price. + # + # @return [Time] + required :start_date, Time + + # @!attribute usage_customer_ids + # A list of customer IDs whose usage events will be aggregated and billed under + # this price interval. + # + # @return [Array, nil] + required :usage_customer_ids, Orb::ArrayOf[String], nil?: true + + # @!parse + # # The Price Interval resource represents a period of time for which a price will + # # bill on a subscription. A subscription’s price intervals define its billing + # # behavior. + # # + # # @param id [String] + # # @param billing_cycle_day [Integer] + # # @param current_billing_period_end_date [Time, nil] + # # @param current_billing_period_start_date [Time, nil] + # # @param end_date [Time, nil] + # # @param filter [String, nil] + # # @param fixed_fee_quantity_transitions [Array, nil] + # # @param price [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + # # @param start_date [Time] + # # @param usage_customer_ids [Array, nil] + # # + # def initialize( + # id:, + # billing_cycle_day:, + # current_billing_period_end_date:, + # current_billing_period_start_date:, + # end_date:, + # filter:, + # fixed_fee_quantity_transitions:, + # price:, + # start_date:, + # usage_customer_ids:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class FixedFeeQuantityTransition < Orb::BaseModel + # @!attribute effective_date + # + # @return [Time] + required :effective_date, Time + + # @!attribute price_id + # + # @return [String] + required :price_id, String + + # @!attribute quantity + # + # @return [Integer] + required :quantity, Integer + + # @!parse + # # @param effective_date [Time] + # # @param price_id [String] + # # @param quantity [Integer] + # # + # def initialize(effective_date:, price_id:, quantity:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class RedeemedCoupon < Orb::BaseModel + # @!attribute coupon_id + # + # @return [String] + required :coupon_id, String + + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param coupon_id [String] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # + # def initialize(coupon_id:, end_date:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case status + # in :active + # # ... + # in :ended + # # ... + # in :upcoming + # # ... + # end + # ``` + class Status < Orb::Enum + ACTIVE = :active + ENDED = :ended + UPCOMING = :upcoming + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class TrialInfo < Orb::BaseModel + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!parse + # # @param end_date [Time, nil] + # # + # def initialize(end_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end +end diff --git a/lib/orb/models/subscription_unschedule_cancellation_response.rb b/lib/orb/models/subscription_unschedule_cancellation_response.rb new file mode 100644 index 00000000..02d4d7d1 --- /dev/null +++ b/lib/orb/models/subscription_unschedule_cancellation_response.rb @@ -0,0 +1,1315 @@ +# frozen_string_literal: true + +module Orb + module Models + class SubscriptionUnscheduleCancellationResponse < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute active_plan_phase_order + # The current plan phase that is active, only if the subscription's plan has + # phases. + # + # @return [Integer, nil] + required :active_plan_phase_order, Integer, nil?: true + + # @!attribute adjustment_intervals + # The adjustment intervals for this subscription. + # + # @return [Array] + required :adjustment_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval] } + + # @!attribute auto_collection + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. This property defaults to + # the plan's behavior. If null, defaults to the customer's setting. + # + # @return [Boolean, nil] + required :auto_collection, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_anchor_configuration + # + # @return [Orb::Models::SubscriptionUnscheduleCancellationResponse::BillingCycleAnchorConfiguration] + required :billing_cycle_anchor_configuration, + -> { Orb::Models::SubscriptionUnscheduleCancellationResponse::BillingCycleAnchorConfiguration } + + # @!attribute billing_cycle_day + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. + # + # @return [Integer] + required :billing_cycle_day, Integer + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute current_billing_period_end_date + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is not part of the billing period. Set to null for + # subscriptions that are not currently active. + # + # @return [Time, nil] + required :current_billing_period_end_date, Time, nil?: true + + # @!attribute current_billing_period_start_date + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if the subscription is not currently active. + # + # @return [Time, nil] + required :current_billing_period_start_date, Time, nil?: true + + # @!attribute customer + # A customer is a buyer of your products, and the other party to the billing + # relationship. + # + # In Orb, customers are assigned system generated identifiers automatically, but + # it's often desirable to have these match existing identifiers in your system. To + # avoid having to denormalize Orb ID information, you can pass in an + # `external_customer_id` with your own identifier. See + # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further + # information about how these aliases work in Orb. + # + # In addition to having an identifier in your system, a customer may exist in a + # payment provider solution like Stripe. Use the `payment_provider_id` and the + # `payment_provider` enum field to express this mapping. + # + # A customer also has a timezone (from the standard + # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to + # your account's timezone. See [Timezone localization](/essentials/timezones) for + # information on what this timezone parameter influences within Orb. + # + # @return [Orb::Models::Customer] + required :customer, -> { Orb::Models::Customer } + + # @!attribute default_invoice_memo + # Determines the default memo on this subscriptions' invoices. Note that if this + # is not provided, it is determined by the plan configuration. + # + # @return [String, nil] + required :default_invoice_memo, String, nil?: true + + # @!attribute discount_intervals + # The discount intervals for this subscription. + # + # @return [Array] + required :discount_intervals, + -> { Orb::ArrayOf[union: Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval] } + + # @!attribute end_date + # The date Orb stops billing for this subscription. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute fixed_fee_quantity_schedule + # + # @return [Array] + required :fixed_fee_quantity_schedule, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUnscheduleCancellationResponse::FixedFeeQuantitySchedule] } + + # @!attribute invoicing_threshold + # + # @return [String, nil] + required :invoicing_threshold, String, nil?: true + + # @!attribute maximum_intervals + # The maximum intervals for this subscription. + # + # @return [Array] + required :maximum_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUnscheduleCancellationResponse::MaximumInterval] } + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute minimum_intervals + # The minimum intervals for this subscription. + # + # @return [Array] + required :minimum_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUnscheduleCancellationResponse::MinimumInterval] } + + # @!attribute net_terms + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of `0` here represents that the + # invoice is due on issue, whereas a value of `30` represents that the customer + # has a month to pay the invoice. + # + # @return [Integer] + required :net_terms, Integer + + # @!attribute plan + # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + # subscribed to by a customer. Plans define the billing behavior of the + # subscription. You can see more about how to configure prices in the + # [Price resource](/reference/price). + # + # @return [Orb::Models::Plan] + required :plan, -> { Orb::Models::Plan } + + # @!attribute price_intervals + # The price intervals for this subscription. + # + # @return [Array] + required :price_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval] } + + # @!attribute redeemed_coupon + # + # @return [Orb::Models::SubscriptionUnscheduleCancellationResponse::RedeemedCoupon, nil] + required :redeemed_coupon, + -> { Orb::Models::SubscriptionUnscheduleCancellationResponse::RedeemedCoupon }, + nil?: true + + # @!attribute start_date + # The date Orb starts billing for this subscription. + # + # @return [Time] + required :start_date, Time + + # @!attribute status + # + # @return [Symbol, Orb::Models::SubscriptionUnscheduleCancellationResponse::Status] + required :status, enum: -> { Orb::Models::SubscriptionUnscheduleCancellationResponse::Status } + + # @!attribute trial_info + # + # @return [Orb::Models::SubscriptionUnscheduleCancellationResponse::TrialInfo] + required :trial_info, -> { Orb::Models::SubscriptionUnscheduleCancellationResponse::TrialInfo } + + # @!parse + # # @param id [String] + # # @param active_plan_phase_order [Integer, nil] + # # @param adjustment_intervals [Array] + # # @param auto_collection [Boolean, nil] + # # @param billing_cycle_anchor_configuration [Orb::Models::SubscriptionUnscheduleCancellationResponse::BillingCycleAnchorConfiguration] + # # @param billing_cycle_day [Integer] + # # @param created_at [Time] + # # @param current_billing_period_end_date [Time, nil] + # # @param current_billing_period_start_date [Time, nil] + # # @param customer [Orb::Models::Customer] + # # @param default_invoice_memo [String, nil] + # # @param discount_intervals [Array] + # # @param end_date [Time, nil] + # # @param fixed_fee_quantity_schedule [Array] + # # @param invoicing_threshold [String, nil] + # # @param maximum_intervals [Array] + # # @param metadata [Hash{Symbol=>String}] + # # @param minimum_intervals [Array] + # # @param net_terms [Integer] + # # @param plan [Orb::Models::Plan] + # # @param price_intervals [Array] + # # @param redeemed_coupon [Orb::Models::SubscriptionUnscheduleCancellationResponse::RedeemedCoupon, nil] + # # @param start_date [Time] + # # @param status [Symbol, Orb::Models::SubscriptionUnscheduleCancellationResponse::Status] + # # @param trial_info [Orb::Models::SubscriptionUnscheduleCancellationResponse::TrialInfo] + # # + # def initialize( + # id:, + # active_plan_phase_order:, + # adjustment_intervals:, + # auto_collection:, + # billing_cycle_anchor_configuration:, + # billing_cycle_day:, + # created_at:, + # current_billing_period_end_date:, + # current_billing_period_start_date:, + # customer:, + # default_invoice_memo:, + # discount_intervals:, + # end_date:, + # fixed_fee_quantity_schedule:, + # invoicing_threshold:, + # maximum_intervals:, + # metadata:, + # minimum_intervals:, + # net_terms:, + # plan:, + # price_intervals:, + # redeemed_coupon:, + # start_date:, + # status:, + # trial_info:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class AdjustmentInterval < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment + # + # @return [Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] + required :adjustment, + union: -> { Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment } + + # @!attribute applies_to_price_interval_ids + # The price interval IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the adjustment interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the adjustment interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param id [String] + # # @param adjustment [Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # + # def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case adjustment + # in { + # adjustment_type: "usage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment ... + # in { + # adjustment_type: "amount_discount", + # id: String, + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment ... + # in { + # adjustment_type: "percentage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment ... + # in { + # adjustment_type: "minimum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment ... + # in { + # adjustment_type: "maximum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment ... + # end + # ``` + # + # @example + # ```ruby + # case adjustment + # in Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment + # # ... + # in Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + # # ... + # end + # ``` + class Adjustment < Orb::Union + discriminator :adjustment_type + + variant :usage_discount, + -> { Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment } + + variant :amount_discount, + -> { Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment } + + variant :percentage_discount, + -> { Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment } + + variant :minimum, + -> { Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment } + + variant :maximum, + -> { Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :usage_discount] + required :adjustment_type, const: :usage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!attribute usage_discount + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param usage_discount [Float] + # # @param adjustment_type [Symbol, :usage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # usage_discount:, + # adjustment_type: :usage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :amount_discount] + required :adjustment_type, const: :amount_discount + + # @!attribute amount_discount + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :amount_discount] + # # + # def initialize( + # id:, + # amount_discount:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # adjustment_type: :amount_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :percentage_discount] + required :adjustment_type, const: :percentage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute percentage_discount + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param percentage_discount [Float] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :percentage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # percentage_discount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :percentage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :minimum] + required :adjustment_type, const: :minimum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute item_id + # The item ID that revenue from this minimum will be attributed to. + # + # @return [String] + required :item_id, String + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param item_id [String] + # # @param minimum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :minimum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # item_id:, + # minimum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :maximum] + required :adjustment_type, const: :maximum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param maximum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :maximum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # maximum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :maximum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + # @!attribute day + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. + # + # @return [Integer] + required :day, Integer + + # @!attribute month + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). + # + # @return [Integer, nil] + optional :month, Integer, nil?: true + + # @!attribute year + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). + # + # @return [Integer, nil] + optional :year, Integer, nil?: true + + # @!parse + # # @param day [Integer] + # # @param month [Integer, nil] + # # @param year [Integer, nil] + # # + # def initialize(day:, month: nil, year: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case discount_interval + # in { + # discount_type: "amount", + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::AmountDiscountInterval ... + # in { + # discount_type: "percentage", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), + # end_date: Time + # } + # # Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::PercentageDiscountInterval ... + # in { + # discount_type: "usage", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), + # end_date: Time + # } + # # Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::UsageDiscountInterval ... + # end + # ``` + # + # @example + # ```ruby + # case discount_interval + # in Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::AmountDiscountInterval + # # ... + # in Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::PercentageDiscountInterval + # # ... + # in Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::UsageDiscountInterval + # # ... + # end + # ``` + class DiscountInterval < Orb::Union + discriminator :discount_type + + variant :amount, + -> { Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::AmountDiscountInterval } + + variant :percentage, + -> { Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::PercentageDiscountInterval } + + variant :usage, + -> { Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::UsageDiscountInterval } + + class AmountDiscountInterval < Orb::BaseModel + # @!attribute amount_discount + # Only available if discount_type is `amount`. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :amount] + required :discount_type, const: :amount + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # @param discount_type [Symbol, :amount] + # # + # def initialize( + # amount_discount:, + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # start_date:, + # discount_type: :amount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PercentageDiscountInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :percentage] + required :discount_type, const: :percentage + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute percentage_discount + # Only available if discount_type is `percentage`.This is a number between 0 + # and 1. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param percentage_discount [Float] + # # @param start_date [Time] + # # @param discount_type [Symbol, :percentage] + # # + # def initialize( + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # percentage_discount:, + # start_date:, + # discount_type: :percentage, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class UsageDiscountInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :usage] + required :discount_type, const: :usage + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!attribute usage_discount + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # @param usage_discount [Float] + # # @param discount_type [Symbol, :usage] + # # + # def initialize( + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # start_date:, + # usage_discount:, + # discount_type: :usage, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class FixedFeeQuantitySchedule < Orb::BaseModel + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute price_id + # + # @return [String] + required :price_id, String + + # @!attribute quantity + # + # @return [Float] + required :quantity, Float + + # @!attribute start_date + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param end_date [Time, nil] + # # @param price_id [String] + # # @param quantity [Float] + # # @param start_date [Time] + # # + # def initialize(end_date:, price_id:, quantity:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MaximumInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this maximum interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this maximum interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the maximum interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the price intervals + # this transform applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute start_date + # The start date of the maximum interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param maximum_amount [String] + # # @param start_date [Time] + # # + # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, maximum_amount:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MinimumInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this minimum interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this minimum interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the minimum interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the price intervals + # this minimum applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute start_date + # The start date of the minimum interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param minimum_amount [String] + # # @param start_date [Time] + # # + # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, minimum_amount:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PriceInterval < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute billing_cycle_day + # The day of the month that Orb bills for this price + # + # @return [Integer] + required :billing_cycle_day, Integer + + # @!attribute current_billing_period_end_date + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is exactly the end of the billing period. Set to null if + # this price interval is not currently active. + # + # @return [Time, nil] + required :current_billing_period_end_date, Time, nil?: true + + # @!attribute current_billing_period_start_date + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if this price interval is not currently active. + # + # @return [Time, nil] + required :current_billing_period_start_date, Time, nil?: true + + # @!attribute end_date + # The end date of the price interval. This is the date that Orb stops billing for + # this price. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute filter + # An additional filter to apply to usage queries. + # + # @return [String, nil] + required :filter, String, nil?: true + + # @!attribute fixed_fee_quantity_transitions + # The fixed fee quantity transitions for this price interval. This is only + # relevant for fixed fees. + # + # @return [Array, nil] + required :fixed_fee_quantity_transitions, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval::FixedFeeQuantityTransition] }, + nil?: true + + # @!attribute price + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) + # + # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + required :price, union: -> { Orb::Models::Price } + + # @!attribute start_date + # The start date of the price interval. This is the date that Orb starts billing + # for this price. + # + # @return [Time] + required :start_date, Time + + # @!attribute usage_customer_ids + # A list of customer IDs whose usage events will be aggregated and billed under + # this price interval. + # + # @return [Array, nil] + required :usage_customer_ids, Orb::ArrayOf[String], nil?: true + + # @!parse + # # The Price Interval resource represents a period of time for which a price will + # # bill on a subscription. A subscription’s price intervals define its billing + # # behavior. + # # + # # @param id [String] + # # @param billing_cycle_day [Integer] + # # @param current_billing_period_end_date [Time, nil] + # # @param current_billing_period_start_date [Time, nil] + # # @param end_date [Time, nil] + # # @param filter [String, nil] + # # @param fixed_fee_quantity_transitions [Array, nil] + # # @param price [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + # # @param start_date [Time] + # # @param usage_customer_ids [Array, nil] + # # + # def initialize( + # id:, + # billing_cycle_day:, + # current_billing_period_end_date:, + # current_billing_period_start_date:, + # end_date:, + # filter:, + # fixed_fee_quantity_transitions:, + # price:, + # start_date:, + # usage_customer_ids:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class FixedFeeQuantityTransition < Orb::BaseModel + # @!attribute effective_date + # + # @return [Time] + required :effective_date, Time + + # @!attribute price_id + # + # @return [String] + required :price_id, String + + # @!attribute quantity + # + # @return [Integer] + required :quantity, Integer + + # @!parse + # # @param effective_date [Time] + # # @param price_id [String] + # # @param quantity [Integer] + # # + # def initialize(effective_date:, price_id:, quantity:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class RedeemedCoupon < Orb::BaseModel + # @!attribute coupon_id + # + # @return [String] + required :coupon_id, String + + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param coupon_id [String] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # + # def initialize(coupon_id:, end_date:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case status + # in :active + # # ... + # in :ended + # # ... + # in :upcoming + # # ... + # end + # ``` + class Status < Orb::Enum + ACTIVE = :active + ENDED = :ended + UPCOMING = :upcoming + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class TrialInfo < Orb::BaseModel + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!parse + # # @param end_date [Time, nil] + # # + # def initialize(end_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end +end diff --git a/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb b/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb new file mode 100644 index 00000000..085353bf --- /dev/null +++ b/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb @@ -0,0 +1,1319 @@ +# frozen_string_literal: true + +module Orb + module Models + class SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute active_plan_phase_order + # The current plan phase that is active, only if the subscription's plan has + # phases. + # + # @return [Integer, nil] + required :active_plan_phase_order, Integer, nil?: true + + # @!attribute adjustment_intervals + # The adjustment intervals for this subscription. + # + # @return [Array] + required :adjustment_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval] } + + # @!attribute auto_collection + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. This property defaults to + # the plan's behavior. If null, defaults to the customer's setting. + # + # @return [Boolean, nil] + required :auto_collection, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_anchor_configuration + # + # @return [Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::BillingCycleAnchorConfiguration] + required :billing_cycle_anchor_configuration, + -> { Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::BillingCycleAnchorConfiguration } + + # @!attribute billing_cycle_day + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. + # + # @return [Integer] + required :billing_cycle_day, Integer + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute current_billing_period_end_date + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is not part of the billing period. Set to null for + # subscriptions that are not currently active. + # + # @return [Time, nil] + required :current_billing_period_end_date, Time, nil?: true + + # @!attribute current_billing_period_start_date + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if the subscription is not currently active. + # + # @return [Time, nil] + required :current_billing_period_start_date, Time, nil?: true + + # @!attribute customer + # A customer is a buyer of your products, and the other party to the billing + # relationship. + # + # In Orb, customers are assigned system generated identifiers automatically, but + # it's often desirable to have these match existing identifiers in your system. To + # avoid having to denormalize Orb ID information, you can pass in an + # `external_customer_id` with your own identifier. See + # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further + # information about how these aliases work in Orb. + # + # In addition to having an identifier in your system, a customer may exist in a + # payment provider solution like Stripe. Use the `payment_provider_id` and the + # `payment_provider` enum field to express this mapping. + # + # A customer also has a timezone (from the standard + # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to + # your account's timezone. See [Timezone localization](/essentials/timezones) for + # information on what this timezone parameter influences within Orb. + # + # @return [Orb::Models::Customer] + required :customer, -> { Orb::Models::Customer } + + # @!attribute default_invoice_memo + # Determines the default memo on this subscriptions' invoices. Note that if this + # is not provided, it is determined by the plan configuration. + # + # @return [String, nil] + required :default_invoice_memo, String, nil?: true + + # @!attribute discount_intervals + # The discount intervals for this subscription. + # + # @return [Array] + required :discount_intervals, + -> { Orb::ArrayOf[union: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval] } + + # @!attribute end_date + # The date Orb stops billing for this subscription. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute fixed_fee_quantity_schedule + # + # @return [Array] + required :fixed_fee_quantity_schedule, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::FixedFeeQuantitySchedule] } + + # @!attribute invoicing_threshold + # + # @return [String, nil] + required :invoicing_threshold, String, nil?: true + + # @!attribute maximum_intervals + # The maximum intervals for this subscription. + # + # @return [Array] + required :maximum_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MaximumInterval] } + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute minimum_intervals + # The minimum intervals for this subscription. + # + # @return [Array] + required :minimum_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MinimumInterval] } + + # @!attribute net_terms + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of `0` here represents that the + # invoice is due on issue, whereas a value of `30` represents that the customer + # has a month to pay the invoice. + # + # @return [Integer] + required :net_terms, Integer + + # @!attribute plan + # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + # subscribed to by a customer. Plans define the billing behavior of the + # subscription. You can see more about how to configure prices in the + # [Price resource](/reference/price). + # + # @return [Orb::Models::Plan] + required :plan, -> { Orb::Models::Plan } + + # @!attribute price_intervals + # The price intervals for this subscription. + # + # @return [Array] + required :price_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval] } + + # @!attribute redeemed_coupon + # + # @return [Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::RedeemedCoupon, nil] + required :redeemed_coupon, + -> { Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::RedeemedCoupon }, + nil?: true + + # @!attribute start_date + # The date Orb starts billing for this subscription. + # + # @return [Time] + required :start_date, Time + + # @!attribute status + # + # @return [Symbol, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::Status] + required :status, enum: -> { Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::Status } + + # @!attribute trial_info + # + # @return [Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::TrialInfo] + required :trial_info, -> { Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::TrialInfo } + + # @!parse + # # @param id [String] + # # @param active_plan_phase_order [Integer, nil] + # # @param adjustment_intervals [Array] + # # @param auto_collection [Boolean, nil] + # # @param billing_cycle_anchor_configuration [Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::BillingCycleAnchorConfiguration] + # # @param billing_cycle_day [Integer] + # # @param created_at [Time] + # # @param current_billing_period_end_date [Time, nil] + # # @param current_billing_period_start_date [Time, nil] + # # @param customer [Orb::Models::Customer] + # # @param default_invoice_memo [String, nil] + # # @param discount_intervals [Array] + # # @param end_date [Time, nil] + # # @param fixed_fee_quantity_schedule [Array] + # # @param invoicing_threshold [String, nil] + # # @param maximum_intervals [Array] + # # @param metadata [Hash{Symbol=>String}] + # # @param minimum_intervals [Array] + # # @param net_terms [Integer] + # # @param plan [Orb::Models::Plan] + # # @param price_intervals [Array] + # # @param redeemed_coupon [Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::RedeemedCoupon, nil] + # # @param start_date [Time] + # # @param status [Symbol, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::Status] + # # @param trial_info [Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::TrialInfo] + # # + # def initialize( + # id:, + # active_plan_phase_order:, + # adjustment_intervals:, + # auto_collection:, + # billing_cycle_anchor_configuration:, + # billing_cycle_day:, + # created_at:, + # current_billing_period_end_date:, + # current_billing_period_start_date:, + # customer:, + # default_invoice_memo:, + # discount_intervals:, + # end_date:, + # fixed_fee_quantity_schedule:, + # invoicing_threshold:, + # maximum_intervals:, + # metadata:, + # minimum_intervals:, + # net_terms:, + # plan:, + # price_intervals:, + # redeemed_coupon:, + # start_date:, + # status:, + # trial_info:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class AdjustmentInterval < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment + # + # @return [Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] + required :adjustment, + union: -> { Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment } + + # @!attribute applies_to_price_interval_ids + # The price interval IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the adjustment interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the adjustment interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param id [String] + # # @param adjustment [Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # + # def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case adjustment + # in { + # adjustment_type: "usage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment ... + # in { + # adjustment_type: "amount_discount", + # id: String, + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment ... + # in { + # adjustment_type: "percentage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment ... + # in { + # adjustment_type: "minimum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment ... + # in { + # adjustment_type: "maximum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment ... + # end + # ``` + # + # @example + # ```ruby + # case adjustment + # in Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment + # # ... + # in Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + # # ... + # end + # ``` + class Adjustment < Orb::Union + discriminator :adjustment_type + + variant :usage_discount, + -> { Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment } + + variant :amount_discount, + -> { Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment } + + variant :percentage_discount, + -> { Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment } + + variant :minimum, + -> { Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment } + + variant :maximum, + -> { Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :usage_discount] + required :adjustment_type, const: :usage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!attribute usage_discount + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param usage_discount [Float] + # # @param adjustment_type [Symbol, :usage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # usage_discount:, + # adjustment_type: :usage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :amount_discount] + required :adjustment_type, const: :amount_discount + + # @!attribute amount_discount + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :amount_discount] + # # + # def initialize( + # id:, + # amount_discount:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # adjustment_type: :amount_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :percentage_discount] + required :adjustment_type, const: :percentage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute percentage_discount + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param percentage_discount [Float] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :percentage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # percentage_discount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :percentage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :minimum] + required :adjustment_type, const: :minimum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute item_id + # The item ID that revenue from this minimum will be attributed to. + # + # @return [String] + required :item_id, String + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param item_id [String] + # # @param minimum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :minimum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # item_id:, + # minimum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :maximum] + required :adjustment_type, const: :maximum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param maximum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :maximum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # maximum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :maximum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + # @!attribute day + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. + # + # @return [Integer] + required :day, Integer + + # @!attribute month + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). + # + # @return [Integer, nil] + optional :month, Integer, nil?: true + + # @!attribute year + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). + # + # @return [Integer, nil] + optional :year, Integer, nil?: true + + # @!parse + # # @param day [Integer] + # # @param month [Integer, nil] + # # @param year [Integer, nil] + # # + # def initialize(day:, month: nil, year: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case discount_interval + # in { + # discount_type: "amount", + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::AmountDiscountInterval ... + # in { + # discount_type: "percentage", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), + # end_date: Time + # } + # # Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::PercentageDiscountInterval ... + # in { + # discount_type: "usage", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), + # end_date: Time + # } + # # Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::UsageDiscountInterval ... + # end + # ``` + # + # @example + # ```ruby + # case discount_interval + # in Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::AmountDiscountInterval + # # ... + # in Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::PercentageDiscountInterval + # # ... + # in Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::UsageDiscountInterval + # # ... + # end + # ``` + class DiscountInterval < Orb::Union + discriminator :discount_type + + variant :amount, + -> { Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::AmountDiscountInterval } + + variant :percentage, + -> { Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::PercentageDiscountInterval } + + variant :usage, + -> { Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::UsageDiscountInterval } + + class AmountDiscountInterval < Orb::BaseModel + # @!attribute amount_discount + # Only available if discount_type is `amount`. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :amount] + required :discount_type, const: :amount + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # @param discount_type [Symbol, :amount] + # # + # def initialize( + # amount_discount:, + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # start_date:, + # discount_type: :amount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PercentageDiscountInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :percentage] + required :discount_type, const: :percentage + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute percentage_discount + # Only available if discount_type is `percentage`.This is a number between 0 + # and 1. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param percentage_discount [Float] + # # @param start_date [Time] + # # @param discount_type [Symbol, :percentage] + # # + # def initialize( + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # percentage_discount:, + # start_date:, + # discount_type: :percentage, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class UsageDiscountInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :usage] + required :discount_type, const: :usage + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!attribute usage_discount + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # @param usage_discount [Float] + # # @param discount_type [Symbol, :usage] + # # + # def initialize( + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # start_date:, + # usage_discount:, + # discount_type: :usage, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class FixedFeeQuantitySchedule < Orb::BaseModel + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute price_id + # + # @return [String] + required :price_id, String + + # @!attribute quantity + # + # @return [Float] + required :quantity, Float + + # @!attribute start_date + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param end_date [Time, nil] + # # @param price_id [String] + # # @param quantity [Float] + # # @param start_date [Time] + # # + # def initialize(end_date:, price_id:, quantity:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MaximumInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this maximum interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this maximum interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the maximum interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the price intervals + # this transform applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute start_date + # The start date of the maximum interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param maximum_amount [String] + # # @param start_date [Time] + # # + # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, maximum_amount:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MinimumInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this minimum interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this minimum interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the minimum interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the price intervals + # this minimum applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute start_date + # The start date of the minimum interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param minimum_amount [String] + # # @param start_date [Time] + # # + # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, minimum_amount:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PriceInterval < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute billing_cycle_day + # The day of the month that Orb bills for this price + # + # @return [Integer] + required :billing_cycle_day, Integer + + # @!attribute current_billing_period_end_date + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is exactly the end of the billing period. Set to null if + # this price interval is not currently active. + # + # @return [Time, nil] + required :current_billing_period_end_date, Time, nil?: true + + # @!attribute current_billing_period_start_date + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if this price interval is not currently active. + # + # @return [Time, nil] + required :current_billing_period_start_date, Time, nil?: true + + # @!attribute end_date + # The end date of the price interval. This is the date that Orb stops billing for + # this price. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute filter + # An additional filter to apply to usage queries. + # + # @return [String, nil] + required :filter, String, nil?: true + + # @!attribute fixed_fee_quantity_transitions + # The fixed fee quantity transitions for this price interval. This is only + # relevant for fixed fees. + # + # @return [Array, nil] + required :fixed_fee_quantity_transitions, + -> do + Orb::ArrayOf[ + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval::FixedFeeQuantityTransition + ] + end, + nil?: true + + # @!attribute price + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) + # + # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + required :price, union: -> { Orb::Models::Price } + + # @!attribute start_date + # The start date of the price interval. This is the date that Orb starts billing + # for this price. + # + # @return [Time] + required :start_date, Time + + # @!attribute usage_customer_ids + # A list of customer IDs whose usage events will be aggregated and billed under + # this price interval. + # + # @return [Array, nil] + required :usage_customer_ids, Orb::ArrayOf[String], nil?: true + + # @!parse + # # The Price Interval resource represents a period of time for which a price will + # # bill on a subscription. A subscription’s price intervals define its billing + # # behavior. + # # + # # @param id [String] + # # @param billing_cycle_day [Integer] + # # @param current_billing_period_end_date [Time, nil] + # # @param current_billing_period_start_date [Time, nil] + # # @param end_date [Time, nil] + # # @param filter [String, nil] + # # @param fixed_fee_quantity_transitions [Array, nil] + # # @param price [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + # # @param start_date [Time] + # # @param usage_customer_ids [Array, nil] + # # + # def initialize( + # id:, + # billing_cycle_day:, + # current_billing_period_end_date:, + # current_billing_period_start_date:, + # end_date:, + # filter:, + # fixed_fee_quantity_transitions:, + # price:, + # start_date:, + # usage_customer_ids:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class FixedFeeQuantityTransition < Orb::BaseModel + # @!attribute effective_date + # + # @return [Time] + required :effective_date, Time + + # @!attribute price_id + # + # @return [String] + required :price_id, String + + # @!attribute quantity + # + # @return [Integer] + required :quantity, Integer + + # @!parse + # # @param effective_date [Time] + # # @param price_id [String] + # # @param quantity [Integer] + # # + # def initialize(effective_date:, price_id:, quantity:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class RedeemedCoupon < Orb::BaseModel + # @!attribute coupon_id + # + # @return [String] + required :coupon_id, String + + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param coupon_id [String] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # + # def initialize(coupon_id:, end_date:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case status + # in :active + # # ... + # in :ended + # # ... + # in :upcoming + # # ... + # end + # ``` + class Status < Orb::Enum + ACTIVE = :active + ENDED = :ended + UPCOMING = :upcoming + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class TrialInfo < Orb::BaseModel + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!parse + # # @param end_date [Time, nil] + # # + # def initialize(end_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end +end diff --git a/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb b/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb new file mode 100644 index 00000000..cf1c810e --- /dev/null +++ b/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb @@ -0,0 +1,1315 @@ +# frozen_string_literal: true + +module Orb + module Models + class SubscriptionUnschedulePendingPlanChangesResponse < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute active_plan_phase_order + # The current plan phase that is active, only if the subscription's plan has + # phases. + # + # @return [Integer, nil] + required :active_plan_phase_order, Integer, nil?: true + + # @!attribute adjustment_intervals + # The adjustment intervals for this subscription. + # + # @return [Array] + required :adjustment_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval] } + + # @!attribute auto_collection + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. This property defaults to + # the plan's behavior. If null, defaults to the customer's setting. + # + # @return [Boolean, nil] + required :auto_collection, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_anchor_configuration + # + # @return [Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::BillingCycleAnchorConfiguration] + required :billing_cycle_anchor_configuration, + -> { Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::BillingCycleAnchorConfiguration } + + # @!attribute billing_cycle_day + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. + # + # @return [Integer] + required :billing_cycle_day, Integer + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute current_billing_period_end_date + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is not part of the billing period. Set to null for + # subscriptions that are not currently active. + # + # @return [Time, nil] + required :current_billing_period_end_date, Time, nil?: true + + # @!attribute current_billing_period_start_date + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if the subscription is not currently active. + # + # @return [Time, nil] + required :current_billing_period_start_date, Time, nil?: true + + # @!attribute customer + # A customer is a buyer of your products, and the other party to the billing + # relationship. + # + # In Orb, customers are assigned system generated identifiers automatically, but + # it's often desirable to have these match existing identifiers in your system. To + # avoid having to denormalize Orb ID information, you can pass in an + # `external_customer_id` with your own identifier. See + # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further + # information about how these aliases work in Orb. + # + # In addition to having an identifier in your system, a customer may exist in a + # payment provider solution like Stripe. Use the `payment_provider_id` and the + # `payment_provider` enum field to express this mapping. + # + # A customer also has a timezone (from the standard + # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to + # your account's timezone. See [Timezone localization](/essentials/timezones) for + # information on what this timezone parameter influences within Orb. + # + # @return [Orb::Models::Customer] + required :customer, -> { Orb::Models::Customer } + + # @!attribute default_invoice_memo + # Determines the default memo on this subscriptions' invoices. Note that if this + # is not provided, it is determined by the plan configuration. + # + # @return [String, nil] + required :default_invoice_memo, String, nil?: true + + # @!attribute discount_intervals + # The discount intervals for this subscription. + # + # @return [Array] + required :discount_intervals, + -> { Orb::ArrayOf[union: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval] } + + # @!attribute end_date + # The date Orb stops billing for this subscription. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute fixed_fee_quantity_schedule + # + # @return [Array] + required :fixed_fee_quantity_schedule, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::FixedFeeQuantitySchedule] } + + # @!attribute invoicing_threshold + # + # @return [String, nil] + required :invoicing_threshold, String, nil?: true + + # @!attribute maximum_intervals + # The maximum intervals for this subscription. + # + # @return [Array] + required :maximum_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::MaximumInterval] } + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute minimum_intervals + # The minimum intervals for this subscription. + # + # @return [Array] + required :minimum_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::MinimumInterval] } + + # @!attribute net_terms + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of `0` here represents that the + # invoice is due on issue, whereas a value of `30` represents that the customer + # has a month to pay the invoice. + # + # @return [Integer] + required :net_terms, Integer + + # @!attribute plan + # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + # subscribed to by a customer. Plans define the billing behavior of the + # subscription. You can see more about how to configure prices in the + # [Price resource](/reference/price). + # + # @return [Orb::Models::Plan] + required :plan, -> { Orb::Models::Plan } + + # @!attribute price_intervals + # The price intervals for this subscription. + # + # @return [Array] + required :price_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::PriceInterval] } + + # @!attribute redeemed_coupon + # + # @return [Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::RedeemedCoupon, nil] + required :redeemed_coupon, + -> { Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::RedeemedCoupon }, + nil?: true + + # @!attribute start_date + # The date Orb starts billing for this subscription. + # + # @return [Time] + required :start_date, Time + + # @!attribute status + # + # @return [Symbol, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::Status] + required :status, enum: -> { Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::Status } + + # @!attribute trial_info + # + # @return [Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::TrialInfo] + required :trial_info, -> { Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::TrialInfo } + + # @!parse + # # @param id [String] + # # @param active_plan_phase_order [Integer, nil] + # # @param adjustment_intervals [Array] + # # @param auto_collection [Boolean, nil] + # # @param billing_cycle_anchor_configuration [Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::BillingCycleAnchorConfiguration] + # # @param billing_cycle_day [Integer] + # # @param created_at [Time] + # # @param current_billing_period_end_date [Time, nil] + # # @param current_billing_period_start_date [Time, nil] + # # @param customer [Orb::Models::Customer] + # # @param default_invoice_memo [String, nil] + # # @param discount_intervals [Array] + # # @param end_date [Time, nil] + # # @param fixed_fee_quantity_schedule [Array] + # # @param invoicing_threshold [String, nil] + # # @param maximum_intervals [Array] + # # @param metadata [Hash{Symbol=>String}] + # # @param minimum_intervals [Array] + # # @param net_terms [Integer] + # # @param plan [Orb::Models::Plan] + # # @param price_intervals [Array] + # # @param redeemed_coupon [Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::RedeemedCoupon, nil] + # # @param start_date [Time] + # # @param status [Symbol, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::Status] + # # @param trial_info [Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::TrialInfo] + # # + # def initialize( + # id:, + # active_plan_phase_order:, + # adjustment_intervals:, + # auto_collection:, + # billing_cycle_anchor_configuration:, + # billing_cycle_day:, + # created_at:, + # current_billing_period_end_date:, + # current_billing_period_start_date:, + # customer:, + # default_invoice_memo:, + # discount_intervals:, + # end_date:, + # fixed_fee_quantity_schedule:, + # invoicing_threshold:, + # maximum_intervals:, + # metadata:, + # minimum_intervals:, + # net_terms:, + # plan:, + # price_intervals:, + # redeemed_coupon:, + # start_date:, + # status:, + # trial_info:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class AdjustmentInterval < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment + # + # @return [Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] + required :adjustment, + union: -> { Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment } + + # @!attribute applies_to_price_interval_ids + # The price interval IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the adjustment interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the adjustment interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param id [String] + # # @param adjustment [Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # + # def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case adjustment + # in { + # adjustment_type: "usage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment ... + # in { + # adjustment_type: "amount_discount", + # id: String, + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment ... + # in { + # adjustment_type: "percentage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment ... + # in { + # adjustment_type: "minimum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment ... + # in { + # adjustment_type: "maximum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment ... + # end + # ``` + # + # @example + # ```ruby + # case adjustment + # in Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment + # # ... + # in Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + # # ... + # end + # ``` + class Adjustment < Orb::Union + discriminator :adjustment_type + + variant :usage_discount, + -> { Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment } + + variant :amount_discount, + -> { Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment } + + variant :percentage_discount, + -> { Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment } + + variant :minimum, + -> { Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment } + + variant :maximum, + -> { Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :usage_discount] + required :adjustment_type, const: :usage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!attribute usage_discount + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param usage_discount [Float] + # # @param adjustment_type [Symbol, :usage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # usage_discount:, + # adjustment_type: :usage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :amount_discount] + required :adjustment_type, const: :amount_discount + + # @!attribute amount_discount + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :amount_discount] + # # + # def initialize( + # id:, + # amount_discount:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # adjustment_type: :amount_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :percentage_discount] + required :adjustment_type, const: :percentage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute percentage_discount + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param percentage_discount [Float] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :percentage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # percentage_discount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :percentage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :minimum] + required :adjustment_type, const: :minimum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute item_id + # The item ID that revenue from this minimum will be attributed to. + # + # @return [String] + required :item_id, String + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param item_id [String] + # # @param minimum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :minimum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # item_id:, + # minimum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :maximum] + required :adjustment_type, const: :maximum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param maximum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :maximum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # maximum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :maximum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + # @!attribute day + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. + # + # @return [Integer] + required :day, Integer + + # @!attribute month + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). + # + # @return [Integer, nil] + optional :month, Integer, nil?: true + + # @!attribute year + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). + # + # @return [Integer, nil] + optional :year, Integer, nil?: true + + # @!parse + # # @param day [Integer] + # # @param month [Integer, nil] + # # @param year [Integer, nil] + # # + # def initialize(day:, month: nil, year: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case discount_interval + # in { + # discount_type: "amount", + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::AmountDiscountInterval ... + # in { + # discount_type: "percentage", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), + # end_date: Time + # } + # # Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::PercentageDiscountInterval ... + # in { + # discount_type: "usage", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), + # end_date: Time + # } + # # Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::UsageDiscountInterval ... + # end + # ``` + # + # @example + # ```ruby + # case discount_interval + # in Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::AmountDiscountInterval + # # ... + # in Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::PercentageDiscountInterval + # # ... + # in Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::UsageDiscountInterval + # # ... + # end + # ``` + class DiscountInterval < Orb::Union + discriminator :discount_type + + variant :amount, + -> { Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::AmountDiscountInterval } + + variant :percentage, + -> { Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::PercentageDiscountInterval } + + variant :usage, + -> { Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::UsageDiscountInterval } + + class AmountDiscountInterval < Orb::BaseModel + # @!attribute amount_discount + # Only available if discount_type is `amount`. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :amount] + required :discount_type, const: :amount + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # @param discount_type [Symbol, :amount] + # # + # def initialize( + # amount_discount:, + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # start_date:, + # discount_type: :amount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PercentageDiscountInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :percentage] + required :discount_type, const: :percentage + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute percentage_discount + # Only available if discount_type is `percentage`.This is a number between 0 + # and 1. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param percentage_discount [Float] + # # @param start_date [Time] + # # @param discount_type [Symbol, :percentage] + # # + # def initialize( + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # percentage_discount:, + # start_date:, + # discount_type: :percentage, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class UsageDiscountInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :usage] + required :discount_type, const: :usage + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!attribute usage_discount + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # @param usage_discount [Float] + # # @param discount_type [Symbol, :usage] + # # + # def initialize( + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # start_date:, + # usage_discount:, + # discount_type: :usage, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class FixedFeeQuantitySchedule < Orb::BaseModel + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute price_id + # + # @return [String] + required :price_id, String + + # @!attribute quantity + # + # @return [Float] + required :quantity, Float + + # @!attribute start_date + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param end_date [Time, nil] + # # @param price_id [String] + # # @param quantity [Float] + # # @param start_date [Time] + # # + # def initialize(end_date:, price_id:, quantity:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MaximumInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this maximum interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this maximum interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the maximum interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the price intervals + # this transform applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute start_date + # The start date of the maximum interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param maximum_amount [String] + # # @param start_date [Time] + # # + # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, maximum_amount:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MinimumInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this minimum interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this minimum interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the minimum interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the price intervals + # this minimum applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute start_date + # The start date of the minimum interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param minimum_amount [String] + # # @param start_date [Time] + # # + # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, minimum_amount:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PriceInterval < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute billing_cycle_day + # The day of the month that Orb bills for this price + # + # @return [Integer] + required :billing_cycle_day, Integer + + # @!attribute current_billing_period_end_date + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is exactly the end of the billing period. Set to null if + # this price interval is not currently active. + # + # @return [Time, nil] + required :current_billing_period_end_date, Time, nil?: true + + # @!attribute current_billing_period_start_date + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if this price interval is not currently active. + # + # @return [Time, nil] + required :current_billing_period_start_date, Time, nil?: true + + # @!attribute end_date + # The end date of the price interval. This is the date that Orb stops billing for + # this price. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute filter + # An additional filter to apply to usage queries. + # + # @return [String, nil] + required :filter, String, nil?: true + + # @!attribute fixed_fee_quantity_transitions + # The fixed fee quantity transitions for this price interval. This is only + # relevant for fixed fees. + # + # @return [Array, nil] + required :fixed_fee_quantity_transitions, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::PriceInterval::FixedFeeQuantityTransition] }, + nil?: true + + # @!attribute price + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) + # + # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + required :price, union: -> { Orb::Models::Price } + + # @!attribute start_date + # The start date of the price interval. This is the date that Orb starts billing + # for this price. + # + # @return [Time] + required :start_date, Time + + # @!attribute usage_customer_ids + # A list of customer IDs whose usage events will be aggregated and billed under + # this price interval. + # + # @return [Array, nil] + required :usage_customer_ids, Orb::ArrayOf[String], nil?: true + + # @!parse + # # The Price Interval resource represents a period of time for which a price will + # # bill on a subscription. A subscription’s price intervals define its billing + # # behavior. + # # + # # @param id [String] + # # @param billing_cycle_day [Integer] + # # @param current_billing_period_end_date [Time, nil] + # # @param current_billing_period_start_date [Time, nil] + # # @param end_date [Time, nil] + # # @param filter [String, nil] + # # @param fixed_fee_quantity_transitions [Array, nil] + # # @param price [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + # # @param start_date [Time] + # # @param usage_customer_ids [Array, nil] + # # + # def initialize( + # id:, + # billing_cycle_day:, + # current_billing_period_end_date:, + # current_billing_period_start_date:, + # end_date:, + # filter:, + # fixed_fee_quantity_transitions:, + # price:, + # start_date:, + # usage_customer_ids:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class FixedFeeQuantityTransition < Orb::BaseModel + # @!attribute effective_date + # + # @return [Time] + required :effective_date, Time + + # @!attribute price_id + # + # @return [String] + required :price_id, String + + # @!attribute quantity + # + # @return [Integer] + required :quantity, Integer + + # @!parse + # # @param effective_date [Time] + # # @param price_id [String] + # # @param quantity [Integer] + # # + # def initialize(effective_date:, price_id:, quantity:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class RedeemedCoupon < Orb::BaseModel + # @!attribute coupon_id + # + # @return [String] + required :coupon_id, String + + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param coupon_id [String] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # + # def initialize(coupon_id:, end_date:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case status + # in :active + # # ... + # in :ended + # # ... + # in :upcoming + # # ... + # end + # ``` + class Status < Orb::Enum + ACTIVE = :active + ENDED = :ended + UPCOMING = :upcoming + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class TrialInfo < Orb::BaseModel + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!parse + # # @param end_date [Time, nil] + # # + # def initialize(end_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end +end diff --git a/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb b/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb new file mode 100644 index 00000000..13c3001e --- /dev/null +++ b/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb @@ -0,0 +1,1315 @@ +# frozen_string_literal: true + +module Orb + module Models + class SubscriptionUpdateFixedFeeQuantityResponse < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute active_plan_phase_order + # The current plan phase that is active, only if the subscription's plan has + # phases. + # + # @return [Integer, nil] + required :active_plan_phase_order, Integer, nil?: true + + # @!attribute adjustment_intervals + # The adjustment intervals for this subscription. + # + # @return [Array] + required :adjustment_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval] } + + # @!attribute auto_collection + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. This property defaults to + # the plan's behavior. If null, defaults to the customer's setting. + # + # @return [Boolean, nil] + required :auto_collection, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_anchor_configuration + # + # @return [Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::BillingCycleAnchorConfiguration] + required :billing_cycle_anchor_configuration, + -> { Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::BillingCycleAnchorConfiguration } + + # @!attribute billing_cycle_day + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. + # + # @return [Integer] + required :billing_cycle_day, Integer + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute current_billing_period_end_date + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is not part of the billing period. Set to null for + # subscriptions that are not currently active. + # + # @return [Time, nil] + required :current_billing_period_end_date, Time, nil?: true + + # @!attribute current_billing_period_start_date + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if the subscription is not currently active. + # + # @return [Time, nil] + required :current_billing_period_start_date, Time, nil?: true + + # @!attribute customer + # A customer is a buyer of your products, and the other party to the billing + # relationship. + # + # In Orb, customers are assigned system generated identifiers automatically, but + # it's often desirable to have these match existing identifiers in your system. To + # avoid having to denormalize Orb ID information, you can pass in an + # `external_customer_id` with your own identifier. See + # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further + # information about how these aliases work in Orb. + # + # In addition to having an identifier in your system, a customer may exist in a + # payment provider solution like Stripe. Use the `payment_provider_id` and the + # `payment_provider` enum field to express this mapping. + # + # A customer also has a timezone (from the standard + # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to + # your account's timezone. See [Timezone localization](/essentials/timezones) for + # information on what this timezone parameter influences within Orb. + # + # @return [Orb::Models::Customer] + required :customer, -> { Orb::Models::Customer } + + # @!attribute default_invoice_memo + # Determines the default memo on this subscriptions' invoices. Note that if this + # is not provided, it is determined by the plan configuration. + # + # @return [String, nil] + required :default_invoice_memo, String, nil?: true + + # @!attribute discount_intervals + # The discount intervals for this subscription. + # + # @return [Array] + required :discount_intervals, + -> { Orb::ArrayOf[union: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval] } + + # @!attribute end_date + # The date Orb stops billing for this subscription. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute fixed_fee_quantity_schedule + # + # @return [Array] + required :fixed_fee_quantity_schedule, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::FixedFeeQuantitySchedule] } + + # @!attribute invoicing_threshold + # + # @return [String, nil] + required :invoicing_threshold, String, nil?: true + + # @!attribute maximum_intervals + # The maximum intervals for this subscription. + # + # @return [Array] + required :maximum_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::MaximumInterval] } + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute minimum_intervals + # The minimum intervals for this subscription. + # + # @return [Array] + required :minimum_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::MinimumInterval] } + + # @!attribute net_terms + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of `0` here represents that the + # invoice is due on issue, whereas a value of `30` represents that the customer + # has a month to pay the invoice. + # + # @return [Integer] + required :net_terms, Integer + + # @!attribute plan + # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + # subscribed to by a customer. Plans define the billing behavior of the + # subscription. You can see more about how to configure prices in the + # [Price resource](/reference/price). + # + # @return [Orb::Models::Plan] + required :plan, -> { Orb::Models::Plan } + + # @!attribute price_intervals + # The price intervals for this subscription. + # + # @return [Array] + required :price_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::PriceInterval] } + + # @!attribute redeemed_coupon + # + # @return [Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::RedeemedCoupon, nil] + required :redeemed_coupon, + -> { Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::RedeemedCoupon }, + nil?: true + + # @!attribute start_date + # The date Orb starts billing for this subscription. + # + # @return [Time] + required :start_date, Time + + # @!attribute status + # + # @return [Symbol, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::Status] + required :status, enum: -> { Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::Status } + + # @!attribute trial_info + # + # @return [Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::TrialInfo] + required :trial_info, -> { Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::TrialInfo } + + # @!parse + # # @param id [String] + # # @param active_plan_phase_order [Integer, nil] + # # @param adjustment_intervals [Array] + # # @param auto_collection [Boolean, nil] + # # @param billing_cycle_anchor_configuration [Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::BillingCycleAnchorConfiguration] + # # @param billing_cycle_day [Integer] + # # @param created_at [Time] + # # @param current_billing_period_end_date [Time, nil] + # # @param current_billing_period_start_date [Time, nil] + # # @param customer [Orb::Models::Customer] + # # @param default_invoice_memo [String, nil] + # # @param discount_intervals [Array] + # # @param end_date [Time, nil] + # # @param fixed_fee_quantity_schedule [Array] + # # @param invoicing_threshold [String, nil] + # # @param maximum_intervals [Array] + # # @param metadata [Hash{Symbol=>String}] + # # @param minimum_intervals [Array] + # # @param net_terms [Integer] + # # @param plan [Orb::Models::Plan] + # # @param price_intervals [Array] + # # @param redeemed_coupon [Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::RedeemedCoupon, nil] + # # @param start_date [Time] + # # @param status [Symbol, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::Status] + # # @param trial_info [Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::TrialInfo] + # # + # def initialize( + # id:, + # active_plan_phase_order:, + # adjustment_intervals:, + # auto_collection:, + # billing_cycle_anchor_configuration:, + # billing_cycle_day:, + # created_at:, + # current_billing_period_end_date:, + # current_billing_period_start_date:, + # customer:, + # default_invoice_memo:, + # discount_intervals:, + # end_date:, + # fixed_fee_quantity_schedule:, + # invoicing_threshold:, + # maximum_intervals:, + # metadata:, + # minimum_intervals:, + # net_terms:, + # plan:, + # price_intervals:, + # redeemed_coupon:, + # start_date:, + # status:, + # trial_info:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class AdjustmentInterval < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment + # + # @return [Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] + required :adjustment, + union: -> { Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment } + + # @!attribute applies_to_price_interval_ids + # The price interval IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the adjustment interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the adjustment interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param id [String] + # # @param adjustment [Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # + # def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case adjustment + # in { + # adjustment_type: "usage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment ... + # in { + # adjustment_type: "amount_discount", + # id: String, + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment ... + # in { + # adjustment_type: "percentage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment ... + # in { + # adjustment_type: "minimum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment ... + # in { + # adjustment_type: "maximum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment ... + # end + # ``` + # + # @example + # ```ruby + # case adjustment + # in Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment + # # ... + # in Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + # # ... + # end + # ``` + class Adjustment < Orb::Union + discriminator :adjustment_type + + variant :usage_discount, + -> { Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment } + + variant :amount_discount, + -> { Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment } + + variant :percentage_discount, + -> { Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment } + + variant :minimum, + -> { Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment } + + variant :maximum, + -> { Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :usage_discount] + required :adjustment_type, const: :usage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!attribute usage_discount + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param usage_discount [Float] + # # @param adjustment_type [Symbol, :usage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # usage_discount:, + # adjustment_type: :usage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :amount_discount] + required :adjustment_type, const: :amount_discount + + # @!attribute amount_discount + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :amount_discount] + # # + # def initialize( + # id:, + # amount_discount:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # adjustment_type: :amount_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :percentage_discount] + required :adjustment_type, const: :percentage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute percentage_discount + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param percentage_discount [Float] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :percentage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # percentage_discount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :percentage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :minimum] + required :adjustment_type, const: :minimum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute item_id + # The item ID that revenue from this minimum will be attributed to. + # + # @return [String] + required :item_id, String + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param item_id [String] + # # @param minimum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :minimum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # item_id:, + # minimum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :maximum] + required :adjustment_type, const: :maximum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param maximum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :maximum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # maximum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :maximum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + # @!attribute day + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. + # + # @return [Integer] + required :day, Integer + + # @!attribute month + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). + # + # @return [Integer, nil] + optional :month, Integer, nil?: true + + # @!attribute year + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). + # + # @return [Integer, nil] + optional :year, Integer, nil?: true + + # @!parse + # # @param day [Integer] + # # @param month [Integer, nil] + # # @param year [Integer, nil] + # # + # def initialize(day:, month: nil, year: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case discount_interval + # in { + # discount_type: "amount", + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::AmountDiscountInterval ... + # in { + # discount_type: "percentage", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), + # end_date: Time + # } + # # Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::PercentageDiscountInterval ... + # in { + # discount_type: "usage", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), + # end_date: Time + # } + # # Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::UsageDiscountInterval ... + # end + # ``` + # + # @example + # ```ruby + # case discount_interval + # in Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::AmountDiscountInterval + # # ... + # in Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::PercentageDiscountInterval + # # ... + # in Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::UsageDiscountInterval + # # ... + # end + # ``` + class DiscountInterval < Orb::Union + discriminator :discount_type + + variant :amount, + -> { Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::AmountDiscountInterval } + + variant :percentage, + -> { Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::PercentageDiscountInterval } + + variant :usage, + -> { Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::UsageDiscountInterval } + + class AmountDiscountInterval < Orb::BaseModel + # @!attribute amount_discount + # Only available if discount_type is `amount`. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :amount] + required :discount_type, const: :amount + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # @param discount_type [Symbol, :amount] + # # + # def initialize( + # amount_discount:, + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # start_date:, + # discount_type: :amount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PercentageDiscountInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :percentage] + required :discount_type, const: :percentage + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute percentage_discount + # Only available if discount_type is `percentage`.This is a number between 0 + # and 1. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param percentage_discount [Float] + # # @param start_date [Time] + # # @param discount_type [Symbol, :percentage] + # # + # def initialize( + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # percentage_discount:, + # start_date:, + # discount_type: :percentage, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class UsageDiscountInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :usage] + required :discount_type, const: :usage + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!attribute usage_discount + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # @param usage_discount [Float] + # # @param discount_type [Symbol, :usage] + # # + # def initialize( + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # start_date:, + # usage_discount:, + # discount_type: :usage, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class FixedFeeQuantitySchedule < Orb::BaseModel + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute price_id + # + # @return [String] + required :price_id, String + + # @!attribute quantity + # + # @return [Float] + required :quantity, Float + + # @!attribute start_date + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param end_date [Time, nil] + # # @param price_id [String] + # # @param quantity [Float] + # # @param start_date [Time] + # # + # def initialize(end_date:, price_id:, quantity:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MaximumInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this maximum interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this maximum interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the maximum interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the price intervals + # this transform applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute start_date + # The start date of the maximum interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param maximum_amount [String] + # # @param start_date [Time] + # # + # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, maximum_amount:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MinimumInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this minimum interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this minimum interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the minimum interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the price intervals + # this minimum applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute start_date + # The start date of the minimum interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param minimum_amount [String] + # # @param start_date [Time] + # # + # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, minimum_amount:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PriceInterval < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute billing_cycle_day + # The day of the month that Orb bills for this price + # + # @return [Integer] + required :billing_cycle_day, Integer + + # @!attribute current_billing_period_end_date + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is exactly the end of the billing period. Set to null if + # this price interval is not currently active. + # + # @return [Time, nil] + required :current_billing_period_end_date, Time, nil?: true + + # @!attribute current_billing_period_start_date + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if this price interval is not currently active. + # + # @return [Time, nil] + required :current_billing_period_start_date, Time, nil?: true + + # @!attribute end_date + # The end date of the price interval. This is the date that Orb stops billing for + # this price. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute filter + # An additional filter to apply to usage queries. + # + # @return [String, nil] + required :filter, String, nil?: true + + # @!attribute fixed_fee_quantity_transitions + # The fixed fee quantity transitions for this price interval. This is only + # relevant for fixed fees. + # + # @return [Array, nil] + required :fixed_fee_quantity_transitions, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::PriceInterval::FixedFeeQuantityTransition] }, + nil?: true + + # @!attribute price + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) + # + # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + required :price, union: -> { Orb::Models::Price } + + # @!attribute start_date + # The start date of the price interval. This is the date that Orb starts billing + # for this price. + # + # @return [Time] + required :start_date, Time + + # @!attribute usage_customer_ids + # A list of customer IDs whose usage events will be aggregated and billed under + # this price interval. + # + # @return [Array, nil] + required :usage_customer_ids, Orb::ArrayOf[String], nil?: true + + # @!parse + # # The Price Interval resource represents a period of time for which a price will + # # bill on a subscription. A subscription’s price intervals define its billing + # # behavior. + # # + # # @param id [String] + # # @param billing_cycle_day [Integer] + # # @param current_billing_period_end_date [Time, nil] + # # @param current_billing_period_start_date [Time, nil] + # # @param end_date [Time, nil] + # # @param filter [String, nil] + # # @param fixed_fee_quantity_transitions [Array, nil] + # # @param price [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + # # @param start_date [Time] + # # @param usage_customer_ids [Array, nil] + # # + # def initialize( + # id:, + # billing_cycle_day:, + # current_billing_period_end_date:, + # current_billing_period_start_date:, + # end_date:, + # filter:, + # fixed_fee_quantity_transitions:, + # price:, + # start_date:, + # usage_customer_ids:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class FixedFeeQuantityTransition < Orb::BaseModel + # @!attribute effective_date + # + # @return [Time] + required :effective_date, Time + + # @!attribute price_id + # + # @return [String] + required :price_id, String + + # @!attribute quantity + # + # @return [Integer] + required :quantity, Integer + + # @!parse + # # @param effective_date [Time] + # # @param price_id [String] + # # @param quantity [Integer] + # # + # def initialize(effective_date:, price_id:, quantity:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class RedeemedCoupon < Orb::BaseModel + # @!attribute coupon_id + # + # @return [String] + required :coupon_id, String + + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param coupon_id [String] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # + # def initialize(coupon_id:, end_date:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case status + # in :active + # # ... + # in :ended + # # ... + # in :upcoming + # # ... + # end + # ``` + class Status < Orb::Enum + ACTIVE = :active + ENDED = :ended + UPCOMING = :upcoming + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class TrialInfo < Orb::BaseModel + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!parse + # # @param end_date [Time, nil] + # # + # def initialize(end_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end +end diff --git a/lib/orb/models/subscription_update_trial_response.rb b/lib/orb/models/subscription_update_trial_response.rb new file mode 100644 index 00000000..cb625994 --- /dev/null +++ b/lib/orb/models/subscription_update_trial_response.rb @@ -0,0 +1,1313 @@ +# frozen_string_literal: true + +module Orb + module Models + class SubscriptionUpdateTrialResponse < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute active_plan_phase_order + # The current plan phase that is active, only if the subscription's plan has + # phases. + # + # @return [Integer, nil] + required :active_plan_phase_order, Integer, nil?: true + + # @!attribute adjustment_intervals + # The adjustment intervals for this subscription. + # + # @return [Array] + required :adjustment_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval] } + + # @!attribute auto_collection + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. This property defaults to + # the plan's behavior. If null, defaults to the customer's setting. + # + # @return [Boolean, nil] + required :auto_collection, Orb::BooleanModel, nil?: true + + # @!attribute billing_cycle_anchor_configuration + # + # @return [Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration] + required :billing_cycle_anchor_configuration, + -> { Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration } + + # @!attribute billing_cycle_day + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. + # + # @return [Integer] + required :billing_cycle_day, Integer + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute current_billing_period_end_date + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is not part of the billing period. Set to null for + # subscriptions that are not currently active. + # + # @return [Time, nil] + required :current_billing_period_end_date, Time, nil?: true + + # @!attribute current_billing_period_start_date + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if the subscription is not currently active. + # + # @return [Time, nil] + required :current_billing_period_start_date, Time, nil?: true + + # @!attribute customer + # A customer is a buyer of your products, and the other party to the billing + # relationship. + # + # In Orb, customers are assigned system generated identifiers automatically, but + # it's often desirable to have these match existing identifiers in your system. To + # avoid having to denormalize Orb ID information, you can pass in an + # `external_customer_id` with your own identifier. See + # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further + # information about how these aliases work in Orb. + # + # In addition to having an identifier in your system, a customer may exist in a + # payment provider solution like Stripe. Use the `payment_provider_id` and the + # `payment_provider` enum field to express this mapping. + # + # A customer also has a timezone (from the standard + # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to + # your account's timezone. See [Timezone localization](/essentials/timezones) for + # information on what this timezone parameter influences within Orb. + # + # @return [Orb::Models::Customer] + required :customer, -> { Orb::Models::Customer } + + # @!attribute default_invoice_memo + # Determines the default memo on this subscriptions' invoices. Note that if this + # is not provided, it is determined by the plan configuration. + # + # @return [String, nil] + required :default_invoice_memo, String, nil?: true + + # @!attribute discount_intervals + # The discount intervals for this subscription. + # + # @return [Array] + required :discount_intervals, + -> { Orb::ArrayOf[union: Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval] } + + # @!attribute end_date + # The date Orb stops billing for this subscription. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute fixed_fee_quantity_schedule + # + # @return [Array] + required :fixed_fee_quantity_schedule, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUpdateTrialResponse::FixedFeeQuantitySchedule] } + + # @!attribute invoicing_threshold + # + # @return [String, nil] + required :invoicing_threshold, String, nil?: true + + # @!attribute maximum_intervals + # The maximum intervals for this subscription. + # + # @return [Array] + required :maximum_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval] } + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::HashOf[String] + + # @!attribute minimum_intervals + # The minimum intervals for this subscription. + # + # @return [Array] + required :minimum_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval] } + + # @!attribute net_terms + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of `0` here represents that the + # invoice is due on issue, whereas a value of `30` represents that the customer + # has a month to pay the invoice. + # + # @return [Integer] + required :net_terms, Integer + + # @!attribute plan + # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + # subscribed to by a customer. Plans define the billing behavior of the + # subscription. You can see more about how to configure prices in the + # [Price resource](/reference/price). + # + # @return [Orb::Models::Plan] + required :plan, -> { Orb::Models::Plan } + + # @!attribute price_intervals + # The price intervals for this subscription. + # + # @return [Array] + required :price_intervals, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval] } + + # @!attribute redeemed_coupon + # + # @return [Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon, nil] + required :redeemed_coupon, -> { Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon }, nil?: true + + # @!attribute start_date + # The date Orb starts billing for this subscription. + # + # @return [Time] + required :start_date, Time + + # @!attribute status + # + # @return [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::Status] + required :status, enum: -> { Orb::Models::SubscriptionUpdateTrialResponse::Status } + + # @!attribute trial_info + # + # @return [Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo] + required :trial_info, -> { Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo } + + # @!parse + # # @param id [String] + # # @param active_plan_phase_order [Integer, nil] + # # @param adjustment_intervals [Array] + # # @param auto_collection [Boolean, nil] + # # @param billing_cycle_anchor_configuration [Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration] + # # @param billing_cycle_day [Integer] + # # @param created_at [Time] + # # @param current_billing_period_end_date [Time, nil] + # # @param current_billing_period_start_date [Time, nil] + # # @param customer [Orb::Models::Customer] + # # @param default_invoice_memo [String, nil] + # # @param discount_intervals [Array] + # # @param end_date [Time, nil] + # # @param fixed_fee_quantity_schedule [Array] + # # @param invoicing_threshold [String, nil] + # # @param maximum_intervals [Array] + # # @param metadata [Hash{Symbol=>String}] + # # @param minimum_intervals [Array] + # # @param net_terms [Integer] + # # @param plan [Orb::Models::Plan] + # # @param price_intervals [Array] + # # @param redeemed_coupon [Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon, nil] + # # @param start_date [Time] + # # @param status [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::Status] + # # @param trial_info [Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo] + # # + # def initialize( + # id:, + # active_plan_phase_order:, + # adjustment_intervals:, + # auto_collection:, + # billing_cycle_anchor_configuration:, + # billing_cycle_day:, + # created_at:, + # current_billing_period_end_date:, + # current_billing_period_start_date:, + # customer:, + # default_invoice_memo:, + # discount_intervals:, + # end_date:, + # fixed_fee_quantity_schedule:, + # invoicing_threshold:, + # maximum_intervals:, + # metadata:, + # minimum_intervals:, + # net_terms:, + # plan:, + # price_intervals:, + # redeemed_coupon:, + # start_date:, + # status:, + # trial_info:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class AdjustmentInterval < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment + # + # @return [Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] + required :adjustment, + union: -> { Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment } + + # @!attribute applies_to_price_interval_ids + # The price interval IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the adjustment interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the adjustment interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param id [String] + # # @param adjustment [Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # + # def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + + # @abstract + # + # @example + # ```ruby + # case adjustment + # in { + # adjustment_type: "usage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment ... + # in { + # adjustment_type: "amount_discount", + # id: String, + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment ... + # in { + # adjustment_type: "percentage_discount", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment ... + # in { + # adjustment_type: "minimum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment ... + # in { + # adjustment_type: "maximum", + # id: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # is_invoice_level: Orb::BooleanModel + # } + # # Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment ... + # end + # ``` + # + # @example + # ```ruby + # case adjustment + # in Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment + # # ... + # in Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment + # # ... + # in Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + # # ... + # end + # ``` + class Adjustment < Orb::Union + discriminator :adjustment_type + + variant :usage_discount, + -> { Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment } + + variant :amount_discount, + -> { Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment } + + variant :percentage_discount, + -> { Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment } + + variant :minimum, + -> { Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment } + + variant :maximum, + -> { Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :usage_discount] + required :adjustment_type, const: :usage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!attribute usage_discount + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param usage_discount [Float] + # # @param adjustment_type [Symbol, :usage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # usage_discount:, + # adjustment_type: :usage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :amount_discount] + required :adjustment_type, const: :amount_discount + + # @!attribute amount_discount + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :amount_discount] + # # + # def initialize( + # id:, + # amount_discount:, + # applies_to_price_ids:, + # is_invoice_level:, + # plan_phase_order:, + # reason:, + # adjustment_type: :amount_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :percentage_discount] + required :adjustment_type, const: :percentage_discount + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute percentage_discount + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param percentage_discount [Float] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :percentage_discount] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # percentage_discount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :percentage_discount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :minimum] + required :adjustment_type, const: :minimum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute item_id + # The item ID that revenue from this minimum will be attributed to. + # + # @return [String] + required :item_id, String + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param item_id [String] + # # @param minimum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :minimum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # item_id:, + # minimum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :minimum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute adjustment_type + # + # @return [Symbol, :maximum] + required :adjustment_type, const: :maximum + + # @!attribute applies_to_price_ids + # The price IDs that this adjustment applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute is_invoice_level + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. + # + # @return [Boolean] + required :is_invoice_level, Orb::BooleanModel + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute plan_phase_order + # The plan phase in which this adjustment is active. + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute reason + # The reason for the adjustment. + # + # @return [String, nil] + required :reason, String, nil?: true + + # @!parse + # # @param id [String] + # # @param applies_to_price_ids [Array] + # # @param is_invoice_level [Boolean] + # # @param maximum_amount [String] + # # @param plan_phase_order [Integer, nil] + # # @param reason [String, nil] + # # @param adjustment_type [Symbol, :maximum] + # # + # def initialize( + # id:, + # applies_to_price_ids:, + # is_invoice_level:, + # maximum_amount:, + # plan_phase_order:, + # reason:, + # adjustment_type: :maximum, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + # @!attribute day + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. + # + # @return [Integer] + required :day, Integer + + # @!attribute month + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). + # + # @return [Integer, nil] + optional :month, Integer, nil?: true + + # @!attribute year + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). + # + # @return [Integer, nil] + optional :year, Integer, nil?: true + + # @!parse + # # @param day [Integer] + # # @param month [Integer, nil] + # # @param year [Integer, nil] + # # + # def initialize(day:, month: nil, year: nil, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case discount_interval + # in { + # discount_type: "amount", + # amount_discount: String, + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]) + # } + # # Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::AmountDiscountInterval ... + # in { + # discount_type: "percentage", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), + # end_date: Time + # } + # # Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::PercentageDiscountInterval ... + # in { + # discount_type: "usage", + # applies_to_price_ids: ^(Orb::ArrayOf[String]), + # applies_to_price_interval_ids: ^(Orb::ArrayOf[String]), + # end_date: Time + # } + # # Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::UsageDiscountInterval ... + # end + # ``` + # + # @example + # ```ruby + # case discount_interval + # in Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::AmountDiscountInterval + # # ... + # in Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::PercentageDiscountInterval + # # ... + # in Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::UsageDiscountInterval + # # ... + # end + # ``` + class DiscountInterval < Orb::Union + discriminator :discount_type + + variant :amount, + -> { Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::AmountDiscountInterval } + + variant :percentage, + -> { Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::PercentageDiscountInterval } + + variant :usage, + -> { Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::UsageDiscountInterval } + + class AmountDiscountInterval < Orb::BaseModel + # @!attribute amount_discount + # Only available if discount_type is `amount`. + # + # @return [String] + required :amount_discount, String + + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :amount] + required :discount_type, const: :amount + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param amount_discount [String] + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # @param discount_type [Symbol, :amount] + # # + # def initialize( + # amount_discount:, + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # start_date:, + # discount_type: :amount, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PercentageDiscountInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :percentage] + required :discount_type, const: :percentage + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute percentage_discount + # Only available if discount_type is `percentage`.This is a number between 0 + # and 1. + # + # @return [Float] + required :percentage_discount, Float + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param percentage_discount [Float] + # # @param start_date [Time] + # # @param discount_type [Symbol, :percentage] + # # + # def initialize( + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # percentage_discount:, + # start_date:, + # discount_type: :percentage, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class UsageDiscountInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this discount interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute discount_type + # + # @return [Symbol, :usage] + required :discount_type, const: :usage + + # @!attribute end_date + # The end date of the discount interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # The start date of the discount interval. + # + # @return [Time] + required :start_date, Time + + # @!attribute usage_discount + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for + # + # @return [Float] + required :usage_discount, Float + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # @param usage_discount [Float] + # # @param discount_type [Symbol, :usage] + # # + # def initialize( + # applies_to_price_ids:, + # applies_to_price_interval_ids:, + # end_date:, + # start_date:, + # usage_discount:, + # discount_type: :usage, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class FixedFeeQuantitySchedule < Orb::BaseModel + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute price_id + # + # @return [String] + required :price_id, String + + # @!attribute quantity + # + # @return [Float] + required :quantity, Float + + # @!attribute start_date + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param end_date [Time, nil] + # # @param price_id [String] + # # @param quantity [Float] + # # @param start_date [Time] + # # + # def initialize(end_date:, price_id:, quantity:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MaximumInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this maximum interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this maximum interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the maximum interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute maximum_amount + # The maximum amount to charge in a given billing period for the price intervals + # this transform applies to. + # + # @return [String] + required :maximum_amount, String + + # @!attribute start_date + # The start date of the maximum interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param maximum_amount [String] + # # @param start_date [Time] + # # + # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, maximum_amount:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class MinimumInterval < Orb::BaseModel + # @!attribute applies_to_price_ids + # The price ids that this minimum interval applies to. + # + # @return [Array] + required :applies_to_price_ids, Orb::ArrayOf[String] + + # @!attribute applies_to_price_interval_ids + # The price interval ids that this minimum interval applies to. + # + # @return [Array] + required :applies_to_price_interval_ids, Orb::ArrayOf[String] + + # @!attribute end_date + # The end date of the minimum interval. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute minimum_amount + # The minimum amount to charge in a given billing period for the price intervals + # this minimum applies to. + # + # @return [String] + required :minimum_amount, String + + # @!attribute start_date + # The start date of the minimum interval. + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param applies_to_price_ids [Array] + # # @param applies_to_price_interval_ids [Array] + # # @param end_date [Time, nil] + # # @param minimum_amount [String] + # # @param start_date [Time] + # # + # def initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, minimum_amount:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class PriceInterval < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute billing_cycle_day + # The day of the month that Orb bills for this price + # + # @return [Integer] + required :billing_cycle_day, Integer + + # @!attribute current_billing_period_end_date + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is exactly the end of the billing period. Set to null if + # this price interval is not currently active. + # + # @return [Time, nil] + required :current_billing_period_end_date, Time, nil?: true + + # @!attribute current_billing_period_start_date + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if this price interval is not currently active. + # + # @return [Time, nil] + required :current_billing_period_start_date, Time, nil?: true + + # @!attribute end_date + # The end date of the price interval. This is the date that Orb stops billing for + # this price. + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute filter + # An additional filter to apply to usage queries. + # + # @return [String, nil] + required :filter, String, nil?: true + + # @!attribute fixed_fee_quantity_transitions + # The fixed fee quantity transitions for this price interval. This is only + # relevant for fixed fees. + # + # @return [Array, nil] + required :fixed_fee_quantity_transitions, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition] }, + nil?: true + + # @!attribute price + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) + # + # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + required :price, union: -> { Orb::Models::Price } + + # @!attribute start_date + # The start date of the price interval. This is the date that Orb starts billing + # for this price. + # + # @return [Time] + required :start_date, Time + + # @!attribute usage_customer_ids + # A list of customer IDs whose usage events will be aggregated and billed under + # this price interval. + # + # @return [Array, nil] + required :usage_customer_ids, Orb::ArrayOf[String], nil?: true + + # @!parse + # # The Price Interval resource represents a period of time for which a price will + # # bill on a subscription. A subscription’s price intervals define its billing + # # behavior. + # # + # # @param id [String] + # # @param billing_cycle_day [Integer] + # # @param current_billing_period_end_date [Time, nil] + # # @param current_billing_period_start_date [Time, nil] + # # @param end_date [Time, nil] + # # @param filter [String, nil] + # # @param fixed_fee_quantity_transitions [Array, nil] + # # @param price [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] + # # @param start_date [Time] + # # @param usage_customer_ids [Array, nil] + # # + # def initialize( + # id:, + # billing_cycle_day:, + # current_billing_period_end_date:, + # current_billing_period_start_date:, + # end_date:, + # filter:, + # fixed_fee_quantity_transitions:, + # price:, + # start_date:, + # usage_customer_ids:, + # ** + # ) + # super + # end + + # def initialize: (Hash | Orb::BaseModel) -> void + + class FixedFeeQuantityTransition < Orb::BaseModel + # @!attribute effective_date + # + # @return [Time] + required :effective_date, Time + + # @!attribute price_id + # + # @return [String] + required :price_id, String + + # @!attribute quantity + # + # @return [Integer] + required :quantity, Integer + + # @!parse + # # @param effective_date [Time] + # # @param price_id [String] + # # @param quantity [Integer] + # # + # def initialize(effective_date:, price_id:, quantity:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + + class RedeemedCoupon < Orb::BaseModel + # @!attribute coupon_id + # + # @return [String] + required :coupon_id, String + + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!attribute start_date + # + # @return [Time] + required :start_date, Time + + # @!parse + # # @param coupon_id [String] + # # @param end_date [Time, nil] + # # @param start_date [Time] + # # + # def initialize(coupon_id:, end_date:, start_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + # @abstract + # + # @example + # ```ruby + # case status + # in :active + # # ... + # in :ended + # # ... + # in :upcoming + # # ... + # end + # ``` + class Status < Orb::Enum + ACTIVE = :active + ENDED = :ended + UPCOMING = :upcoming + + finalize! + + # @!parse + # # @return [Array] + # # + # def self.values; end + end + + class TrialInfo < Orb::BaseModel + # @!attribute end_date + # + # @return [Time, nil] + required :end_date, Time, nil?: true + + # @!parse + # # @param end_date [Time, nil] + # # + # def initialize(end_date:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + end + end +end diff --git a/lib/orb/models/subscription_usage.rb b/lib/orb/models/subscription_usage.rb index 2395bde5..9c8fcc00 100644 --- a/lib/orb/models/subscription_usage.rb +++ b/lib/orb/models/subscription_usage.rb @@ -34,13 +34,15 @@ class UngroupedSubscriptionUsage < Orb::BaseModel class Data < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricSimpleModel] - required :billable_metric, -> { Orb::Models::BillableMetricSimpleModel } + # @return [Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::BillableMetric] + required :billable_metric, + -> { Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::BillableMetric } # @!attribute usage # - # @return [Array] - required :usage, -> { Orb::ArrayOf[Orb::Models::UsageModel] } + # @return [Array] + required :usage, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::Usage] } # @!attribute view_mode # @@ -49,14 +51,60 @@ class Data < Orb::BaseModel enum: -> { Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::ViewMode } # @!parse - # # @param billable_metric [Orb::Models::BillableMetricSimpleModel] - # # @param usage [Array] + # # @param billable_metric [Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::BillableMetric] + # # @param usage [Array] # # @param view_mode [Symbol, Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::ViewMode] # # # def initialize(billable_metric:, usage:, view_mode:, **) = super # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + + class Usage < Orb::BaseModel + # @!attribute quantity + # + # @return [Float] + required :quantity, Float + + # @!attribute timeframe_end + # + # @return [Time] + required :timeframe_end, Time + + # @!attribute timeframe_start + # + # @return [Time] + required :timeframe_start, Time + + # @!parse + # # @param quantity [Float] + # # @param timeframe_end [Time] + # # @param timeframe_start [Time] + # # + # def initialize(quantity:, timeframe_end:, timeframe_start:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example @@ -104,8 +152,9 @@ class GroupedSubscriptionUsage < Orb::BaseModel class Data < Orb::BaseModel # @!attribute billable_metric # - # @return [Orb::Models::BillableMetricSimpleModel] - required :billable_metric, -> { Orb::Models::BillableMetricSimpleModel } + # @return [Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::BillableMetric] + required :billable_metric, + -> { Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::BillableMetric } # @!attribute metric_group # @@ -114,8 +163,9 @@ class Data < Orb::BaseModel # @!attribute usage # - # @return [Array] - required :usage, -> { Orb::ArrayOf[Orb::Models::UsageModel] } + # @return [Array] + required :usage, + -> { Orb::ArrayOf[Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::Usage] } # @!attribute view_mode # @@ -123,15 +173,35 @@ class Data < Orb::BaseModel required :view_mode, enum: -> { Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::ViewMode } # @!parse - # # @param billable_metric [Orb::Models::BillableMetricSimpleModel] + # # @param billable_metric [Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::BillableMetric] # # @param metric_group [Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::MetricGroup] - # # @param usage [Array] + # # @param usage [Array] # # @param view_mode [Symbol, Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::ViewMode] # # # def initialize(billable_metric:, metric_group:, usage:, view_mode:, **) = super # def initialize: (Hash | Orb::BaseModel) -> void + class BillableMetric < Orb::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!parse + # # @param id [String] + # # @param name [String] + # # + # def initialize(id:, name:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + class MetricGroup < Orb::BaseModel # @!attribute property_key # @@ -152,6 +222,32 @@ class MetricGroup < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + class Usage < Orb::BaseModel + # @!attribute quantity + # + # @return [Float] + required :quantity, Float + + # @!attribute timeframe_end + # + # @return [Time] + required :timeframe_end, Time + + # @!attribute timeframe_start + # + # @return [Time] + required :timeframe_start, Time + + # @!parse + # # @param quantity [Float] + # # @param timeframe_end [Time] + # # @param timeframe_start [Time] + # # + # def initialize(quantity:, timeframe_end:, timeframe_start:, **) = super + + # def initialize: (Hash | Orb::BaseModel) -> void + end + # @abstract # # @example diff --git a/lib/orb/models/subscriptions.rb b/lib/orb/models/subscriptions.rb index 9af59838..e6957180 100644 --- a/lib/orb/models/subscriptions.rb +++ b/lib/orb/models/subscriptions.rb @@ -5,8 +5,8 @@ module Models class SubscriptionsAPI < Orb::BaseModel # @!attribute data # - # @return [Array] - required :data, -> { Orb::ArrayOf[Orb::Models::SubscriptionModel] } + # @return [Array] + required :data, -> { Orb::ArrayOf[Orb::Models::Subscription] } # @!attribute pagination_metadata # @@ -14,7 +14,7 @@ class SubscriptionsAPI < Orb::BaseModel required :pagination_metadata, -> { Orb::Models::PaginationMetadata } # @!parse - # # @param data [Array] + # # @param data [Array] # # @param pagination_metadata [Orb::Models::PaginationMetadata] # # # def initialize(data:, pagination_metadata:, **) = super diff --git a/lib/orb/models/subscriptions_model.rb b/lib/orb/models/subscriptions_model.rb deleted file mode 100644 index 768ddc38..00000000 --- a/lib/orb/models/subscriptions_model.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class SubscriptionsModel < Orb::BaseModel - # @!attribute data - # - # @return [Array] - required :data, -> { Orb::ArrayOf[Orb::Models::SubscriptionModel] } - - # @!attribute pagination_metadata - # - # @return [Orb::Models::PaginationMetadata] - required :pagination_metadata, -> { Orb::Models::PaginationMetadata } - - # @!parse - # # @param data [Array] - # # @param pagination_metadata [Orb::Models::PaginationMetadata] - # # - # def initialize(data:, pagination_metadata:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/tax_amount_model.rb b/lib/orb/models/tax_amount_model.rb deleted file mode 100644 index 28fabc4a..00000000 --- a/lib/orb/models/tax_amount_model.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class TaxAmountModel < Orb::BaseModel - # @!attribute amount - # The amount of additional tax incurred by this tax rate. - # - # @return [String] - required :amount, String - - # @!attribute tax_rate_description - # The human-readable description of the applied tax rate. - # - # @return [String] - required :tax_rate_description, String - - # @!attribute tax_rate_percentage - # The tax rate percentage, out of 100. - # - # @return [String, nil] - required :tax_rate_percentage, String, nil?: true - - # @!parse - # # @param amount [String] - # # @param tax_rate_description [String] - # # @param tax_rate_percentage [String, nil] - # # - # def initialize(amount:, tax_rate_description:, tax_rate_percentage:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/threshold_model.rb b/lib/orb/models/threshold_model.rb deleted file mode 100644 index 77e86cf1..00000000 --- a/lib/orb/models/threshold_model.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class ThresholdModel < Orb::BaseModel - # @!attribute value - # The value at which an alert will fire. For credit balance alerts, the alert will - # fire at or below this value. For usage and cost alerts, the alert will fire at - # or above this value. - # - # @return [Float] - required :value, Float - - # @!parse - # # Thresholds are used to define the conditions under which an alert will be - # # triggered. - # # - # # @param value [Float] - # # - # def initialize(value:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/tiered_bps_config_model.rb b/lib/orb/models/tiered_bps_config_model.rb deleted file mode 100644 index 9e04bec1..00000000 --- a/lib/orb/models/tiered_bps_config_model.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class TieredBpsConfigModel < Orb::BaseModel - # @!attribute tiers - # Tiers for a Graduated BPS pricing model, where usage is bucketed into specified - # tiers - # - # @return [Array] - required :tiers, -> { Orb::ArrayOf[Orb::Models::TieredBpsConfigModel::Tier] } - - # @!parse - # # @param tiers [Array] - # # - # def initialize(tiers:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - class Tier < Orb::BaseModel - # @!attribute bps - # Per-event basis point rate - # - # @return [Float] - required :bps, Float - - # @!attribute minimum_amount - # Inclusive tier starting value - # - # @return [String] - required :minimum_amount, String - - # @!attribute maximum_amount - # Exclusive tier ending value - # - # @return [String, nil] - optional :maximum_amount, String, nil?: true - - # @!attribute per_unit_maximum - # Per unit maximum to charge - # - # @return [String, nil] - optional :per_unit_maximum, String, nil?: true - - # @!parse - # # @param bps [Float] - # # @param minimum_amount [String] - # # @param maximum_amount [String, nil] - # # @param per_unit_maximum [String, nil] - # # - # def initialize(bps:, minimum_amount:, maximum_amount: nil, per_unit_maximum: nil, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end - end -end diff --git a/lib/orb/models/tiered_config_model.rb b/lib/orb/models/tiered_config_model.rb deleted file mode 100644 index 5218b60a..00000000 --- a/lib/orb/models/tiered_config_model.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class TieredConfigModel < Orb::BaseModel - # @!attribute tiers - # Tiers for rating based on total usage quantities into the specified tier - # - # @return [Array] - required :tiers, -> { Orb::ArrayOf[Orb::Models::TieredConfigModel::Tier] } - - # @!parse - # # @param tiers [Array] - # # - # def initialize(tiers:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - - class Tier < Orb::BaseModel - # @!attribute first_unit - # Inclusive tier starting value - # - # @return [Float] - required :first_unit, Float - - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute last_unit - # Exclusive tier ending value. If null, this is treated as the last tier - # - # @return [Float, nil] - optional :last_unit, Float, nil?: true - - # @!parse - # # @param first_unit [Float] - # # @param unit_amount [String] - # # @param last_unit [Float, nil] - # # - # def initialize(first_unit:, unit_amount:, last_unit: nil, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end - end -end diff --git a/lib/orb/models/top_up_model.rb b/lib/orb/models/top_up_model.rb deleted file mode 100644 index 5818be2d..00000000 --- a/lib/orb/models/top_up_model.rb +++ /dev/null @@ -1,154 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class TopUpModel < Orb::BaseModel - # @!attribute id - # - # @return [String] - required :id, String - - # @!attribute amount - # The amount to increment when the threshold is reached. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency or custom pricing unit to use for this top-up. If this is a - # real-world currency, it must match the customer's invoicing currency. - # - # @return [String] - required :currency, String - - # @!attribute invoice_settings - # Settings for invoices generated by triggered top-ups. - # - # @return [Orb::Models::TopUpModel::InvoiceSettings] - required :invoice_settings, -> { Orb::Models::TopUpModel::InvoiceSettings } - - # @!attribute per_unit_cost_basis - # How much, in the customer's currency, to charge for each unit. - # - # @return [String] - required :per_unit_cost_basis, String - - # @!attribute threshold - # The threshold at which to trigger the top-up. If the balance is at or below this - # threshold, the top-up will be triggered. - # - # @return [String] - required :threshold, String - - # @!attribute expires_after - # The number of days or months after which the top-up expires. If unspecified, it - # does not expire. - # - # @return [Integer, nil] - optional :expires_after, Integer, nil?: true - - # @!attribute expires_after_unit - # The unit of expires_after. - # - # @return [Symbol, Orb::Models::TopUpModel::ExpiresAfterUnit, nil] - optional :expires_after_unit, enum: -> { Orb::Models::TopUpModel::ExpiresAfterUnit }, nil?: true - - # @!parse - # # @param id [String] - # # @param amount [String] - # # @param currency [String] - # # @param invoice_settings [Orb::Models::TopUpModel::InvoiceSettings] - # # @param per_unit_cost_basis [String] - # # @param threshold [String] - # # @param expires_after [Integer, nil] - # # @param expires_after_unit [Symbol, Orb::Models::TopUpModel::ExpiresAfterUnit, nil] - # # - # def initialize( - # id:, - # amount:, - # currency:, - # invoice_settings:, - # per_unit_cost_basis:, - # threshold:, - # expires_after: nil, - # expires_after_unit: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - class InvoiceSettings < Orb::BaseModel - # @!attribute auto_collection - # Whether the credits purchase invoice should auto collect with the customer's - # saved payment method. - # - # @return [Boolean] - required :auto_collection, Orb::BooleanModel - - # @!attribute net_terms - # The net terms determines the difference between the invoice date and the issue - # date for the invoice. If you intend the invoice to be due on issue, set this - # to 0. - # - # @return [Integer] - required :net_terms, Integer - - # @!attribute memo - # An optional memo to display on the invoice. - # - # @return [String, nil] - optional :memo, String, nil?: true - - # @!attribute [r] require_successful_payment - # If true, new credit blocks created by this top-up will require that the - # corresponding invoice is paid before they can be drawn down from. - # - # @return [Boolean, nil] - optional :require_successful_payment, Orb::BooleanModel - - # @!parse - # # @return [Boolean] - # attr_writer :require_successful_payment - - # @!parse - # # Settings for invoices generated by triggered top-ups. - # # - # # @param auto_collection [Boolean] - # # @param net_terms [Integer] - # # @param memo [String, nil] - # # @param require_successful_payment [Boolean] - # # - # def initialize(auto_collection:, net_terms:, memo: nil, require_successful_payment: nil, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - - # @abstract - # - # The unit of expires_after. - # - # @example - # ```ruby - # case expires_after_unit - # in :day - # # ... - # in :month - # # ... - # end - # ``` - class ExpiresAfterUnit < Orb::Enum - DAY = :day - MONTH = :month - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end -end diff --git a/lib/orb/models/top_ups_model.rb b/lib/orb/models/top_ups_model.rb deleted file mode 100644 index 94c4b6ee..00000000 --- a/lib/orb/models/top_ups_model.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class TopUpsModel < Orb::BaseModel - # @!attribute data - # - # @return [Array] - required :data, -> { Orb::ArrayOf[Orb::Models::TopUpModel] } - - # @!attribute pagination_metadata - # - # @return [Orb::Models::PaginationMetadata] - required :pagination_metadata, -> { Orb::Models::PaginationMetadata } - - # @!parse - # # @param data [Array] - # # @param pagination_metadata [Orb::Models::PaginationMetadata] - # # - # def initialize(data:, pagination_metadata:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/trial_discount_model.rb b/lib/orb/models/trial_discount_model.rb deleted file mode 100644 index 6fe928c9..00000000 --- a/lib/orb/models/trial_discount_model.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class TrialDiscountModel < Orb::BaseModel - # @!attribute applies_to_price_ids - # List of price_ids that this discount applies to. For plan/plan phase discounts, - # this can be a subset of prices. - # - # @return [Array] - required :applies_to_price_ids, Orb::ArrayOf[String] - - # @!attribute discount_type - # - # @return [Symbol, Orb::Models::TrialDiscountModel::DiscountType] - required :discount_type, enum: -> { Orb::Models::TrialDiscountModel::DiscountType } - - # @!attribute reason - # - # @return [String, nil] - optional :reason, String, nil?: true - - # @!attribute trial_amount_discount - # Only available if discount_type is `trial` - # - # @return [String, nil] - optional :trial_amount_discount, String, nil?: true - - # @!attribute trial_percentage_discount - # Only available if discount_type is `trial` - # - # @return [Float, nil] - optional :trial_percentage_discount, Float, nil?: true - - # @!parse - # # @param applies_to_price_ids [Array] - # # @param discount_type [Symbol, Orb::Models::TrialDiscountModel::DiscountType] - # # @param reason [String, nil] - # # @param trial_amount_discount [String, nil] - # # @param trial_percentage_discount [Float, nil] - # # - # def initialize( - # applies_to_price_ids:, - # discount_type:, - # reason: nil, - # trial_amount_discount: nil, - # trial_percentage_discount: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case discount_type - # in :trial - # # ... - # end - # ``` - class DiscountType < Orb::Enum - TRIAL = :trial - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end -end diff --git a/lib/orb/models/unit_config_model.rb b/lib/orb/models/unit_config_model.rb deleted file mode 100644 index 0b268f54..00000000 --- a/lib/orb/models/unit_config_model.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class UnitConfigModel < Orb::BaseModel - # @!attribute unit_amount - # Rate per unit of usage - # - # @return [String] - required :unit_amount, String - - # @!parse - # # @param unit_amount [String] - # # - # def initialize(unit_amount:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/models/usage_discount_interval_model.rb b/lib/orb/models/usage_discount_interval_model.rb deleted file mode 100644 index 81cdfb8f..00000000 --- a/lib/orb/models/usage_discount_interval_model.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class UsageDiscountIntervalModel < Orb::BaseModel - # @!attribute applies_to_price_ids - # The price ids that this discount interval applies to. - # - # @return [Array] - required :applies_to_price_ids, Orb::ArrayOf[String] - - # @!attribute applies_to_price_interval_ids - # The price interval ids that this discount interval applies to. - # - # @return [Array] - required :applies_to_price_interval_ids, Orb::ArrayOf[String] - - # @!attribute discount_type - # - # @return [Symbol, Orb::Models::UsageDiscountIntervalModel::DiscountType] - required :discount_type, enum: -> { Orb::Models::UsageDiscountIntervalModel::DiscountType } - - # @!attribute end_date - # The end date of the discount interval. - # - # @return [Time, nil] - required :end_date, Time, nil?: true - - # @!attribute start_date - # The start date of the discount interval. - # - # @return [Time] - required :start_date, Time - - # @!attribute usage_discount - # Only available if discount_type is `usage`. Number of usage units that this - # discount is for - # - # @return [Float] - required :usage_discount, Float - - # @!parse - # # @param applies_to_price_ids [Array] - # # @param applies_to_price_interval_ids [Array] - # # @param discount_type [Symbol, Orb::Models::UsageDiscountIntervalModel::DiscountType] - # # @param end_date [Time, nil] - # # @param start_date [Time] - # # @param usage_discount [Float] - # # - # def initialize( - # applies_to_price_ids:, - # applies_to_price_interval_ids:, - # discount_type:, - # end_date:, - # start_date:, - # usage_discount:, - # ** - # ) - # super - # end - - # def initialize: (Hash | Orb::BaseModel) -> void - - # @abstract - # - # @example - # ```ruby - # case discount_type - # in :usage - # # ... - # end - # ``` - class DiscountType < Orb::Enum - USAGE = :usage - - finalize! - - # @!parse - # # @return [Array] - # # - # def self.values; end - end - end - end -end diff --git a/lib/orb/models/usage_model.rb b/lib/orb/models/usage_model.rb deleted file mode 100644 index 84c6acb3..00000000 --- a/lib/orb/models/usage_model.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -module Orb - module Models - class UsageModel < Orb::BaseModel - # @!attribute quantity - # - # @return [Float] - required :quantity, Float - - # @!attribute timeframe_end - # - # @return [Time] - required :timeframe_end, Time - - # @!attribute timeframe_start - # - # @return [Time] - required :timeframe_start, Time - - # @!parse - # # @param quantity [Float] - # # @param timeframe_end [Time] - # # @param timeframe_start [Time] - # # - # def initialize(quantity:, timeframe_end:, timeframe_start:, **) = super - - # def initialize: (Hash | Orb::BaseModel) -> void - end - end -end diff --git a/lib/orb/resources/alerts.rb b/lib/orb/resources/alerts.rb index 63710c6d..cae0cb54 100644 --- a/lib/orb/resources/alerts.rb +++ b/lib/orb/resources/alerts.rb @@ -11,13 +11,13 @@ class Alerts # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::AlertModel] + # @return [Orb::Models::Alert] # def retrieve(alert_id, params = {}) @client.request( method: :get, path: ["alerts/%0s", alert_id], - model: Orb::Models::AlertModel, + model: Orb::Models::Alert, options: params[:request_options] ) end @@ -28,11 +28,11 @@ def retrieve(alert_id, params = {}) # # @param params [Orb::Models::AlertUpdateParams, Hash{Symbol=>Object}] . # - # @option params [Array] :thresholds The thresholds that define the values at which the alert will be triggered. + # @option params [Array] :thresholds The thresholds that define the values at which the alert will be triggered. # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::AlertModel] + # @return [Orb::Models::Alert] # def update(alert_configuration_id, params) parsed, options = Orb::Models::AlertUpdateParams.dump_request(params) @@ -40,7 +40,7 @@ def update(alert_configuration_id, params) method: :put, path: ["alerts/%0s", alert_configuration_id], body: parsed, - model: Orb::Models::AlertModel, + model: Orb::Models::Alert, options: options ) end @@ -80,7 +80,7 @@ def update(alert_configuration_id, params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Page] + # @return [Orb::Page] # def list(params = {}) parsed, options = Orb::Models::AlertListParams.dump_request(params) @@ -89,7 +89,7 @@ def list(params = {}) path: "alerts", query: parsed, page: Orb::Page, - model: Orb::Models::AlertModel, + model: Orb::Models::Alert, options: options ) end @@ -111,11 +111,11 @@ def list(params = {}) # # @option params [Symbol, Orb::Models::CreateCustomerAlertRequest::Type] :type The type of alert to create. This must be a valid alert type. # - # @option params [Array, nil] :thresholds The thresholds that define the values at which the alert will be triggered. + # @option params [Array, nil] :thresholds The thresholds that define the values at which the alert will be triggered. # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::AlertModel] + # @return [Orb::Models::Alert] # def create_for_customer(customer_id, params) parsed, options = Orb::Models::AlertCreateForCustomerParams.dump_request(params) @@ -123,7 +123,7 @@ def create_for_customer(customer_id, params) method: :post, path: ["alerts/customer_id/%0s", customer_id], body: parsed, - model: Orb::Models::AlertModel, + model: Orb::Models::Alert, options: options ) end @@ -145,11 +145,11 @@ def create_for_customer(customer_id, params) # # @option params [Symbol, Orb::Models::CreateCustomerAlertRequest::Type] :type The type of alert to create. This must be a valid alert type. # - # @option params [Array, nil] :thresholds The thresholds that define the values at which the alert will be triggered. + # @option params [Array, nil] :thresholds The thresholds that define the values at which the alert will be triggered. # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::AlertModel] + # @return [Orb::Models::Alert] # def create_for_external_customer(external_customer_id, params) parsed, options = Orb::Models::AlertCreateForExternalCustomerParams.dump_request(params) @@ -157,7 +157,7 @@ def create_for_external_customer(external_customer_id, params) method: :post, path: ["alerts/external_customer_id/%0s", external_customer_id], body: parsed, - model: Orb::Models::AlertModel, + model: Orb::Models::Alert, options: options ) end @@ -178,7 +178,7 @@ def create_for_external_customer(external_customer_id, params) # # @param params [Orb::Models::AlertCreateForSubscriptionParams, Hash{Symbol=>Object}] . # - # @option params [Array] :thresholds The thresholds that define the values at which the alert will be triggered. + # @option params [Array] :thresholds The thresholds that define the values at which the alert will be triggered. # # @option params [Symbol, Orb::Models::AlertCreateForSubscriptionParams::Type] :type The type of alert to create. This must be a valid alert type. # @@ -186,7 +186,7 @@ def create_for_external_customer(external_customer_id, params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::AlertModel] + # @return [Orb::Models::Alert] # def create_for_subscription(subscription_id, params) parsed, options = Orb::Models::AlertCreateForSubscriptionParams.dump_request(params) @@ -194,7 +194,7 @@ def create_for_subscription(subscription_id, params) method: :post, path: ["alerts/subscription_id/%0s", subscription_id], body: parsed, - model: Orb::Models::AlertModel, + model: Orb::Models::Alert, options: options ) end @@ -211,7 +211,7 @@ def create_for_subscription(subscription_id, params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::AlertModel] + # @return [Orb::Models::Alert] # def disable(alert_configuration_id, params = {}) parsed, options = Orb::Models::AlertDisableParams.dump_request(params) @@ -219,7 +219,7 @@ def disable(alert_configuration_id, params = {}) method: :post, path: ["alerts/%0s/disable", alert_configuration_id], query: parsed, - model: Orb::Models::AlertModel, + model: Orb::Models::Alert, options: options ) end @@ -236,7 +236,7 @@ def disable(alert_configuration_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::AlertModel] + # @return [Orb::Models::Alert] # def enable(alert_configuration_id, params = {}) parsed, options = Orb::Models::AlertEnableParams.dump_request(params) @@ -244,7 +244,7 @@ def enable(alert_configuration_id, params = {}) method: :post, path: ["alerts/%0s/enable", alert_configuration_id], query: parsed, - model: Orb::Models::AlertModel, + model: Orb::Models::Alert, options: options ) end diff --git a/lib/orb/resources/coupons.rb b/lib/orb/resources/coupons.rb index b5abe338..4c686392 100644 --- a/lib/orb/resources/coupons.rb +++ b/lib/orb/resources/coupons.rb @@ -23,7 +23,7 @@ class Coupons # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::CouponModel] + # @return [Orb::Models::Coupon] # def create(params) parsed, options = Orb::Models::CouponCreateParams.dump_request(params) @@ -31,7 +31,7 @@ def create(params) method: :post, path: "coupons", body: parsed, - model: Orb::Models::CouponModel, + model: Orb::Models::Coupon, options: options ) end @@ -57,7 +57,7 @@ def create(params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Page] + # @return [Orb::Page] # def list(params = {}) parsed, options = Orb::Models::CouponListParams.dump_request(params) @@ -66,7 +66,7 @@ def list(params = {}) path: "coupons", query: parsed, page: Orb::Page, - model: Orb::Models::CouponModel, + model: Orb::Models::Coupon, options: options ) end @@ -81,13 +81,13 @@ def list(params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::CouponModel] + # @return [Orb::Models::Coupon] # def archive(coupon_id, params = {}) @client.request( method: :post, path: ["coupons/%0s/archive", coupon_id], - model: Orb::Models::CouponModel, + model: Orb::Models::Coupon, options: params[:request_options] ) end @@ -102,13 +102,13 @@ def archive(coupon_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::CouponModel] + # @return [Orb::Models::Coupon] # def fetch(coupon_id, params = {}) @client.request( method: :get, path: ["coupons/%0s", coupon_id], - model: Orb::Models::CouponModel, + model: Orb::Models::Coupon, options: params[:request_options] ) end diff --git a/lib/orb/resources/coupons/subscriptions.rb b/lib/orb/resources/coupons/subscriptions.rb index 71fc912c..5b043e53 100644 --- a/lib/orb/resources/coupons/subscriptions.rb +++ b/lib/orb/resources/coupons/subscriptions.rb @@ -20,7 +20,7 @@ class Subscriptions # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Page] + # @return [Orb::Page] # def list(coupon_id, params = {}) parsed, options = Orb::Models::Coupons::SubscriptionListParams.dump_request(params) @@ -29,7 +29,7 @@ def list(coupon_id, params = {}) path: ["coupons/%0s/subscriptions", coupon_id], query: parsed, page: Orb::Page, - model: Orb::Models::SubscriptionModel, + model: Orb::Models::Subscription, options: options ) end diff --git a/lib/orb/resources/credit_notes.rb b/lib/orb/resources/credit_notes.rb index fb6291f6..c878be10 100644 --- a/lib/orb/resources/credit_notes.rb +++ b/lib/orb/resources/credit_notes.rb @@ -16,7 +16,7 @@ class CreditNotes # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::CreditNoteModel] + # @return [Orb::Models::CreditNote] # def create(params) parsed, options = Orb::Models::CreditNoteCreateParams.dump_request(params) @@ -24,7 +24,7 @@ def create(params) method: :post, path: "credit_notes", body: parsed, - model: Orb::Models::CreditNoteModel, + model: Orb::Models::CreditNote, options: options ) end @@ -42,7 +42,7 @@ def create(params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Page] + # @return [Orb::Page] # def list(params = {}) parsed, options = Orb::Models::CreditNoteListParams.dump_request(params) @@ -51,7 +51,7 @@ def list(params = {}) path: "credit_notes", query: parsed, page: Orb::Page, - model: Orb::Models::CreditNoteModel, + model: Orb::Models::CreditNote, options: options ) end @@ -65,13 +65,13 @@ def list(params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::CreditNoteModel] + # @return [Orb::Models::CreditNote] # def fetch(credit_note_id, params = {}) @client.request( method: :get, path: ["credit_notes/%0s", credit_note_id], - model: Orb::Models::CreditNoteModel, + model: Orb::Models::CreditNote, options: params[:request_options] ) end diff --git a/lib/orb/resources/customers.rb b/lib/orb/resources/customers.rb index 6ad2e326..7526333d 100644 --- a/lib/orb/resources/customers.rb +++ b/lib/orb/resources/customers.rb @@ -33,7 +33,7 @@ class Customers # # @option params [String] :name The full name of the customer # - # @option params [Orb::Models::NewAccountingSyncConfigurationModel, nil] :accounting_sync_configuration + # @option params [Orb::Models::CustomerCreateParams::AccountingSyncConfiguration, nil] :accounting_sync_configuration # # @option params [Array, nil] :additional_emails Additional email addresses for this customer. If populated, these email # addresses will be CC'd for customer communications. @@ -42,7 +42,7 @@ class Customers # charge a saved payment method, if available. This parameter defaults to `True` # when a payment provider is provided on customer creation. # - # @option params [Orb::Models::AddressInputModel, nil] :billing_address + # @option params [Orb::Models::CustomerCreateParams::BillingAddress, nil] :billing_address # # @option params [String, nil] :currency An ISO 4217 currency string used for the customer's invoices and balance. If not # set at creation time, will be set at subscription creation time. @@ -53,7 +53,7 @@ class Customers # system as an alias for this Customer. Use this field to identify a customer by # an existing identifier in your system. # - # @option params [Orb::Models::CustomerHierarchyConfigModel, nil] :hierarchy The hierarchical relationships for this customer. + # @option params [Orb::Models::CustomerCreateParams::Hierarchy, nil] :hierarchy The hierarchical relationships for this customer. # # @option params [Hash{Symbol=>String, nil}, nil] :metadata User-specified key/value pairs for the resource. Individual keys can be removed # by setting the value to `null`, and the entire metadata mapping can be cleared @@ -66,13 +66,13 @@ class Customers # @option params [String, nil] :payment_provider_id The ID of this customer in an external payments solution, such as Stripe. This # is used for creating charges or invoices in the external system via Orb. # - # @option params [Orb::Models::NewReportingConfigurationModel, nil] :reporting_configuration + # @option params [Orb::Models::CustomerCreateParams::ReportingConfiguration, nil] :reporting_configuration # - # @option params [Orb::Models::AddressInputModel, nil] :shipping_address + # @option params [Orb::Models::CustomerCreateParams::ShippingAddress, nil] :shipping_address # - # @option params [Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration, Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration, nil] :tax_configuration + # @option params [Orb::Models::CustomerCreateParams::TaxConfiguration::NewAvalaraTaxConfiguration, Orb::Models::CustomerCreateParams::TaxConfiguration::NewTaxJarConfiguration, nil] :tax_configuration # - # @option params [Orb::Models::CustomerTaxIDModel, nil] :tax_id Tax IDs are commonly required to be displayed on customer invoices, which are + # @option params [Orb::Models::CustomerCreateParams::TaxID, nil] :tax_id Tax IDs are commonly required to be displayed on customer invoices, which are # added to the headers of invoices. # # ### Supported Tax ID Countries and Types @@ -184,7 +184,7 @@ class Customers # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::CustomerModel] + # @return [Orb::Models::Customer] # def create(params) parsed, options = Orb::Models::CustomerCreateParams.dump_request(params) @@ -192,7 +192,7 @@ def create(params) method: :post, path: "customers", body: parsed, - model: Orb::Models::CustomerModel, + model: Orb::Models::Customer, options: options ) end @@ -207,7 +207,7 @@ def create(params) # # @param params [Orb::Models::CustomerUpdateParams, Hash{Symbol=>Object}] . # - # @option params [Orb::Models::NewAccountingSyncConfigurationModel, nil] :accounting_sync_configuration + # @option params [Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration, nil] :accounting_sync_configuration # # @option params [Array, nil] :additional_emails Additional email addresses for this customer. If populated, these email # addresses will be CC'd for customer communications. @@ -216,7 +216,7 @@ def create(params) # charge a saved payment method, if available. This parameter defaults to `True` # when a payment provider is provided on customer creation. # - # @option params [Orb::Models::AddressInputModel, nil] :billing_address + # @option params [Orb::Models::CustomerUpdateParams::BillingAddress, nil] :billing_address # # @option params [String, nil] :currency An ISO 4217 currency string used for the customer's invoices and balance. If not # set at creation time, will be set at subscription creation time. @@ -228,7 +228,7 @@ def create(params) # @option params [String, nil] :external_customer_id The external customer ID. This can only be set if empty and the customer has no # past or current subscriptions. # - # @option params [Orb::Models::CustomerHierarchyConfigModel, nil] :hierarchy The hierarchical relationships for this customer. + # @option params [Orb::Models::CustomerUpdateParams::Hierarchy, nil] :hierarchy The hierarchical relationships for this customer. # # @option params [Hash{Symbol=>String, nil}, nil] :metadata User-specified key/value pairs for the resource. Individual keys can be removed # by setting the value to `null`, and the entire metadata mapping can be cleared @@ -236,7 +236,7 @@ def create(params) # # @option params [String, nil] :name The full name of the customer # - # @option params [Symbol, Orb::Models::EditCustomerModel::PaymentProvider, nil] :payment_provider This is used for creating charges or invoices in an external system via Orb. + # @option params [Symbol, Orb::Models::CustomerUpdateParams::PaymentProvider, nil] :payment_provider This is used for creating charges or invoices in an external system via Orb. # When not in test mode: # # - the connection must first be configured in the Orb webapp. @@ -247,13 +247,13 @@ def create(params) # @option params [String, nil] :payment_provider_id The ID of this customer in an external payments solution, such as Stripe. This # is used for creating charges or invoices in the external system via Orb. # - # @option params [Orb::Models::NewReportingConfigurationModel, nil] :reporting_configuration + # @option params [Orb::Models::CustomerUpdateParams::ReportingConfiguration, nil] :reporting_configuration # - # @option params [Orb::Models::AddressInputModel, nil] :shipping_address + # @option params [Orb::Models::CustomerUpdateParams::ShippingAddress, nil] :shipping_address # - # @option params [Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration, Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration, nil] :tax_configuration + # @option params [Orb::Models::CustomerUpdateParams::TaxConfiguration::NewAvalaraTaxConfiguration, Orb::Models::CustomerUpdateParams::TaxConfiguration::NewTaxJarConfiguration, nil] :tax_configuration # - # @option params [Orb::Models::CustomerTaxIDModel, nil] :tax_id Tax IDs are commonly required to be displayed on customer invoices, which are + # @option params [Orb::Models::CustomerUpdateParams::TaxID, nil] :tax_id Tax IDs are commonly required to be displayed on customer invoices, which are # added to the headers of invoices. # # ### Supported Tax ID Countries and Types @@ -361,7 +361,7 @@ def create(params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::CustomerModel] + # @return [Orb::Models::Customer] # def update(customer_id, params = {}) parsed, options = Orb::Models::CustomerUpdateParams.dump_request(params) @@ -369,7 +369,7 @@ def update(customer_id, params = {}) method: :put, path: ["customers/%0s", customer_id], body: parsed, - model: Orb::Models::CustomerModel, + model: Orb::Models::Customer, options: options ) end @@ -398,7 +398,7 @@ def update(customer_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Page] + # @return [Orb::Page] # def list(params = {}) parsed, options = Orb::Models::CustomerListParams.dump_request(params) @@ -407,7 +407,7 @@ def list(params = {}) path: "customers", query: parsed, page: Orb::Page, - model: Orb::Models::CustomerModel, + model: Orb::Models::Customer, options: options ) end @@ -458,13 +458,13 @@ def delete(customer_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::CustomerModel] + # @return [Orb::Models::Customer] # def fetch(customer_id, params = {}) @client.request( method: :get, path: ["customers/%0s", customer_id], - model: Orb::Models::CustomerModel, + model: Orb::Models::Customer, options: params[:request_options] ) end @@ -481,13 +481,13 @@ def fetch(customer_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::CustomerModel] + # @return [Orb::Models::Customer] # def fetch_by_external_id(external_customer_id, params = {}) @client.request( method: :get, path: ["customers/external_customer_id/%0s", external_customer_id], - model: Orb::Models::CustomerModel, + model: Orb::Models::Customer, options: params[:request_options] ) end @@ -552,7 +552,7 @@ def sync_payment_methods_from_gateway_by_external_customer_id(customer_id, param # # @param params [Orb::Models::CustomerUpdateByExternalIDParams, Hash{Symbol=>Object}] . # - # @option params [Orb::Models::NewAccountingSyncConfigurationModel, nil] :accounting_sync_configuration + # @option params [Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration, nil] :accounting_sync_configuration # # @option params [Array, nil] :additional_emails Additional email addresses for this customer. If populated, these email # addresses will be CC'd for customer communications. @@ -561,7 +561,7 @@ def sync_payment_methods_from_gateway_by_external_customer_id(customer_id, param # charge a saved payment method, if available. This parameter defaults to `True` # when a payment provider is provided on customer creation. # - # @option params [Orb::Models::AddressInputModel, nil] :billing_address + # @option params [Orb::Models::CustomerUpdateByExternalIDParams::BillingAddress, nil] :billing_address # # @option params [String, nil] :currency An ISO 4217 currency string used for the customer's invoices and balance. If not # set at creation time, will be set at subscription creation time. @@ -573,7 +573,7 @@ def sync_payment_methods_from_gateway_by_external_customer_id(customer_id, param # @option params [String, nil] :external_customer_id The external customer ID. This can only be set if empty and the customer has no # past or current subscriptions. # - # @option params [Orb::Models::CustomerHierarchyConfigModel, nil] :hierarchy The hierarchical relationships for this customer. + # @option params [Orb::Models::CustomerUpdateByExternalIDParams::Hierarchy, nil] :hierarchy The hierarchical relationships for this customer. # # @option params [Hash{Symbol=>String, nil}, nil] :metadata User-specified key/value pairs for the resource. Individual keys can be removed # by setting the value to `null`, and the entire metadata mapping can be cleared @@ -581,7 +581,7 @@ def sync_payment_methods_from_gateway_by_external_customer_id(customer_id, param # # @option params [String, nil] :name The full name of the customer # - # @option params [Symbol, Orb::Models::EditCustomerModel::PaymentProvider, nil] :payment_provider This is used for creating charges or invoices in an external system via Orb. + # @option params [Symbol, Orb::Models::CustomerUpdateByExternalIDParams::PaymentProvider, nil] :payment_provider This is used for creating charges or invoices in an external system via Orb. # When not in test mode: # # - the connection must first be configured in the Orb webapp. @@ -592,13 +592,13 @@ def sync_payment_methods_from_gateway_by_external_customer_id(customer_id, param # @option params [String, nil] :payment_provider_id The ID of this customer in an external payments solution, such as Stripe. This # is used for creating charges or invoices in the external system via Orb. # - # @option params [Orb::Models::NewReportingConfigurationModel, nil] :reporting_configuration + # @option params [Orb::Models::CustomerUpdateByExternalIDParams::ReportingConfiguration, nil] :reporting_configuration # - # @option params [Orb::Models::AddressInputModel, nil] :shipping_address + # @option params [Orb::Models::CustomerUpdateByExternalIDParams::ShippingAddress, nil] :shipping_address # - # @option params [Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration, Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration, nil] :tax_configuration + # @option params [Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewAvalaraTaxConfiguration, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewTaxJarConfiguration, nil] :tax_configuration # - # @option params [Orb::Models::CustomerTaxIDModel, nil] :tax_id Tax IDs are commonly required to be displayed on customer invoices, which are + # @option params [Orb::Models::CustomerUpdateByExternalIDParams::TaxID, nil] :tax_id Tax IDs are commonly required to be displayed on customer invoices, which are # added to the headers of invoices. # # ### Supported Tax ID Countries and Types @@ -706,7 +706,7 @@ def sync_payment_methods_from_gateway_by_external_customer_id(customer_id, param # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::CustomerModel] + # @return [Orb::Models::Customer] # def update_by_external_id(id, params = {}) parsed, options = Orb::Models::CustomerUpdateByExternalIDParams.dump_request(params) @@ -714,7 +714,7 @@ def update_by_external_id(id, params = {}) method: :put, path: ["customers/external_customer_id/%0s", id], body: parsed, - model: Orb::Models::CustomerModel, + model: Orb::Models::Customer, options: options ) end diff --git a/lib/orb/resources/customers/balance_transactions.rb b/lib/orb/resources/customers/balance_transactions.rb index a42bec54..1bd48adf 100644 --- a/lib/orb/resources/customers/balance_transactions.rb +++ b/lib/orb/resources/customers/balance_transactions.rb @@ -19,7 +19,7 @@ class BalanceTransactions # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::CustomerBalanceTransactionModel] + # @return [Orb::Models::Customers::BalanceTransactionCreateResponse] # def create(customer_id, params) parsed, options = Orb::Models::Customers::BalanceTransactionCreateParams.dump_request(params) @@ -27,7 +27,7 @@ def create(customer_id, params) method: :post, path: ["customers/%0s/balance_transactions", customer_id], body: parsed, - model: Orb::Models::CustomerBalanceTransactionModel, + model: Orb::Models::Customers::BalanceTransactionCreateResponse, options: options ) end @@ -80,7 +80,7 @@ def create(customer_id, params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Page] + # @return [Orb::Page] # def list(customer_id, params = {}) parsed, options = Orb::Models::Customers::BalanceTransactionListParams.dump_request(params) @@ -89,7 +89,7 @@ def list(customer_id, params = {}) path: ["customers/%0s/balance_transactions", customer_id], query: parsed, page: Orb::Page, - model: Orb::Models::CustomerBalanceTransactionModel, + model: Orb::Models::Customers::BalanceTransactionListResponse, options: options ) end diff --git a/lib/orb/resources/customers/costs.rb b/lib/orb/resources/customers/costs.rb index bf0a06cb..7ec79799 100644 --- a/lib/orb/resources/customers/costs.rb +++ b/lib/orb/resources/customers/costs.rb @@ -139,7 +139,7 @@ class Costs # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::CustomerCostsModel] + # @return [Orb::Models::Customers::CostListResponse] # def list(customer_id, params = {}) parsed, options = Orb::Models::Customers::CostListParams.dump_request(params) @@ -147,7 +147,7 @@ def list(customer_id, params = {}) method: :get, path: ["customers/%0s/costs", customer_id], query: parsed, - model: Orb::Models::CustomerCostsModel, + model: Orb::Models::Customers::CostListResponse, options: options ) end @@ -287,7 +287,7 @@ def list(customer_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::CustomerCostsModel] + # @return [Orb::Models::Customers::CostListByExternalIDResponse] # def list_by_external_id(external_customer_id, params = {}) parsed, options = Orb::Models::Customers::CostListByExternalIDParams.dump_request(params) @@ -295,7 +295,7 @@ def list_by_external_id(external_customer_id, params = {}) method: :get, path: ["customers/external_customer_id/%0s/costs", external_customer_id], query: parsed, - model: Orb::Models::CustomerCostsModel, + model: Orb::Models::Customers::CostListByExternalIDResponse, options: options ) end diff --git a/lib/orb/resources/customers/credits.rb b/lib/orb/resources/customers/credits.rb index 3624807c..eb84ece4 100644 --- a/lib/orb/resources/customers/credits.rb +++ b/lib/orb/resources/customers/credits.rb @@ -34,7 +34,7 @@ class Credits # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Page] + # @return [Orb::Page] # def list(customer_id, params = {}) parsed, options = Orb::Models::Customers::CreditListParams.dump_request(params) @@ -43,7 +43,7 @@ def list(customer_id, params = {}) path: ["customers/%0s/credits", customer_id], query: parsed, page: Orb::Page, - model: Orb::Models::CustomerCreditBalancesModel::Data, + model: Orb::Models::Customers::CreditListResponse, options: options ) end @@ -72,7 +72,7 @@ def list(customer_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Page] + # @return [Orb::Page] # def list_by_external_id(external_customer_id, params = {}) parsed, options = Orb::Models::Customers::CreditListByExternalIDParams.dump_request(params) @@ -81,7 +81,7 @@ def list_by_external_id(external_customer_id, params = {}) path: ["customers/external_customer_id/%0s/credits", external_customer_id], query: parsed, page: Orb::Page, - model: Orb::Models::CustomerCreditBalancesModel::Data, + model: Orb::Models::Customers::CreditListByExternalIDResponse, options: options ) end diff --git a/lib/orb/resources/customers/credits/ledger.rb b/lib/orb/resources/customers/credits/ledger.rb index 825fd741..054110d3 100644 --- a/lib/orb/resources/customers/credits/ledger.rb +++ b/lib/orb/resources/customers/credits/ledger.rb @@ -114,7 +114,7 @@ class Ledger # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Page] + # @return [Orb::Page] # def list(customer_id, params = {}) parsed, options = Orb::Models::Customers::Credits::LedgerListParams.dump_request(params) @@ -123,7 +123,7 @@ def list(customer_id, params = {}) path: ["customers/%0s/credits/ledger", customer_id], query: parsed, page: Orb::Page, - model: Orb::Models::CreditLedgerEntryModel, + model: Orb::Models::Customers::Credits::LedgerListResponse, options: options ) end @@ -247,7 +247,7 @@ def list(customer_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry, Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry, Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry, Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry, Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry, Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry, Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry] + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry] # def create_entry(customer_id, params) parsed, options = Orb::Models::Customers::Credits::LedgerCreateEntryParams.dump_request(params) @@ -260,7 +260,7 @@ def create_entry(customer_id, params) method: :post, path: ["customers/%0s/credits/ledger_entry", customer_id], body: parsed, - model: Orb::Models::CreditLedgerEntryModel, + model: Orb::Models::Customers::Credits::LedgerCreateEntryResponse, options: options ) end @@ -384,7 +384,7 @@ def create_entry(customer_id, params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry, Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry, Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry, Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry, Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry, Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry, Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry] + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry] # def create_entry_by_external_id(external_customer_id, params) parsed, options = Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams.dump_request(params) @@ -397,7 +397,7 @@ def create_entry_by_external_id(external_customer_id, params) method: :post, path: ["customers/external_customer_id/%0s/credits/ledger_entry", external_customer_id], body: parsed, - model: Orb::Models::CreditLedgerEntryModel, + model: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse, options: options ) end @@ -511,7 +511,7 @@ def create_entry_by_external_id(external_customer_id, params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Page] + # @return [Orb::Page] # def list_by_external_id(external_customer_id, params = {}) parsed, options = Orb::Models::Customers::Credits::LedgerListByExternalIDParams.dump_request(params) @@ -520,7 +520,7 @@ def list_by_external_id(external_customer_id, params = {}) path: ["customers/external_customer_id/%0s/credits/ledger", external_customer_id], query: parsed, page: Orb::Page, - model: Orb::Models::CreditLedgerEntryModel, + model: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse, options: options ) end diff --git a/lib/orb/resources/customers/credits/top_ups.rb b/lib/orb/resources/customers/credits/top_ups.rb index f56d48ae..68183b91 100644 --- a/lib/orb/resources/customers/credits/top_ups.rb +++ b/lib/orb/resources/customers/credits/top_ups.rb @@ -39,7 +39,7 @@ class TopUps # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::TopUpModel] + # @return [Orb::Models::Customers::Credits::TopUpCreateResponse] # def create(customer_id, params) parsed, options = Orb::Models::Customers::Credits::TopUpCreateParams.dump_request(params) @@ -47,7 +47,7 @@ def create(customer_id, params) method: :post, path: ["customers/%0s/credits/top_ups", customer_id], body: parsed, - model: Orb::Models::TopUpModel, + model: Orb::Models::Customers::Credits::TopUpCreateResponse, options: options ) end @@ -65,7 +65,7 @@ def create(customer_id, params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Page] + # @return [Orb::Page] # def list(customer_id, params = {}) parsed, options = Orb::Models::Customers::Credits::TopUpListParams.dump_request(params) @@ -74,7 +74,7 @@ def list(customer_id, params = {}) path: ["customers/%0s/credits/top_ups", customer_id], query: parsed, page: Orb::Page, - model: Orb::Models::TopUpModel, + model: Orb::Models::Customers::Credits::TopUpListResponse, options: options ) end @@ -139,7 +139,7 @@ def delete(top_up_id, params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::TopUpModel] + # @return [Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse] # def create_by_external_id(external_customer_id, params) parsed, options = Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams.dump_request(params) @@ -147,7 +147,7 @@ def create_by_external_id(external_customer_id, params) method: :post, path: ["customers/external_customer_id/%0s/credits/top_ups", external_customer_id], body: parsed, - model: Orb::Models::TopUpModel, + model: Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse, options: options ) end @@ -195,7 +195,7 @@ def delete_by_external_id(top_up_id, params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Page] + # @return [Orb::Page] # def list_by_external_id(external_customer_id, params = {}) parsed, options = Orb::Models::Customers::Credits::TopUpListByExternalIDParams.dump_request(params) @@ -204,7 +204,7 @@ def list_by_external_id(external_customer_id, params = {}) path: ["customers/external_customer_id/%0s/credits/top_ups", external_customer_id], query: parsed, page: Orb::Page, - model: Orb::Models::TopUpModel, + model: Orb::Models::Customers::Credits::TopUpListByExternalIDResponse, options: options ) end diff --git a/lib/orb/resources/dimensional_price_groups.rb b/lib/orb/resources/dimensional_price_groups.rb index dfb5fa22..45589668 100644 --- a/lib/orb/resources/dimensional_price_groups.rb +++ b/lib/orb/resources/dimensional_price_groups.rb @@ -31,7 +31,7 @@ class DimensionalPriceGroups # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::DimensionalPriceGroupModel] + # @return [Orb::Models::DimensionalPriceGroup] # def create(params) parsed, options = Orb::Models::DimensionalPriceGroupCreateParams.dump_request(params) @@ -39,7 +39,7 @@ def create(params) method: :post, path: "dimensional_price_groups", body: parsed, - model: Orb::Models::DimensionalPriceGroupModel, + model: Orb::Models::DimensionalPriceGroup, options: options ) end @@ -52,13 +52,13 @@ def create(params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::DimensionalPriceGroupModel] + # @return [Orb::Models::DimensionalPriceGroup] # def retrieve(dimensional_price_group_id, params = {}) @client.request( method: :get, path: ["dimensional_price_groups/%0s", dimensional_price_group_id], - model: Orb::Models::DimensionalPriceGroupModel, + model: Orb::Models::DimensionalPriceGroup, options: params[:request_options] ) end @@ -74,7 +74,7 @@ def retrieve(dimensional_price_group_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Page] + # @return [Orb::Page] # def list(params = {}) parsed, options = Orb::Models::DimensionalPriceGroupListParams.dump_request(params) @@ -83,7 +83,7 @@ def list(params = {}) path: "dimensional_price_groups", query: parsed, page: Orb::Page, - model: Orb::Models::DimensionalPriceGroupModel, + model: Orb::Models::DimensionalPriceGroup, options: options ) end diff --git a/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rb b/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rb index 81dcecea..ddcab2a5 100644 --- a/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rb +++ b/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rb @@ -12,7 +12,7 @@ class ExternalDimensionalPriceGroupID # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::DimensionalPriceGroupModel] + # @return [Orb::Models::DimensionalPriceGroup] # def retrieve(external_dimensional_price_group_id, params = {}) @client.request( @@ -21,7 +21,7 @@ def retrieve(external_dimensional_price_group_id, params = {}) "dimensional_price_groups/external_dimensional_price_group_id/%0s", external_dimensional_price_group_id ], - model: Orb::Models::DimensionalPriceGroupModel, + model: Orb::Models::DimensionalPriceGroup, options: params[:request_options] ) end diff --git a/lib/orb/resources/events/backfills.rb b/lib/orb/resources/events/backfills.rb index d31582b4..ce699ffa 100644 --- a/lib/orb/resources/events/backfills.rb +++ b/lib/orb/resources/events/backfills.rb @@ -67,7 +67,7 @@ class Backfills # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::BackfillModel] + # @return [Orb::Models::Events::BackfillCreateResponse] # def create(params) parsed, options = Orb::Models::Events::BackfillCreateParams.dump_request(params) @@ -75,7 +75,7 @@ def create(params) method: :post, path: "events/backfills", body: parsed, - model: Orb::Models::BackfillModel, + model: Orb::Models::Events::BackfillCreateResponse, options: options ) end @@ -97,7 +97,7 @@ def create(params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Page] + # @return [Orb::Page] # def list(params = {}) parsed, options = Orb::Models::Events::BackfillListParams.dump_request(params) @@ -106,7 +106,7 @@ def list(params = {}) path: "events/backfills", query: parsed, page: Orb::Page, - model: Orb::Models::BackfillModel, + model: Orb::Models::Events::BackfillListResponse, options: options ) end @@ -122,13 +122,13 @@ def list(params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::BackfillModel] + # @return [Orb::Models::Events::BackfillCloseResponse] # def close(backfill_id, params = {}) @client.request( method: :post, path: ["events/backfills/%0s/close", backfill_id], - model: Orb::Models::BackfillModel, + model: Orb::Models::Events::BackfillCloseResponse, options: params[:request_options] ) end @@ -141,13 +141,13 @@ def close(backfill_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::BackfillModel] + # @return [Orb::Models::Events::BackfillFetchResponse] # def fetch(backfill_id, params = {}) @client.request( method: :get, path: ["events/backfills/%0s", backfill_id], - model: Orb::Models::BackfillModel, + model: Orb::Models::Events::BackfillFetchResponse, options: params[:request_options] ) end @@ -166,13 +166,13 @@ def fetch(backfill_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::BackfillModel] + # @return [Orb::Models::Events::BackfillRevertResponse] # def revert(backfill_id, params = {}) @client.request( method: :post, path: ["events/backfills/%0s/revert", backfill_id], - model: Orb::Models::BackfillModel, + model: Orb::Models::Events::BackfillRevertResponse, options: params[:request_options] ) end diff --git a/lib/orb/resources/invoice_line_items.rb b/lib/orb/resources/invoice_line_items.rb index ebb795f0..d8c41dd9 100644 --- a/lib/orb/resources/invoice_line_items.rb +++ b/lib/orb/resources/invoice_line_items.rb @@ -23,7 +23,7 @@ class InvoiceLineItems # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::InvoiceLineItemModel] + # @return [Orb::Models::InvoiceLineItemCreateResponse] # def create(params) parsed, options = Orb::Models::InvoiceLineItemCreateParams.dump_request(params) @@ -31,7 +31,7 @@ def create(params) method: :post, path: "invoice_line_items", body: parsed, - model: Orb::Models::InvoiceLineItemModel, + model: Orb::Models::InvoiceLineItemCreateResponse, options: options ) end diff --git a/lib/orb/resources/invoices.rb b/lib/orb/resources/invoices.rb index c46f66c0..4608840f 100644 --- a/lib/orb/resources/invoices.rb +++ b/lib/orb/resources/invoices.rb @@ -39,7 +39,7 @@ class Invoices # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::InvoiceModel] + # @return [Orb::Models::Invoice] # def create(params) parsed, options = Orb::Models::InvoiceCreateParams.dump_request(params) @@ -47,7 +47,7 @@ def create(params) method: :post, path: "invoices", body: parsed, - model: Orb::Models::InvoiceModel, + model: Orb::Models::Invoice, options: options ) end @@ -68,7 +68,7 @@ def create(params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::InvoiceModel] + # @return [Orb::Models::Invoice] # def update(invoice_id, params = {}) parsed, options = Orb::Models::InvoiceUpdateParams.dump_request(params) @@ -76,7 +76,7 @@ def update(invoice_id, params = {}) method: :put, path: ["invoices/%0s", invoice_id], body: parsed, - model: Orb::Models::InvoiceModel, + model: Orb::Models::Invoice, options: options ) end @@ -141,7 +141,7 @@ def update(invoice_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Page] + # @return [Orb::Page] # def list(params = {}) parsed, options = Orb::Models::InvoiceListParams.dump_request(params) @@ -150,7 +150,7 @@ def list(params = {}) path: "invoices", query: parsed, page: Orb::Page, - model: Orb::Models::InvoiceModel, + model: Orb::Models::Invoice, options: options ) end @@ -164,13 +164,13 @@ def list(params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::InvoiceModel] + # @return [Orb::Models::Invoice] # def fetch(invoice_id, params = {}) @client.request( method: :get, path: ["invoices/%0s", invoice_id], - model: Orb::Models::InvoiceModel, + model: Orb::Models::Invoice, options: params[:request_options] ) end @@ -217,7 +217,7 @@ def fetch_upcoming(params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::InvoiceModel] + # @return [Orb::Models::Invoice] # def issue(invoice_id, params = {}) parsed, options = Orb::Models::InvoiceIssueParams.dump_request(params) @@ -225,7 +225,7 @@ def issue(invoice_id, params = {}) method: :post, path: ["invoices/%0s/issue", invoice_id], body: parsed, - model: Orb::Models::InvoiceModel, + model: Orb::Models::Invoice, options: options ) end @@ -245,7 +245,7 @@ def issue(invoice_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::InvoiceModel] + # @return [Orb::Models::Invoice] # def mark_paid(invoice_id, params) parsed, options = Orb::Models::InvoiceMarkPaidParams.dump_request(params) @@ -253,7 +253,7 @@ def mark_paid(invoice_id, params) method: :post, path: ["invoices/%0s/mark_paid", invoice_id], body: parsed, - model: Orb::Models::InvoiceModel, + model: Orb::Models::Invoice, options: options ) end @@ -267,13 +267,13 @@ def mark_paid(invoice_id, params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::InvoiceModel] + # @return [Orb::Models::Invoice] # def pay(invoice_id, params = {}) @client.request( method: :post, path: ["invoices/%0s/pay", invoice_id], - model: Orb::Models::InvoiceModel, + model: Orb::Models::Invoice, options: params[:request_options] ) end @@ -296,13 +296,13 @@ def pay(invoice_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::InvoiceModel] + # @return [Orb::Models::Invoice] # def void(invoice_id, params = {}) @client.request( method: :post, path: ["invoices/%0s/void", invoice_id], - model: Orb::Models::InvoiceModel, + model: Orb::Models::Invoice, options: params[:request_options] ) end diff --git a/lib/orb/resources/items.rb b/lib/orb/resources/items.rb index d01f035c..ec8ab50f 100644 --- a/lib/orb/resources/items.rb +++ b/lib/orb/resources/items.rb @@ -11,17 +11,11 @@ class Items # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::ItemModel] + # @return [Orb::Models::Item] # def create(params) parsed, options = Orb::Models::ItemCreateParams.dump_request(params) - @client.request( - method: :post, - path: "items", - body: parsed, - model: Orb::Models::ItemModel, - options: options - ) + @client.request(method: :post, path: "items", body: parsed, model: Orb::Models::Item, options: options) end # This endpoint can be used to update properties on the Item. @@ -30,13 +24,13 @@ def create(params) # # @param params [Orb::Models::ItemUpdateParams, Hash{Symbol=>Object}] . # - # @option params [Array, nil] :external_connections + # @option params [Array, nil] :external_connections # # @option params [String, nil] :name # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::ItemModel] + # @return [Orb::Models::Item] # def update(item_id, params = {}) parsed, options = Orb::Models::ItemUpdateParams.dump_request(params) @@ -44,7 +38,7 @@ def update(item_id, params = {}) method: :put, path: ["items/%0s", item_id], body: parsed, - model: Orb::Models::ItemModel, + model: Orb::Models::Item, options: options ) end @@ -61,7 +55,7 @@ def update(item_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Page] + # @return [Orb::Page] # def list(params = {}) parsed, options = Orb::Models::ItemListParams.dump_request(params) @@ -70,7 +64,7 @@ def list(params = {}) path: "items", query: parsed, page: Orb::Page, - model: Orb::Models::ItemModel, + model: Orb::Models::Item, options: options ) end @@ -83,13 +77,13 @@ def list(params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::ItemModel] + # @return [Orb::Models::Item] # def fetch(item_id, params = {}) @client.request( method: :get, path: ["items/%0s", item_id], - model: Orb::Models::ItemModel, + model: Orb::Models::Item, options: params[:request_options] ) end diff --git a/lib/orb/resources/metrics.rb b/lib/orb/resources/metrics.rb index b33b745e..ca842ad7 100644 --- a/lib/orb/resources/metrics.rb +++ b/lib/orb/resources/metrics.rb @@ -23,7 +23,7 @@ class Metrics # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::BillableMetricModel] + # @return [Orb::Models::BillableMetric] # def create(params) parsed, options = Orb::Models::MetricCreateParams.dump_request(params) @@ -31,7 +31,7 @@ def create(params) method: :post, path: "metrics", body: parsed, - model: Orb::Models::BillableMetricModel, + model: Orb::Models::BillableMetric, options: options ) end @@ -50,7 +50,7 @@ def create(params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::BillableMetricModel] + # @return [Orb::Models::BillableMetric] # def update(metric_id, params = {}) parsed, options = Orb::Models::MetricUpdateParams.dump_request(params) @@ -58,7 +58,7 @@ def update(metric_id, params = {}) method: :put, path: ["metrics/%0s", metric_id], body: parsed, - model: Orb::Models::BillableMetricModel, + model: Orb::Models::BillableMetric, options: options ) end @@ -84,7 +84,7 @@ def update(metric_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Page] + # @return [Orb::Page] # def list(params = {}) parsed, options = Orb::Models::MetricListParams.dump_request(params) @@ -93,7 +93,7 @@ def list(params = {}) path: "metrics", query: parsed, page: Orb::Page, - model: Orb::Models::BillableMetricModel, + model: Orb::Models::BillableMetric, options: options ) end @@ -107,13 +107,13 @@ def list(params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::BillableMetricModel] + # @return [Orb::Models::BillableMetric] # def fetch(metric_id, params = {}) @client.request( method: :get, path: ["metrics/%0s", metric_id], - model: Orb::Models::BillableMetricModel, + model: Orb::Models::BillableMetric, options: params[:request_options] ) end diff --git a/lib/orb/resources/plans.rb b/lib/orb/resources/plans.rb index c313f2b3..bd1b47a1 100644 --- a/lib/orb/resources/plans.rb +++ b/lib/orb/resources/plans.rb @@ -35,17 +35,11 @@ class Plans # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::PlanModel] + # @return [Orb::Models::Plan] # def create(params) parsed, options = Orb::Models::PlanCreateParams.dump_request(params) - @client.request( - method: :post, - path: "plans", - body: parsed, - model: Orb::Models::PlanModel, - options: options - ) + @client.request(method: :post, path: "plans", body: parsed, model: Orb::Models::Plan, options: options) end # This endpoint can be used to update the `external_plan_id`, and `metadata` of an @@ -67,7 +61,7 @@ def create(params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::PlanModel] + # @return [Orb::Models::Plan] # def update(plan_id, params = {}) parsed, options = Orb::Models::PlanUpdateParams.dump_request(params) @@ -75,7 +69,7 @@ def update(plan_id, params = {}) method: :put, path: ["plans/%0s", plan_id], body: parsed, - model: Orb::Models::PlanModel, + model: Orb::Models::Plan, options: options ) end @@ -105,7 +99,7 @@ def update(plan_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Page] + # @return [Orb::Page] # def list(params = {}) parsed, options = Orb::Models::PlanListParams.dump_request(params) @@ -114,7 +108,7 @@ def list(params = {}) path: "plans", query: parsed, page: Orb::Page, - model: Orb::Models::PlanModel, + model: Orb::Models::Plan, options: options ) end @@ -143,13 +137,13 @@ def list(params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::PlanModel] + # @return [Orb::Models::Plan] # def fetch(plan_id, params = {}) @client.request( method: :get, path: ["plans/%0s", plan_id], - model: Orb::Models::PlanModel, + model: Orb::Models::Plan, options: params[:request_options] ) end diff --git a/lib/orb/resources/plans/external_plan_id.rb b/lib/orb/resources/plans/external_plan_id.rb index e032ad50..7039999a 100644 --- a/lib/orb/resources/plans/external_plan_id.rb +++ b/lib/orb/resources/plans/external_plan_id.rb @@ -23,7 +23,7 @@ class ExternalPlanID # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::PlanModel] + # @return [Orb::Models::Plan] # def update(other_external_plan_id, params = {}) parsed, options = Orb::Models::Plans::ExternalPlanIDUpdateParams.dump_request(params) @@ -31,7 +31,7 @@ def update(other_external_plan_id, params = {}) method: :put, path: ["plans/external_plan_id/%0s", other_external_plan_id], body: parsed, - model: Orb::Models::PlanModel, + model: Orb::Models::Plan, options: options ) end @@ -59,13 +59,13 @@ def update(other_external_plan_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::PlanModel] + # @return [Orb::Models::Plan] # def fetch(external_plan_id, params = {}) @client.request( method: :get, path: ["plans/external_plan_id/%0s", external_plan_id], - model: Orb::Models::PlanModel, + model: Orb::Models::Plan, options: params[:request_options] ) end diff --git a/lib/orb/resources/prices.rb b/lib/orb/resources/prices.rb index 317dd4f7..96da7cc2 100644 --- a/lib/orb/resources/prices.rb +++ b/lib/orb/resources/prices.rb @@ -19,26 +19,104 @@ class Prices # # @param params [Orb::Models::PriceCreateParams, Hash{Symbol=>Object}] . # - # @option params [Orb::Models::NewFloatingPriceModel] :new_floating_price_model + # @option params [Symbol, Orb::Models::PriceCreateParams::Cadence] :cadence The cadence to bill for this price on. + # + # @option params [String] :currency An ISO 4217 currency string for which this price is billed in. + # + # @option params [String] :item_id The id of the item the price will be associated with. + # + # @option params [Symbol, Orb::Models::PriceCreateParams::ModelType] :model_type + # + # @option params [String] :name The name of the price. + # + # @option params [Orb::Models::PriceCreateParams::UnitConfig] :unit_config + # + # @option params [Orb::Models::PriceCreateParams::PackageConfig] :package_config + # + # @option params [Orb::Models::PriceCreateParams::MatrixConfig] :matrix_config + # + # @option params [Orb::Models::PriceCreateParams::MatrixWithAllocationConfig] :matrix_with_allocation_config + # + # @option params [Orb::Models::PriceCreateParams::TieredConfig] :tiered_config + # + # @option params [Orb::Models::PriceCreateParams::TieredBpsConfig] :tiered_bps_config + # + # @option params [Orb::Models::PriceCreateParams::BpsConfig] :bps_config + # + # @option params [Orb::Models::PriceCreateParams::BulkBpsConfig] :bulk_bps_config + # + # @option params [Orb::Models::PriceCreateParams::BulkConfig] :bulk_config + # + # @option params [Hash{Symbol=>Object}] :threshold_total_amount_config + # + # @option params [Hash{Symbol=>Object}] :tiered_package_config + # + # @option params [Hash{Symbol=>Object}] :grouped_tiered_config + # + # @option params [Hash{Symbol=>Object}] :max_group_tiered_package_config + # + # @option params [Hash{Symbol=>Object}] :tiered_with_minimum_config + # + # @option params [Hash{Symbol=>Object}] :package_with_allocation_config + # + # @option params [Hash{Symbol=>Object}] :tiered_package_with_minimum_config + # + # @option params [Hash{Symbol=>Object}] :unit_with_percent_config + # + # @option params [Hash{Symbol=>Object}] :tiered_with_proration_config + # + # @option params [Hash{Symbol=>Object}] :unit_with_proration_config + # + # @option params [Hash{Symbol=>Object}] :grouped_allocation_config + # + # @option params [Hash{Symbol=>Object}] :grouped_with_prorated_minimum_config + # + # @option params [Hash{Symbol=>Object}] :grouped_with_metered_minimum_config + # + # @option params [Hash{Symbol=>Object}] :matrix_with_display_name_config + # + # @option params [Hash{Symbol=>Object}] :bulk_with_proration_config + # + # @option params [Hash{Symbol=>Object}] :grouped_tiered_package_config + # + # @option params [Hash{Symbol=>Object}] :scalable_matrix_with_unit_pricing_config + # + # @option params [Hash{Symbol=>Object}] :scalable_matrix_with_tiered_pricing_config + # + # @option params [Hash{Symbol=>Object}] :cumulative_grouped_bulk_config + # + # @option params [String, nil] :billable_metric_id The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @option params [Boolean, nil] :billed_in_advance If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @option params [Orb::Models::PriceCreateParams::BillingCycleConfiguration, nil] :billing_cycle_configuration For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @option params [Float, nil] :conversion_rate The per unit conversion rate of the price currency to the invoicing currency. + # + # @option params [String, nil] :external_price_id An alias for the price. + # + # @option params [Float, nil] :fixed_price_quantity If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @option params [String, nil] :invoice_grouping_key The property used to group this price on an invoice + # + # @option params [Orb::Models::PriceCreateParams::InvoicingCycleConfiguration, nil] :invoicing_cycle_configuration Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @option params [Hash{Symbol=>String, nil}, nil] :metadata User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::PriceModel::UnitPrice, Orb::Models::PriceModel::PackagePrice, Orb::Models::PriceModel::MatrixPrice, Orb::Models::PriceModel::TieredPrice, Orb::Models::PriceModel::TieredBpsPrice, Orb::Models::PriceModel::BpsPrice, Orb::Models::PriceModel::BulkBpsPrice, Orb::Models::PriceModel::BulkPrice, Orb::Models::PriceModel::ThresholdTotalAmountPrice, Orb::Models::PriceModel::TieredPackagePrice, Orb::Models::PriceModel::GroupedTieredPrice, Orb::Models::PriceModel::TieredWithMinimumPrice, Orb::Models::PriceModel::TieredPackageWithMinimumPrice, Orb::Models::PriceModel::PackageWithAllocationPrice, Orb::Models::PriceModel::UnitWithPercentPrice, Orb::Models::PriceModel::MatrixWithAllocationPrice, Orb::Models::PriceModel::TieredWithProrationPrice, Orb::Models::PriceModel::UnitWithProrationPrice, Orb::Models::PriceModel::GroupedAllocationPrice, Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, Orb::Models::PriceModel::MatrixWithDisplayNamePrice, Orb::Models::PriceModel::BulkWithProrationPrice, Orb::Models::PriceModel::GroupedTieredPackagePrice, Orb::Models::PriceModel::MaxGroupTieredPackagePrice, Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, Orb::Models::PriceModel::CumulativeGroupedBulkPrice] + # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] # def create(params) parsed, options = Orb::Models::PriceCreateParams.dump_request(params) - case parsed - in {new_floating_price_model: Hash => union, **rest} - parsed = {**rest, **union} - else - end - @client.request( - method: :post, - path: "prices", - body: parsed, - model: Orb::Models::PriceModel, - options: options - ) + @client.request(method: :post, path: "prices", body: parsed, model: Orb::Models::Price, options: options) end # This endpoint allows you to update the `metadata` property on a price. If you @@ -55,7 +133,7 @@ def create(params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::PriceModel::UnitPrice, Orb::Models::PriceModel::PackagePrice, Orb::Models::PriceModel::MatrixPrice, Orb::Models::PriceModel::TieredPrice, Orb::Models::PriceModel::TieredBpsPrice, Orb::Models::PriceModel::BpsPrice, Orb::Models::PriceModel::BulkBpsPrice, Orb::Models::PriceModel::BulkPrice, Orb::Models::PriceModel::ThresholdTotalAmountPrice, Orb::Models::PriceModel::TieredPackagePrice, Orb::Models::PriceModel::GroupedTieredPrice, Orb::Models::PriceModel::TieredWithMinimumPrice, Orb::Models::PriceModel::TieredPackageWithMinimumPrice, Orb::Models::PriceModel::PackageWithAllocationPrice, Orb::Models::PriceModel::UnitWithPercentPrice, Orb::Models::PriceModel::MatrixWithAllocationPrice, Orb::Models::PriceModel::TieredWithProrationPrice, Orb::Models::PriceModel::UnitWithProrationPrice, Orb::Models::PriceModel::GroupedAllocationPrice, Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, Orb::Models::PriceModel::MatrixWithDisplayNamePrice, Orb::Models::PriceModel::BulkWithProrationPrice, Orb::Models::PriceModel::GroupedTieredPackagePrice, Orb::Models::PriceModel::MaxGroupTieredPackagePrice, Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, Orb::Models::PriceModel::CumulativeGroupedBulkPrice] + # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] # def update(price_id, params = {}) parsed, options = Orb::Models::PriceUpdateParams.dump_request(params) @@ -63,7 +141,7 @@ def update(price_id, params = {}) method: :put, path: ["prices/%0s", price_id], body: parsed, - model: Orb::Models::PriceModel, + model: Orb::Models::Price, options: options ) end @@ -80,7 +158,7 @@ def update(price_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Page] + # @return [Orb::Page] # def list(params = {}) parsed, options = Orb::Models::PriceListParams.dump_request(params) @@ -89,7 +167,7 @@ def list(params = {}) path: "prices", query: parsed, page: Orb::Page, - model: Orb::Models::PriceModel, + model: Orb::Models::Price, options: options ) end @@ -159,13 +237,13 @@ def evaluate(price_id, params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::PriceModel::UnitPrice, Orb::Models::PriceModel::PackagePrice, Orb::Models::PriceModel::MatrixPrice, Orb::Models::PriceModel::TieredPrice, Orb::Models::PriceModel::TieredBpsPrice, Orb::Models::PriceModel::BpsPrice, Orb::Models::PriceModel::BulkBpsPrice, Orb::Models::PriceModel::BulkPrice, Orb::Models::PriceModel::ThresholdTotalAmountPrice, Orb::Models::PriceModel::TieredPackagePrice, Orb::Models::PriceModel::GroupedTieredPrice, Orb::Models::PriceModel::TieredWithMinimumPrice, Orb::Models::PriceModel::TieredPackageWithMinimumPrice, Orb::Models::PriceModel::PackageWithAllocationPrice, Orb::Models::PriceModel::UnitWithPercentPrice, Orb::Models::PriceModel::MatrixWithAllocationPrice, Orb::Models::PriceModel::TieredWithProrationPrice, Orb::Models::PriceModel::UnitWithProrationPrice, Orb::Models::PriceModel::GroupedAllocationPrice, Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, Orb::Models::PriceModel::MatrixWithDisplayNamePrice, Orb::Models::PriceModel::BulkWithProrationPrice, Orb::Models::PriceModel::GroupedTieredPackagePrice, Orb::Models::PriceModel::MaxGroupTieredPackagePrice, Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, Orb::Models::PriceModel::CumulativeGroupedBulkPrice] + # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] # def fetch(price_id, params = {}) @client.request( method: :get, path: ["prices/%0s", price_id], - model: Orb::Models::PriceModel, + model: Orb::Models::Price, options: params[:request_options] ) end diff --git a/lib/orb/resources/prices/external_price_id.rb b/lib/orb/resources/prices/external_price_id.rb index 163642c4..fa9e7c6d 100644 --- a/lib/orb/resources/prices/external_price_id.rb +++ b/lib/orb/resources/prices/external_price_id.rb @@ -18,7 +18,7 @@ class ExternalPriceID # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::PriceModel::UnitPrice, Orb::Models::PriceModel::PackagePrice, Orb::Models::PriceModel::MatrixPrice, Orb::Models::PriceModel::TieredPrice, Orb::Models::PriceModel::TieredBpsPrice, Orb::Models::PriceModel::BpsPrice, Orb::Models::PriceModel::BulkBpsPrice, Orb::Models::PriceModel::BulkPrice, Orb::Models::PriceModel::ThresholdTotalAmountPrice, Orb::Models::PriceModel::TieredPackagePrice, Orb::Models::PriceModel::GroupedTieredPrice, Orb::Models::PriceModel::TieredWithMinimumPrice, Orb::Models::PriceModel::TieredPackageWithMinimumPrice, Orb::Models::PriceModel::PackageWithAllocationPrice, Orb::Models::PriceModel::UnitWithPercentPrice, Orb::Models::PriceModel::MatrixWithAllocationPrice, Orb::Models::PriceModel::TieredWithProrationPrice, Orb::Models::PriceModel::UnitWithProrationPrice, Orb::Models::PriceModel::GroupedAllocationPrice, Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, Orb::Models::PriceModel::MatrixWithDisplayNamePrice, Orb::Models::PriceModel::BulkWithProrationPrice, Orb::Models::PriceModel::GroupedTieredPackagePrice, Orb::Models::PriceModel::MaxGroupTieredPackagePrice, Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, Orb::Models::PriceModel::CumulativeGroupedBulkPrice] + # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] # def update(external_price_id, params = {}) parsed, options = Orb::Models::Prices::ExternalPriceIDUpdateParams.dump_request(params) @@ -26,7 +26,7 @@ def update(external_price_id, params = {}) method: :put, path: ["prices/external_price_id/%0s", external_price_id], body: parsed, - model: Orb::Models::PriceModel, + model: Orb::Models::Price, options: options ) end @@ -41,13 +41,13 @@ def update(external_price_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::PriceModel::UnitPrice, Orb::Models::PriceModel::PackagePrice, Orb::Models::PriceModel::MatrixPrice, Orb::Models::PriceModel::TieredPrice, Orb::Models::PriceModel::TieredBpsPrice, Orb::Models::PriceModel::BpsPrice, Orb::Models::PriceModel::BulkBpsPrice, Orb::Models::PriceModel::BulkPrice, Orb::Models::PriceModel::ThresholdTotalAmountPrice, Orb::Models::PriceModel::TieredPackagePrice, Orb::Models::PriceModel::GroupedTieredPrice, Orb::Models::PriceModel::TieredWithMinimumPrice, Orb::Models::PriceModel::TieredPackageWithMinimumPrice, Orb::Models::PriceModel::PackageWithAllocationPrice, Orb::Models::PriceModel::UnitWithPercentPrice, Orb::Models::PriceModel::MatrixWithAllocationPrice, Orb::Models::PriceModel::TieredWithProrationPrice, Orb::Models::PriceModel::UnitWithProrationPrice, Orb::Models::PriceModel::GroupedAllocationPrice, Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, Orb::Models::PriceModel::MatrixWithDisplayNamePrice, Orb::Models::PriceModel::BulkWithProrationPrice, Orb::Models::PriceModel::GroupedTieredPackagePrice, Orb::Models::PriceModel::MaxGroupTieredPackagePrice, Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, Orb::Models::PriceModel::CumulativeGroupedBulkPrice] + # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] # def fetch(external_price_id, params = {}) @client.request( method: :get, path: ["prices/external_price_id/%0s", external_price_id], - model: Orb::Models::PriceModel, + model: Orb::Models::Price, options: params[:request_options] ) end diff --git a/lib/orb/resources/subscriptions.rb b/lib/orb/resources/subscriptions.rb index 7dfd7e3c..a1e81c2d 100644 --- a/lib/orb/resources/subscriptions.rb +++ b/lib/orb/resources/subscriptions.rb @@ -276,7 +276,7 @@ class Subscriptions # # @option params [String, nil] :aws_region # - # @option params [Orb::Models::BillingCycleAnchorConfigurationModel, nil] :billing_cycle_anchor_configuration + # @option params [Orb::Models::SubscriptionCreateParams::BillingCycleAnchorConfiguration, nil] :billing_cycle_anchor_configuration # # @option params [String, nil] :coupon_redemption_code Redemption code to be used for this subscription. If the coupon cannot be found # by its redemption code, or cannot be redeemed, an error response will be @@ -357,7 +357,7 @@ class Subscriptions # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::MutatedSubscriptionModel] + # @return [Orb::Models::SubscriptionCreateResponse] # def create(params = {}) parsed, options = Orb::Models::SubscriptionCreateParams.dump_request(params) @@ -365,7 +365,7 @@ def create(params = {}) method: :post, path: "subscriptions", body: parsed, - model: Orb::Models::MutatedSubscriptionModel, + model: Orb::Models::SubscriptionCreateResponse, options: options ) end @@ -400,7 +400,7 @@ def create(params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::SubscriptionModel] + # @return [Orb::Models::Subscription] # def update(subscription_id, params = {}) parsed, options = Orb::Models::SubscriptionUpdateParams.dump_request(params) @@ -408,7 +408,7 @@ def update(subscription_id, params = {}) method: :put, path: ["subscriptions/%0s", subscription_id], body: parsed, - model: Orb::Models::SubscriptionModel, + model: Orb::Models::Subscription, options: options ) end @@ -446,7 +446,7 @@ def update(subscription_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Page] + # @return [Orb::Page] # def list(params = {}) parsed, options = Orb::Models::SubscriptionListParams.dump_request(params) @@ -455,7 +455,7 @@ def list(params = {}) path: "subscriptions", query: parsed, page: Orb::Page, - model: Orb::Models::SubscriptionModel, + model: Orb::Models::Subscription, options: options ) end @@ -537,7 +537,7 @@ def list(params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::MutatedSubscriptionModel] + # @return [Orb::Models::SubscriptionCancelResponse] # def cancel(subscription_id, params) parsed, options = Orb::Models::SubscriptionCancelParams.dump_request(params) @@ -545,7 +545,7 @@ def cancel(subscription_id, params) method: :post, path: ["subscriptions/%0s/cancel", subscription_id], body: parsed, - model: Orb::Models::MutatedSubscriptionModel, + model: Orb::Models::SubscriptionCancelResponse, options: options ) end @@ -559,13 +559,13 @@ def cancel(subscription_id, params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::SubscriptionModel] + # @return [Orb::Models::Subscription] # def fetch(subscription_id, params = {}) @client.request( method: :get, path: ["subscriptions/%0s", subscription_id], - model: Orb::Models::SubscriptionModel, + model: Orb::Models::Subscription, options: params[:request_options] ) end @@ -979,7 +979,7 @@ def fetch_usage(subscription_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::MutatedSubscriptionModel] + # @return [Orb::Models::SubscriptionPriceIntervalsResponse] # def price_intervals(subscription_id, params = {}) parsed, options = Orb::Models::SubscriptionPriceIntervalsParams.dump_request(params) @@ -987,7 +987,7 @@ def price_intervals(subscription_id, params = {}) method: :post, path: ["subscriptions/%0s/price_intervals", subscription_id], body: parsed, - model: Orb::Models::MutatedSubscriptionModel, + model: Orb::Models::SubscriptionPriceIntervalsResponse, options: options ) end @@ -1199,7 +1199,7 @@ def price_intervals(subscription_id, params = {}) # start of the month. Defaults to `unchanged` which keeps subscription's existing # billing cycle alignment. # - # @option params [Orb::Models::BillingCycleAnchorConfigurationModel, nil] :billing_cycle_anchor_configuration + # @option params [Orb::Models::SubscriptionSchedulePlanChangeParams::BillingCycleAnchorConfiguration, nil] :billing_cycle_anchor_configuration # # @option params [Time, nil] :change_date The date that the plan change should take effect. This parameter can only be # passed if the `change_option` is `requested_date`. If a date with no time is @@ -1268,7 +1268,7 @@ def price_intervals(subscription_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::MutatedSubscriptionModel] + # @return [Orb::Models::SubscriptionSchedulePlanChangeResponse] # def schedule_plan_change(subscription_id, params) parsed, options = Orb::Models::SubscriptionSchedulePlanChangeParams.dump_request(params) @@ -1276,7 +1276,7 @@ def schedule_plan_change(subscription_id, params) method: :post, path: ["subscriptions/%0s/schedule_plan_change", subscription_id], body: parsed, - model: Orb::Models::MutatedSubscriptionModel, + model: Orb::Models::SubscriptionSchedulePlanChangeResponse, options: options ) end @@ -1297,7 +1297,7 @@ def schedule_plan_change(subscription_id, params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::MutatedSubscriptionModel] + # @return [Orb::Models::SubscriptionTriggerPhaseResponse] # def trigger_phase(subscription_id, params = {}) parsed, options = Orb::Models::SubscriptionTriggerPhaseParams.dump_request(params) @@ -1305,7 +1305,7 @@ def trigger_phase(subscription_id, params = {}) method: :post, path: ["subscriptions/%0s/trigger_phase", subscription_id], body: parsed, - model: Orb::Models::MutatedSubscriptionModel, + model: Orb::Models::SubscriptionTriggerPhaseResponse, options: options ) end @@ -1323,13 +1323,13 @@ def trigger_phase(subscription_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::MutatedSubscriptionModel] + # @return [Orb::Models::SubscriptionUnscheduleCancellationResponse] # def unschedule_cancellation(subscription_id, params = {}) @client.request( method: :post, path: ["subscriptions/%0s/unschedule_cancellation", subscription_id], - model: Orb::Models::MutatedSubscriptionModel, + model: Orb::Models::SubscriptionUnscheduleCancellationResponse, options: params[:request_options] ) end @@ -1348,7 +1348,7 @@ def unschedule_cancellation(subscription_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::MutatedSubscriptionModel] + # @return [Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse] # def unschedule_fixed_fee_quantity_updates(subscription_id, params) parsed, options = Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesParams.dump_request(params) @@ -1356,7 +1356,7 @@ def unschedule_fixed_fee_quantity_updates(subscription_id, params) method: :post, path: ["subscriptions/%0s/unschedule_fixed_fee_quantity_updates", subscription_id], body: parsed, - model: Orb::Models::MutatedSubscriptionModel, + model: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse, options: options ) end @@ -1370,13 +1370,13 @@ def unschedule_fixed_fee_quantity_updates(subscription_id, params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::MutatedSubscriptionModel] + # @return [Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse] # def unschedule_pending_plan_changes(subscription_id, params = {}) @client.request( method: :post, path: ["subscriptions/%0s/unschedule_pending_plan_changes", subscription_id], - model: Orb::Models::MutatedSubscriptionModel, + model: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse, options: params[:request_options] ) end @@ -1418,7 +1418,7 @@ def unschedule_pending_plan_changes(subscription_id, params = {}) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::MutatedSubscriptionModel] + # @return [Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse] # def update_fixed_fee_quantity(subscription_id, params) parsed, options = Orb::Models::SubscriptionUpdateFixedFeeQuantityParams.dump_request(params) @@ -1426,7 +1426,7 @@ def update_fixed_fee_quantity(subscription_id, params) method: :post, path: ["subscriptions/%0s/update_fixed_fee_quantity", subscription_id], body: parsed, - model: Orb::Models::MutatedSubscriptionModel, + model: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse, options: options ) end @@ -1462,7 +1462,7 @@ def update_fixed_fee_quantity(subscription_id, params) # # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # - # @return [Orb::Models::MutatedSubscriptionModel] + # @return [Orb::Models::SubscriptionUpdateTrialResponse] # def update_trial(subscription_id, params) parsed, options = Orb::Models::SubscriptionUpdateTrialParams.dump_request(params) @@ -1470,7 +1470,7 @@ def update_trial(subscription_id, params) method: :post, path: ["subscriptions/%0s/update_trial", subscription_id], body: parsed, - model: Orb::Models::MutatedSubscriptionModel, + model: Orb::Models::SubscriptionUpdateTrialResponse, options: options ) end diff --git a/rbi/lib/orb/models/add_subscription_adjustment_params.rbi b/rbi/lib/orb/models/add_subscription_adjustment_params.rbi index a821d4be..d4547e0b 100644 --- a/rbi/lib/orb/models/add_subscription_adjustment_params.rbi +++ b/rbi/lib/orb/models/add_subscription_adjustment_params.rbi @@ -6,11 +6,11 @@ module Orb sig do returns( T.any( - Orb::Models::NewAdjustmentModel::NewPercentageDiscount, - Orb::Models::NewAdjustmentModel::NewUsageDiscount, - Orb::Models::NewAdjustmentModel::NewAmountDiscount, - Orb::Models::NewAdjustmentModel::NewMinimum, - Orb::Models::NewAdjustmentModel::NewMaximum + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount, + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount, + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount, + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMinimum, + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMaximum ) ) end @@ -20,20 +20,20 @@ module Orb sig do params( _: T.any( - Orb::Models::NewAdjustmentModel::NewPercentageDiscount, - Orb::Models::NewAdjustmentModel::NewUsageDiscount, - Orb::Models::NewAdjustmentModel::NewAmountDiscount, - Orb::Models::NewAdjustmentModel::NewMinimum, - Orb::Models::NewAdjustmentModel::NewMaximum + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount, + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount, + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount, + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMinimum, + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMaximum ) ) .returns( T.any( - Orb::Models::NewAdjustmentModel::NewPercentageDiscount, - Orb::Models::NewAdjustmentModel::NewUsageDiscount, - Orb::Models::NewAdjustmentModel::NewAmountDiscount, - Orb::Models::NewAdjustmentModel::NewMinimum, - Orb::Models::NewAdjustmentModel::NewMaximum + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount, + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount, + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount, + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMinimum, + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMaximum ) ) end @@ -67,11 +67,11 @@ module Orb sig do params( adjustment: T.any( - Orb::Models::NewAdjustmentModel::NewPercentageDiscount, - Orb::Models::NewAdjustmentModel::NewUsageDiscount, - Orb::Models::NewAdjustmentModel::NewAmountDiscount, - Orb::Models::NewAdjustmentModel::NewMinimum, - Orb::Models::NewAdjustmentModel::NewMaximum + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount, + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount, + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount, + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMinimum, + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMaximum ), end_date: T.nilable(Time), plan_phase_order: T.nilable(Integer), @@ -87,11 +87,11 @@ module Orb .returns( { adjustment: T.any( - Orb::Models::NewAdjustmentModel::NewPercentageDiscount, - Orb::Models::NewAdjustmentModel::NewUsageDiscount, - Orb::Models::NewAdjustmentModel::NewAmountDiscount, - Orb::Models::NewAdjustmentModel::NewMinimum, - Orb::Models::NewAdjustmentModel::NewMaximum + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount, + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount, + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount, + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMinimum, + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMaximum ), end_date: T.nilable(Time), plan_phase_order: T.nilable(Integer), @@ -101,6 +101,355 @@ module Orb end def to_hash end + + class Adjustment < Orb::Union + abstract! + + class NewPercentageDiscount < Orb::BaseModel + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + percentage_discount: Float, + is_invoice_level: T::Boolean, + adjustment_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + percentage_discount:, + is_invoice_level: nil, + adjustment_type: :percentage_discount + ) + end + + sig do + override + .returns( + { + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + percentage_discount: Float, + is_invoice_level: T::Boolean + } + ) + end + def to_hash + end + end + + class NewUsageDiscount < Orb::BaseModel + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + usage_discount: Float, + is_invoice_level: T::Boolean, + adjustment_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + usage_discount:, + is_invoice_level: nil, + adjustment_type: :usage_discount + ) + end + + sig do + override + .returns( + { + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + usage_discount: Float, + is_invoice_level: T::Boolean + } + ) + end + def to_hash + end + end + + class NewAmountDiscount < Orb::BaseModel + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig do + params( + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + adjustment_type: Symbol + ) + .void + end + def initialize( + amount_discount:, + applies_to_price_ids:, + is_invoice_level: nil, + adjustment_type: :amount_discount + ) + end + + sig do + override + .returns( + { + adjustment_type: Symbol, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean + } + ) + end + def to_hash + end + end + + class NewMinimum < Orb::BaseModel + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + item_id: String, + minimum_amount: String, + is_invoice_level: T::Boolean, + adjustment_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + item_id:, + minimum_amount:, + is_invoice_level: nil, + adjustment_type: :minimum + ) + end + + sig do + override + .returns( + { + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + item_id: String, + minimum_amount: String, + is_invoice_level: T::Boolean + } + ) + end + def to_hash + end + end + + class NewMaximum < Orb::BaseModel + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + maximum_amount: String, + is_invoice_level: T::Boolean, + adjustment_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + maximum_amount:, + is_invoice_level: nil, + adjustment_type: :maximum + ) + end + + sig do + override + .returns( + { + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + maximum_amount: String, + is_invoice_level: T::Boolean + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount], [Symbol, Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount], [Symbol, Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount], [Symbol, Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMinimum], [Symbol, Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMaximum]] + ) + end + private_class_method def self.variants + end + end end end end diff --git a/rbi/lib/orb/models/add_subscription_price_params.rbi b/rbi/lib/orb/models/add_subscription_price_params.rbi index f1258413..ef5d5694 100644 --- a/rbi/lib/orb/models/add_subscription_price_params.rbi +++ b/rbi/lib/orb/models/add_subscription_price_params.rbi @@ -3,24 +3,24 @@ module Orb module Models class AddSubscriptionPriceParams < Orb::BaseModel - sig { returns(T.nilable(Orb::Models::NewAllocationPriceModel)) } + sig { returns(T.nilable(Orb::Models::AddSubscriptionPriceParams::AllocationPrice)) } def allocation_price end sig do - params(_: T.nilable(Orb::Models::NewAllocationPriceModel)) - .returns(T.nilable(Orb::Models::NewAllocationPriceModel)) + params(_: T.nilable(Orb::Models::AddSubscriptionPriceParams::AllocationPrice)) + .returns(T.nilable(Orb::Models::AddSubscriptionPriceParams::AllocationPrice)) end def allocation_price=(_) end - sig { returns(T.nilable(T::Array[Orb::Models::DiscountOverrideModel])) } + sig { returns(T.nilable(T::Array[Orb::Models::AddSubscriptionPriceParams::Discount])) } def discounts end sig do - params(_: T.nilable(T::Array[Orb::Models::DiscountOverrideModel])) - .returns(T.nilable(T::Array[Orb::Models::DiscountOverrideModel])) + params(_: T.nilable(T::Array[Orb::Models::AddSubscriptionPriceParams::Discount])) + .returns(T.nilable(T::Array[Orb::Models::AddSubscriptionPriceParams::Discount])) end def discounts=(_) end @@ -69,31 +69,31 @@ module Orb returns( T.nilable( T.any( - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice ) ) ) @@ -105,62 +105,62 @@ module Orb params( _: T.nilable( T.any( - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice ) ) ) .returns( T.nilable( T.any( - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice ) ) ) @@ -186,8 +186,8 @@ module Orb sig do params( - allocation_price: T.nilable(Orb::Models::NewAllocationPriceModel), - discounts: T.nilable(T::Array[Orb::Models::DiscountOverrideModel]), + allocation_price: T.nilable(Orb::Models::AddSubscriptionPriceParams::AllocationPrice), + discounts: T.nilable(T::Array[Orb::Models::AddSubscriptionPriceParams::Discount]), end_date: T.nilable(Time), external_price_id: T.nilable(String), maximum_amount: T.nilable(String), @@ -195,31 +195,31 @@ module Orb plan_phase_order: T.nilable(Integer), price: T.nilable( T.any( - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice ) ), price_id: T.nilable(String), @@ -245,8 +245,8 @@ module Orb override .returns( { - allocation_price: T.nilable(Orb::Models::NewAllocationPriceModel), - discounts: T.nilable(T::Array[Orb::Models::DiscountOverrideModel]), + allocation_price: T.nilable(Orb::Models::AddSubscriptionPriceParams::AllocationPrice), + discounts: T.nilable(T::Array[Orb::Models::AddSubscriptionPriceParams::Discount]), end_date: T.nilable(Time), external_price_id: T.nilable(String), maximum_amount: T.nilable(String), @@ -254,31 +254,31 @@ module Orb plan_phase_order: T.nilable(Integer), price: T.nilable( T.any( - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice ) ), price_id: T.nilable(String), @@ -288,6 +288,8951 @@ module Orb end def to_hash end + + class AllocationPrice < Orb::BaseModel + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(T::Boolean) } + def expires_at_end_of_cadence + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def expires_at_end_of_cadence=(_) + end + + sig do + params( + amount: String, + cadence: Symbol, + currency: String, + expires_at_end_of_cadence: T::Boolean + ).void + end + def initialize(amount:, cadence:, currency:, expires_at_end_of_cadence:) + end + + sig do + override + .returns({ + amount: String, + cadence: Symbol, + currency: String, + expires_at_end_of_cadence: T::Boolean + }) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Discount < Orb::BaseModel + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(String)) } + def amount_discount + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def amount_discount=(_) + end + + sig { returns(T.nilable(Float)) } + def percentage_discount + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def percentage_discount=(_) + end + + sig { returns(T.nilable(Float)) } + def usage_discount + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def usage_discount=(_) + end + + sig do + params( + discount_type: Symbol, + amount_discount: T.nilable(String), + percentage_discount: T.nilable(Float), + usage_discount: T.nilable(Float) + ) + .void + end + def initialize(discount_type:, amount_discount: nil, percentage_discount: nil, usage_discount: nil) + end + + sig do + override + .returns( + { + discount_type: Symbol, + amount_discount: T.nilable(String), + percentage_discount: T.nilable(Float), + usage_discount: T.nilable(Float) + } + ) + end + def to_hash + end + + class DiscountType < Orb::Enum + abstract! + + PERCENTAGE = :percentage + USAGE = :usage + AMOUNT = :amount + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Price < Orb::Union + abstract! + + class NewSubscriptionUnitPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::UnitConfig) } + def unit_config + end + + sig do + params(_: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::UnitConfig) + .returns(Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::UnitConfig) + end + def unit_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + unit_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::UnitConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + unit_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :unit + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + unit_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::UnitConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class UnitConfig < Orb::BaseModel + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { params(unit_amount: String).void } + def initialize(unit_amount:) + end + + sig { override.returns({unit_amount: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionPackagePrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::PackageConfig) } + def package_config + end + + sig do + params(_: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::PackageConfig) + .returns(Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::PackageConfig) + end + def package_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + package_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::PackageConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + package_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :package + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + package_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::PackageConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class PackageConfig < Orb::BaseModel + sig { returns(String) } + def package_amount + end + + sig { params(_: String).returns(String) } + def package_amount=(_) + end + + sig { returns(Integer) } + def package_size + end + + sig { params(_: Integer).returns(Integer) } + def package_size=(_) + end + + sig { params(package_amount: String, package_size: Integer).void } + def initialize(package_amount:, package_size:) + end + + sig { override.returns({package_amount: String, package_size: Integer}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionMatrixPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig) } + def matrix_config + end + + sig do + params(_: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig) + .returns(Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig) + end + def matrix_config=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + matrix_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + matrix_config:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :matrix + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + matrix_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class MatrixConfig < Orb::BaseModel + sig { returns(String) } + def default_unit_amount + end + + sig { params(_: String).returns(String) } + def default_unit_amount=(_) + end + + sig { returns(T::Array[T.nilable(String)]) } + def dimensions + end + + sig { params(_: T::Array[T.nilable(String)]).returns(T::Array[T.nilable(String)]) } + def dimensions=(_) + end + + sig do + returns( + T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig::MatrixValue] + ) + end + def matrix_values + end + + sig do + params( + _: T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig::MatrixValue] + ) + .returns( + T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig::MatrixValue] + ) + end + def matrix_values=(_) + end + + sig do + params( + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + matrix_values: T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig::MatrixValue] + ) + .void + end + def initialize(default_unit_amount:, dimensions:, matrix_values:) + end + + sig do + override + .returns( + { + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + matrix_values: T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig::MatrixValue] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::BaseModel + sig { returns(T::Array[T.nilable(String)]) } + def dimension_values + end + + sig { params(_: T::Array[T.nilable(String)]).returns(T::Array[T.nilable(String)]) } + def dimension_values=(_) + end + + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { params(dimension_values: T::Array[T.nilable(String)], unit_amount: String).void } + def initialize(dimension_values:, unit_amount:) + end + + sig { override.returns({dimension_values: T::Array[T.nilable(String)], unit_amount: String}) } + def to_hash + end + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionTieredPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig) } + def tiered_config + end + + sig do + params(_: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig) + .returns(Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig) + end + def tiered_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + tiered_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + tiered_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :tiered + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + tiered_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class TieredConfig < Orb::BaseModel + sig do + returns( + T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig::Tier] + ) + end + def tiers + end + + sig do + params( + _: T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig::Tier] + ) + .returns( + T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig::Tier] + ) + end + def tiers=(_) + end + + sig do + params( + tiers: T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig::Tier] + ) + .void + end + def initialize(tiers:) + end + + sig do + override + .returns( + { + tiers: T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig::Tier] + } + ) + end + def to_hash + end + + class Tier < Orb::BaseModel + sig { returns(Float) } + def first_unit + end + + sig { params(_: Float).returns(Float) } + def first_unit=(_) + end + + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { returns(T.nilable(Float)) } + def last_unit + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def last_unit=(_) + end + + sig { params(first_unit: Float, unit_amount: String, last_unit: T.nilable(Float)).void } + def initialize(first_unit:, unit_amount:, last_unit: nil) + end + + sig { override.returns({first_unit: Float, unit_amount: String, last_unit: T.nilable(Float)}) } + def to_hash + end + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionTieredBpsPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig) } + def tiered_bps_config + end + + sig do + params(_: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig) + .returns(Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig) + end + def tiered_bps_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + tiered_bps_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + tiered_bps_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :tiered_bps + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + tiered_bps_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class TieredBpsConfig < Orb::BaseModel + sig do + returns( + T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig::Tier] + ) + end + def tiers + end + + sig do + params( + _: T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig::Tier] + ) + .returns( + T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig::Tier] + ) + end + def tiers=(_) + end + + sig do + params( + tiers: T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig::Tier] + ) + .void + end + def initialize(tiers:) + end + + sig do + override + .returns( + { + tiers: T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig::Tier] + } + ) + end + def to_hash + end + + class Tier < Orb::BaseModel + sig { returns(Float) } + def bps + end + + sig { params(_: Float).returns(Float) } + def bps=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(T.nilable(String)) } + def maximum_amount + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_maximum + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_maximum=(_) + end + + sig do + params( + bps: Float, + minimum_amount: String, + maximum_amount: T.nilable(String), + per_unit_maximum: T.nilable(String) + ) + .void + end + def initialize(bps:, minimum_amount:, maximum_amount: nil, per_unit_maximum: nil) + end + + sig do + override + .returns( + { + bps: Float, + minimum_amount: String, + maximum_amount: T.nilable(String), + per_unit_maximum: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionBpsPrice < Orb::BaseModel + sig { returns(Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig) } + def bps_config + end + + sig do + params(_: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig) + .returns(Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig) + end + def bps_config=(_) + end + + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + bps_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig, + cadence: Symbol, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + bps_config:, + cadence:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :bps + ) + end + + sig do + override + .returns( + { + bps_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig, + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class BpsConfig < Orb::BaseModel + sig { returns(Float) } + def bps + end + + sig { params(_: Float).returns(Float) } + def bps=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_maximum + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_maximum=(_) + end + + sig { params(bps: Float, per_unit_maximum: T.nilable(String)).void } + def initialize(bps:, per_unit_maximum: nil) + end + + sig { override.returns({bps: Float, per_unit_maximum: T.nilable(String)}) } + def to_hash + end + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionBulkBpsPrice < Orb::BaseModel + sig { returns(Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig) } + def bulk_bps_config + end + + sig do + params(_: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig) + .returns(Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig) + end + def bulk_bps_config=(_) + end + + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + bulk_bps_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig, + cadence: Symbol, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + bulk_bps_config:, + cadence:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :bulk_bps + ) + end + + sig do + override + .returns( + { + bulk_bps_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig, + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class BulkBpsConfig < Orb::BaseModel + sig do + returns( + T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig::Tier] + ) + end + def tiers + end + + sig do + params( + _: T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig::Tier] + ) + .returns( + T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig::Tier] + ) + end + def tiers=(_) + end + + sig do + params( + tiers: T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig::Tier] + ) + .void + end + def initialize(tiers:) + end + + sig do + override + .returns( + { + tiers: T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig::Tier] + } + ) + end + def to_hash + end + + class Tier < Orb::BaseModel + sig { returns(Float) } + def bps + end + + sig { params(_: Float).returns(Float) } + def bps=(_) + end + + sig { returns(T.nilable(String)) } + def maximum_amount + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_maximum + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_maximum=(_) + end + + sig do + params( + bps: Float, + maximum_amount: T.nilable(String), + per_unit_maximum: T.nilable(String) + ).void + end + def initialize(bps:, maximum_amount: nil, per_unit_maximum: nil) + end + + sig do + override.returns( + { + bps: Float, + maximum_amount: T.nilable(String), + per_unit_maximum: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionBulkPrice < Orb::BaseModel + sig { returns(Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig) } + def bulk_config + end + + sig do + params(_: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig) + .returns(Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig) + end + def bulk_config=(_) + end + + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + bulk_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig, + cadence: Symbol, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + bulk_config:, + cadence:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :bulk + ) + end + + sig do + override + .returns( + { + bulk_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig, + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class BulkConfig < Orb::BaseModel + sig do + returns( + T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig::Tier] + ) + end + def tiers + end + + sig do + params( + _: T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig::Tier] + ) + .returns( + T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig::Tier] + ) + end + def tiers=(_) + end + + sig do + params( + tiers: T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig::Tier] + ) + .void + end + def initialize(tiers:) + end + + sig do + override + .returns( + { + tiers: T::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig::Tier] + } + ) + end + def to_hash + end + + class Tier < Orb::BaseModel + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { returns(T.nilable(Float)) } + def maximum_units + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def maximum_units=(_) + end + + sig { params(unit_amount: String, maximum_units: T.nilable(Float)).void } + def initialize(unit_amount:, maximum_units: nil) + end + + sig { override.returns({unit_amount: String, maximum_units: T.nilable(Float)}) } + def to_hash + end + end + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionThresholdTotalAmountPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def threshold_total_amount_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def threshold_total_amount_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + threshold_total_amount_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + threshold_total_amount_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :threshold_total_amount + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + threshold_total_amount_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionTieredPackagePrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def tiered_package_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def tiered_package_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + tiered_package_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + tiered_package_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :tiered_package + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + tiered_package_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionTieredWithMinimumPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def tiered_with_minimum_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def tiered_with_minimum_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + tiered_with_minimum_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + tiered_with_minimum_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :tiered_with_minimum + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + tiered_with_minimum_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionUnitWithPercentPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def unit_with_percent_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def unit_with_percent_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + unit_with_percent_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + unit_with_percent_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :unit_with_percent + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + unit_with_percent_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionPackageWithAllocationPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def package_with_allocation_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def package_with_allocation_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + package_with_allocation_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + package_with_allocation_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :package_with_allocation + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + package_with_allocation_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionTierWithProrationPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def tiered_with_proration_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def tiered_with_proration_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + tiered_with_proration_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + tiered_with_proration_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :tiered_with_proration + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + tiered_with_proration_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionUnitWithProrationPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def unit_with_proration_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def unit_with_proration_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + unit_with_proration_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + unit_with_proration_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :unit_with_proration + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + unit_with_proration_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionGroupedAllocationPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def grouped_allocation_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def grouped_allocation_config=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + grouped_allocation_config: T::Hash[Symbol, T.anything], + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + grouped_allocation_config:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :grouped_allocation + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + grouped_allocation_config: T::Hash[Symbol, T.anything], + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionGroupedWithProratedMinimumPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def grouped_with_prorated_minimum_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def grouped_with_prorated_minimum_config=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + grouped_with_prorated_minimum_config: T::Hash[Symbol, T.anything], + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + grouped_with_prorated_minimum_config:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :grouped_with_prorated_minimum + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + grouped_with_prorated_minimum_config: T::Hash[Symbol, T.anything], + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionBulkWithProrationPrice < Orb::BaseModel + sig { returns(T::Hash[Symbol, T.anything]) } + def bulk_with_proration_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def bulk_with_proration_config=(_) + end + + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + bulk_with_proration_config: T::Hash[Symbol, T.anything], + cadence: Symbol, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + bulk_with_proration_config:, + cadence:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :bulk_with_proration + ) + end + + sig do + override + .returns( + { + bulk_with_proration_config: T::Hash[Symbol, T.anything], + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionScalableMatrixWithUnitPricingPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def scalable_matrix_with_unit_pricing_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def scalable_matrix_with_unit_pricing_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + scalable_matrix_with_unit_pricing_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + scalable_matrix_with_unit_pricing_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :scalable_matrix_with_unit_pricing + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + scalable_matrix_with_unit_pricing_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionScalableMatrixWithTieredPricingPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def scalable_matrix_with_tiered_pricing_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def scalable_matrix_with_tiered_pricing_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + scalable_matrix_with_tiered_pricing_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + scalable_matrix_with_tiered_pricing_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :scalable_matrix_with_tiered_pricing + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + scalable_matrix_with_tiered_pricing_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionCumulativeGroupedBulkPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def cumulative_grouped_bulk_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def cumulative_grouped_bulk_config=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + cumulative_grouped_bulk_config: T::Hash[Symbol, T.anything], + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + cumulative_grouped_bulk_config:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :cumulative_grouped_bulk + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + cumulative_grouped_bulk_config: T::Hash[Symbol, T.anything], + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionMaxGroupTieredPackagePrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def max_group_tiered_package_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def max_group_tiered_package_config=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + max_group_tiered_package_config: T::Hash[Symbol, T.anything], + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + max_group_tiered_package_config:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :max_group_tiered_package + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + max_group_tiered_package_config: T::Hash[Symbol, T.anything], + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionGroupedWithMeteredMinimumPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def grouped_with_metered_minimum_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def grouped_with_metered_minimum_config=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + grouped_with_metered_minimum_config: T::Hash[Symbol, T.anything], + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + grouped_with_metered_minimum_config:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :grouped_with_metered_minimum + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + grouped_with_metered_minimum_config: T::Hash[Symbol, T.anything], + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionMatrixWithDisplayNamePrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def matrix_with_display_name_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def matrix_with_display_name_config=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + matrix_with_display_name_config: T::Hash[Symbol, T.anything], + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + matrix_with_display_name_config:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :matrix_with_display_name + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + matrix_with_display_name_config: T::Hash[Symbol, T.anything], + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionGroupedTieredPackagePrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def grouped_tiered_package_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def grouped_tiered_package_config=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + grouped_tiered_package_config: T::Hash[Symbol, T.anything], + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + grouped_tiered_package_config:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :grouped_tiered_package + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + grouped_tiered_package_config: T::Hash[Symbol, T.anything], + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice], [Symbol, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice]] + ) + end + private_class_method def self.variants + end + end end end end diff --git a/rbi/lib/orb/models/address_input_model.rbi b/rbi/lib/orb/models/address_input_model.rbi deleted file mode 100644 index 5b99bdb6..00000000 --- a/rbi/lib/orb/models/address_input_model.rbi +++ /dev/null @@ -1,85 +0,0 @@ -# typed: strong - -module Orb - module Models - class AddressInputModel < Orb::BaseModel - sig { returns(T.nilable(String)) } - def city - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def city=(_) - end - - sig { returns(T.nilable(String)) } - def country - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def country=(_) - end - - sig { returns(T.nilable(String)) } - def line1 - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def line1=(_) - end - - sig { returns(T.nilable(String)) } - def line2 - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def line2=(_) - end - - sig { returns(T.nilable(String)) } - def postal_code - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def postal_code=(_) - end - - sig { returns(T.nilable(String)) } - def state - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def state=(_) - end - - sig do - params( - city: T.nilable(String), - country: T.nilable(String), - line1: T.nilable(String), - line2: T.nilable(String), - postal_code: T.nilable(String), - state: T.nilable(String) - ) - .void - end - def initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil) - end - - sig do - override - .returns( - { - city: T.nilable(String), - country: T.nilable(String), - line1: T.nilable(String), - line2: T.nilable(String), - postal_code: T.nilable(String), - state: T.nilable(String) - } - ) - end - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/address_model.rbi b/rbi/lib/orb/models/address_model.rbi deleted file mode 100644 index a74801e2..00000000 --- a/rbi/lib/orb/models/address_model.rbi +++ /dev/null @@ -1,85 +0,0 @@ -# typed: strong - -module Orb - module Models - class AddressModel < Orb::BaseModel - sig { returns(T.nilable(String)) } - def city - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def city=(_) - end - - sig { returns(T.nilable(String)) } - def country - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def country=(_) - end - - sig { returns(T.nilable(String)) } - def line1 - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def line1=(_) - end - - sig { returns(T.nilable(String)) } - def line2 - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def line2=(_) - end - - sig { returns(T.nilable(String)) } - def postal_code - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def postal_code=(_) - end - - sig { returns(T.nilable(String)) } - def state - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def state=(_) - end - - sig do - params( - city: T.nilable(String), - country: T.nilable(String), - line1: T.nilable(String), - line2: T.nilable(String), - postal_code: T.nilable(String), - state: T.nilable(String) - ) - .void - end - def initialize(city:, country:, line1:, line2:, postal_code:, state:) - end - - sig do - override - .returns( - { - city: T.nilable(String), - country: T.nilable(String), - line1: T.nilable(String), - line2: T.nilable(String), - postal_code: T.nilable(String), - state: T.nilable(String) - } - ) - end - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/adjustment_interval_model.rbi b/rbi/lib/orb/models/adjustment_interval_model.rbi deleted file mode 100644 index c0787e64..00000000 --- a/rbi/lib/orb/models/adjustment_interval_model.rbi +++ /dev/null @@ -1,116 +0,0 @@ -# typed: strong - -module Orb - module Models - class AdjustmentIntervalModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig do - returns( - T.any( - Orb::Models::AdjustmentModel::PlanPhaseUsageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseAmountDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhasePercentageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMinimumAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMaximumAdjustment - ) - ) - end - def adjustment - end - - sig do - params( - _: T.any( - Orb::Models::AdjustmentModel::PlanPhaseUsageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseAmountDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhasePercentageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMinimumAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMaximumAdjustment - ) - ) - .returns( - T.any( - Orb::Models::AdjustmentModel::PlanPhaseUsageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseAmountDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhasePercentageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMinimumAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMaximumAdjustment - ) - ) - end - def adjustment=(_) - end - - sig { returns(T::Array[String]) } - def applies_to_price_interval_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_interval_ids=(_) - end - - sig { returns(T.nilable(Time)) } - def end_date - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def end_date=(_) - end - - sig { returns(Time) } - def start_date - end - - sig { params(_: Time).returns(Time) } - def start_date=(_) - end - - sig do - params( - id: String, - adjustment: T.any( - Orb::Models::AdjustmentModel::PlanPhaseUsageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseAmountDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhasePercentageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMinimumAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMaximumAdjustment - ), - applies_to_price_interval_ids: T::Array[String], - end_date: T.nilable(Time), - start_date: Time - ) - .void - end - def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:) - end - - sig do - override - .returns( - { - id: String, - adjustment: T.any( - Orb::Models::AdjustmentModel::PlanPhaseUsageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseAmountDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhasePercentageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMinimumAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMaximumAdjustment - ), - applies_to_price_interval_ids: T::Array[String], - end_date: T.nilable(Time), - start_date: Time - } - ) - end - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/adjustment_model.rbi b/rbi/lib/orb/models/adjustment_model.rbi deleted file mode 100644 index a2331307..00000000 --- a/rbi/lib/orb/models/adjustment_model.rbi +++ /dev/null @@ -1,519 +0,0 @@ -# typed: strong - -module Orb - module Models - class AdjustmentModel < Orb::Union - abstract! - - class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(Symbol) } - def adjustment_type - end - - sig { params(_: Symbol).returns(Symbol) } - def adjustment_type=(_) - end - - sig { returns(T::Array[String]) } - def applies_to_price_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_ids=(_) - end - - sig { returns(T::Boolean) } - def is_invoice_level - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def is_invoice_level=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(T.nilable(String)) } - def reason - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reason=(_) - end - - sig { returns(Float) } - def usage_discount - end - - sig { params(_: Float).returns(Float) } - def usage_discount=(_) - end - - sig do - params( - id: String, - applies_to_price_ids: T::Array[String], - is_invoice_level: T::Boolean, - plan_phase_order: T.nilable(Integer), - reason: T.nilable(String), - usage_discount: Float, - adjustment_type: Symbol - ) - .void - end - def initialize( - id:, - applies_to_price_ids:, - is_invoice_level:, - plan_phase_order:, - reason:, - usage_discount:, - adjustment_type: :usage_discount - ) - end - - sig do - override - .returns( - { - id: String, - adjustment_type: Symbol, - applies_to_price_ids: T::Array[String], - is_invoice_level: T::Boolean, - plan_phase_order: T.nilable(Integer), - reason: T.nilable(String), - usage_discount: Float - } - ) - end - def to_hash - end - end - - class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(Symbol) } - def adjustment_type - end - - sig { params(_: Symbol).returns(Symbol) } - def adjustment_type=(_) - end - - sig { returns(String) } - def amount_discount - end - - sig { params(_: String).returns(String) } - def amount_discount=(_) - end - - sig { returns(T::Array[String]) } - def applies_to_price_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_ids=(_) - end - - sig { returns(T::Boolean) } - def is_invoice_level - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def is_invoice_level=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(T.nilable(String)) } - def reason - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reason=(_) - end - - sig do - params( - id: String, - amount_discount: String, - applies_to_price_ids: T::Array[String], - is_invoice_level: T::Boolean, - plan_phase_order: T.nilable(Integer), - reason: T.nilable(String), - adjustment_type: Symbol - ) - .void - end - def initialize( - id:, - amount_discount:, - applies_to_price_ids:, - is_invoice_level:, - plan_phase_order:, - reason:, - adjustment_type: :amount_discount - ) - end - - sig do - override - .returns( - { - id: String, - adjustment_type: Symbol, - amount_discount: String, - applies_to_price_ids: T::Array[String], - is_invoice_level: T::Boolean, - plan_phase_order: T.nilable(Integer), - reason: T.nilable(String) - } - ) - end - def to_hash - end - end - - class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(Symbol) } - def adjustment_type - end - - sig { params(_: Symbol).returns(Symbol) } - def adjustment_type=(_) - end - - sig { returns(T::Array[String]) } - def applies_to_price_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_ids=(_) - end - - sig { returns(T::Boolean) } - def is_invoice_level - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def is_invoice_level=(_) - end - - sig { returns(Float) } - def percentage_discount - end - - sig { params(_: Float).returns(Float) } - def percentage_discount=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(T.nilable(String)) } - def reason - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reason=(_) - end - - sig do - params( - id: String, - applies_to_price_ids: T::Array[String], - is_invoice_level: T::Boolean, - percentage_discount: Float, - plan_phase_order: T.nilable(Integer), - reason: T.nilable(String), - adjustment_type: Symbol - ) - .void - end - def initialize( - id:, - applies_to_price_ids:, - is_invoice_level:, - percentage_discount:, - plan_phase_order:, - reason:, - adjustment_type: :percentage_discount - ) - end - - sig do - override - .returns( - { - id: String, - adjustment_type: Symbol, - applies_to_price_ids: T::Array[String], - is_invoice_level: T::Boolean, - percentage_discount: Float, - plan_phase_order: T.nilable(Integer), - reason: T.nilable(String) - } - ) - end - def to_hash - end - end - - class PlanPhaseMinimumAdjustment < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(Symbol) } - def adjustment_type - end - - sig { params(_: Symbol).returns(Symbol) } - def adjustment_type=(_) - end - - sig { returns(T::Array[String]) } - def applies_to_price_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_ids=(_) - end - - sig { returns(T::Boolean) } - def is_invoice_level - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def is_invoice_level=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(String) } - def minimum_amount - end - - sig { params(_: String).returns(String) } - def minimum_amount=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(T.nilable(String)) } - def reason - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reason=(_) - end - - sig do - params( - id: String, - applies_to_price_ids: T::Array[String], - is_invoice_level: T::Boolean, - item_id: String, - minimum_amount: String, - plan_phase_order: T.nilable(Integer), - reason: T.nilable(String), - adjustment_type: Symbol - ) - .void - end - def initialize( - id:, - applies_to_price_ids:, - is_invoice_level:, - item_id:, - minimum_amount:, - plan_phase_order:, - reason:, - adjustment_type: :minimum - ) - end - - sig do - override - .returns( - { - id: String, - adjustment_type: Symbol, - applies_to_price_ids: T::Array[String], - is_invoice_level: T::Boolean, - item_id: String, - minimum_amount: String, - plan_phase_order: T.nilable(Integer), - reason: T.nilable(String) - } - ) - end - def to_hash - end - end - - class PlanPhaseMaximumAdjustment < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(Symbol) } - def adjustment_type - end - - sig { params(_: Symbol).returns(Symbol) } - def adjustment_type=(_) - end - - sig { returns(T::Array[String]) } - def applies_to_price_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_ids=(_) - end - - sig { returns(T::Boolean) } - def is_invoice_level - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def is_invoice_level=(_) - end - - sig { returns(String) } - def maximum_amount - end - - sig { params(_: String).returns(String) } - def maximum_amount=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(T.nilable(String)) } - def reason - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reason=(_) - end - - sig do - params( - id: String, - applies_to_price_ids: T::Array[String], - is_invoice_level: T::Boolean, - maximum_amount: String, - plan_phase_order: T.nilable(Integer), - reason: T.nilable(String), - adjustment_type: Symbol - ) - .void - end - def initialize( - id:, - applies_to_price_ids:, - is_invoice_level:, - maximum_amount:, - plan_phase_order:, - reason:, - adjustment_type: :maximum - ) - end - - sig do - override - .returns( - { - id: String, - adjustment_type: Symbol, - applies_to_price_ids: T::Array[String], - is_invoice_level: T::Boolean, - maximum_amount: String, - plan_phase_order: T.nilable(Integer), - reason: T.nilable(String) - } - ) - end - def to_hash - end - end - - sig do - override - .returns( - [[Symbol, Orb::Models::AdjustmentModel::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::AdjustmentModel::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::AdjustmentModel::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::AdjustmentModel::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::AdjustmentModel::PlanPhaseMaximumAdjustment]] - ) - end - private_class_method def self.variants - end - end - end -end diff --git a/rbi/lib/orb/models/affected_block_model.rbi b/rbi/lib/orb/models/affected_block_model.rbi deleted file mode 100644 index 3290971a..00000000 --- a/rbi/lib/orb/models/affected_block_model.rbi +++ /dev/null @@ -1,41 +0,0 @@ -# typed: strong - -module Orb - module Models - class AffectedBlockModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Time)) } - def expiry_date - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def expiry_date=(_) - end - - sig { returns(T.nilable(String)) } - def per_unit_cost_basis - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def per_unit_cost_basis=(_) - end - - sig { params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void } - def initialize(id:, expiry_date:, per_unit_cost_basis:) - end - - sig do - override.returns({id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)}) - end - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/aggregated_cost_model.rbi b/rbi/lib/orb/models/aggregated_cost_model.rbi deleted file mode 100644 index 2966df0c..00000000 --- a/rbi/lib/orb/models/aggregated_cost_model.rbi +++ /dev/null @@ -1,304 +0,0 @@ -# typed: strong - -module Orb - module Models - class AggregatedCostModel < Orb::BaseModel - sig { returns(T::Array[Orb::Models::AggregatedCostModel::PerPriceCost]) } - def per_price_costs - end - - sig do - params(_: T::Array[Orb::Models::AggregatedCostModel::PerPriceCost]) - .returns(T::Array[Orb::Models::AggregatedCostModel::PerPriceCost]) - end - def per_price_costs=(_) - end - - sig { returns(String) } - def subtotal - end - - sig { params(_: String).returns(String) } - def subtotal=(_) - end - - sig { returns(Time) } - def timeframe_end - end - - sig { params(_: Time).returns(Time) } - def timeframe_end=(_) - end - - sig { returns(Time) } - def timeframe_start - end - - sig { params(_: Time).returns(Time) } - def timeframe_start=(_) - end - - sig { returns(String) } - def total - end - - sig { params(_: String).returns(String) } - def total=(_) - end - - sig do - params( - per_price_costs: T::Array[Orb::Models::AggregatedCostModel::PerPriceCost], - subtotal: String, - timeframe_end: Time, - timeframe_start: Time, - total: String - ) - .void - end - def initialize(per_price_costs:, subtotal:, timeframe_end:, timeframe_start:, total:) - end - - sig do - override - .returns( - { - per_price_costs: T::Array[Orb::Models::AggregatedCostModel::PerPriceCost], - subtotal: String, - timeframe_end: Time, - timeframe_start: Time, - total: String - } - ) - end - def to_hash - end - - class PerPriceCost < Orb::BaseModel - sig do - returns( - T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice - ) - ) - end - def price - end - - sig do - params( - _: T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice - ) - ) - .returns( - T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice - ) - ) - end - def price=(_) - end - - sig { returns(String) } - def price_id - end - - sig { params(_: String).returns(String) } - def price_id=(_) - end - - sig { returns(String) } - def subtotal - end - - sig { params(_: String).returns(String) } - def subtotal=(_) - end - - sig { returns(String) } - def total - end - - sig { params(_: String).returns(String) } - def total=(_) - end - - sig { returns(T.nilable(Float)) } - def quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def quantity=(_) - end - - sig do - params( - price: T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice - ), - price_id: String, - subtotal: String, - total: String, - quantity: T.nilable(Float) - ) - .void - end - def initialize(price:, price_id:, subtotal:, total:, quantity: nil) - end - - sig do - override - .returns( - { - price: T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice - ), - price_id: String, - subtotal: String, - total: String, - quantity: T.nilable(Float) - } - ) - end - def to_hash - end - end - end - end -end diff --git a/rbi/lib/orb/models/alert.rbi b/rbi/lib/orb/models/alert.rbi index 1507deda..9f40a733 100644 --- a/rbi/lib/orb/models/alert.rbi +++ b/rbi/lib/orb/models/alert.rbi @@ -27,14 +27,11 @@ module Orb def currency=(_) end - sig { returns(T.nilable(Orb::Models::CustomerMinifiedModel)) } + sig { returns(T.nilable(Orb::Models::Alert::Customer)) } def customer end - sig do - params(_: T.nilable(Orb::Models::CustomerMinifiedModel)) - .returns(T.nilable(Orb::Models::CustomerMinifiedModel)) - end + sig { params(_: T.nilable(Orb::Models::Alert::Customer)).returns(T.nilable(Orb::Models::Alert::Customer)) } def customer=(_) end @@ -62,24 +59,23 @@ module Orb def plan=(_) end - sig { returns(T.nilable(Orb::Models::SubscriptionMinifiedModel)) } + sig { returns(T.nilable(Orb::Models::Alert::Subscription)) } def subscription end sig do - params(_: T.nilable(Orb::Models::SubscriptionMinifiedModel)) - .returns(T.nilable(Orb::Models::SubscriptionMinifiedModel)) + params(_: T.nilable(Orb::Models::Alert::Subscription)).returns(T.nilable(Orb::Models::Alert::Subscription)) end def subscription=(_) end - sig { returns(T.nilable(T::Array[Orb::Models::ThresholdModel])) } + sig { returns(T.nilable(T::Array[Orb::Models::Alert::Threshold])) } def thresholds end sig do - params(_: T.nilable(T::Array[Orb::Models::ThresholdModel])) - .returns(T.nilable(T::Array[Orb::Models::ThresholdModel])) + params(_: T.nilable(T::Array[Orb::Models::Alert::Threshold])) + .returns(T.nilable(T::Array[Orb::Models::Alert::Threshold])) end def thresholds=(_) end @@ -97,12 +93,12 @@ module Orb id: String, created_at: Time, currency: T.nilable(String), - customer: T.nilable(Orb::Models::CustomerMinifiedModel), + customer: T.nilable(Orb::Models::Alert::Customer), enabled: T::Boolean, metric: T.nilable(Orb::Models::Alert::Metric), plan: T.nilable(Orb::Models::Alert::Plan), - subscription: T.nilable(Orb::Models::SubscriptionMinifiedModel), - thresholds: T.nilable(T::Array[Orb::Models::ThresholdModel]), + subscription: T.nilable(Orb::Models::Alert::Subscription), + thresholds: T.nilable(T::Array[Orb::Models::Alert::Threshold]), type: Symbol ) .void @@ -128,12 +124,12 @@ module Orb id: String, created_at: Time, currency: T.nilable(String), - customer: T.nilable(Orb::Models::CustomerMinifiedModel), + customer: T.nilable(Orb::Models::Alert::Customer), enabled: T::Boolean, metric: T.nilable(Orb::Models::Alert::Metric), plan: T.nilable(Orb::Models::Alert::Plan), - subscription: T.nilable(Orb::Models::SubscriptionMinifiedModel), - thresholds: T.nilable(T::Array[Orb::Models::ThresholdModel]), + subscription: T.nilable(Orb::Models::Alert::Subscription), + thresholds: T.nilable(T::Array[Orb::Models::Alert::Threshold]), type: Symbol } ) @@ -141,6 +137,32 @@ module Orb def to_hash end + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + class Metric < Orb::BaseModel sig { returns(String) } def id @@ -219,6 +241,42 @@ module Orb end end + class Subscription < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class Threshold < Orb::BaseModel + sig { returns(Float) } + def value + end + + sig { params(_: Float).returns(Float) } + def value=(_) + end + + sig { params(value: Float).void } + def initialize(value:) + end + + sig { override.returns({value: Float}) } + def to_hash + end + end + class Type < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/alert_create_for_subscription_params.rbi b/rbi/lib/orb/models/alert_create_for_subscription_params.rbi index d0ddb01b..a5e364b1 100644 --- a/rbi/lib/orb/models/alert_create_for_subscription_params.rbi +++ b/rbi/lib/orb/models/alert_create_for_subscription_params.rbi @@ -6,11 +6,14 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters - sig { returns(T::Array[Orb::Models::ThresholdModel]) } + sig { returns(T::Array[Orb::Models::AlertCreateForSubscriptionParams::Threshold]) } def thresholds end - sig { params(_: T::Array[Orb::Models::ThresholdModel]).returns(T::Array[Orb::Models::ThresholdModel]) } + sig do + params(_: T::Array[Orb::Models::AlertCreateForSubscriptionParams::Threshold]) + .returns(T::Array[Orb::Models::AlertCreateForSubscriptionParams::Threshold]) + end def thresholds=(_) end @@ -32,7 +35,7 @@ module Orb sig do params( - thresholds: T::Array[Orb::Models::ThresholdModel], + thresholds: T::Array[Orb::Models::AlertCreateForSubscriptionParams::Threshold], type: Symbol, metric_id: T.nilable(String), request_options: T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything]) @@ -46,7 +49,7 @@ module Orb override .returns( { - thresholds: T::Array[Orb::Models::ThresholdModel], + thresholds: T::Array[Orb::Models::AlertCreateForSubscriptionParams::Threshold], type: Symbol, metric_id: T.nilable(String), request_options: Orb::RequestOptions @@ -56,6 +59,24 @@ module Orb def to_hash end + class Threshold < Orb::BaseModel + sig { returns(Float) } + def value + end + + sig { params(_: Float).returns(Float) } + def value=(_) + end + + sig { params(value: Float).void } + def initialize(value:) + end + + sig { override.returns({value: Float}) } + def to_hash + end + end + class Type < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/alert_model.rbi b/rbi/lib/orb/models/alert_model.rbi deleted file mode 100644 index f0bc3353..00000000 --- a/rbi/lib/orb/models/alert_model.rbi +++ /dev/null @@ -1,237 +0,0 @@ -# typed: strong - -module Orb - module Models - class AlertModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(Orb::Models::CustomerMinifiedModel)) } - def customer - end - - sig do - params(_: T.nilable(Orb::Models::CustomerMinifiedModel)) - .returns(T.nilable(Orb::Models::CustomerMinifiedModel)) - end - def customer=(_) - end - - sig { returns(T::Boolean) } - def enabled - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def enabled=(_) - end - - sig { returns(T.nilable(Orb::Models::AlertModel::Metric)) } - def metric - end - - sig { params(_: T.nilable(Orb::Models::AlertModel::Metric)).returns(T.nilable(Orb::Models::AlertModel::Metric)) } - def metric=(_) - end - - sig { returns(T.nilable(Orb::Models::AlertModel::Plan)) } - def plan - end - - sig { params(_: T.nilable(Orb::Models::AlertModel::Plan)).returns(T.nilable(Orb::Models::AlertModel::Plan)) } - def plan=(_) - end - - sig { returns(T.nilable(Orb::Models::SubscriptionMinifiedModel)) } - def subscription - end - - sig do - params(_: T.nilable(Orb::Models::SubscriptionMinifiedModel)) - .returns(T.nilable(Orb::Models::SubscriptionMinifiedModel)) - end - def subscription=(_) - end - - sig { returns(T.nilable(T::Array[Orb::Models::ThresholdModel])) } - def thresholds - end - - sig do - params(_: T.nilable(T::Array[Orb::Models::ThresholdModel])) - .returns(T.nilable(T::Array[Orb::Models::ThresholdModel])) - end - def thresholds=(_) - end - - sig { returns(Symbol) } - def type - end - - sig { params(_: Symbol).returns(Symbol) } - def type=(_) - end - - sig do - params( - id: String, - created_at: Time, - currency: T.nilable(String), - customer: T.nilable(Orb::Models::CustomerMinifiedModel), - enabled: T::Boolean, - metric: T.nilable(Orb::Models::AlertModel::Metric), - plan: T.nilable(Orb::Models::AlertModel::Plan), - subscription: T.nilable(Orb::Models::SubscriptionMinifiedModel), - thresholds: T.nilable(T::Array[Orb::Models::ThresholdModel]), - type: Symbol - ) - .void - end - def initialize( - id:, - created_at:, - currency:, - customer:, - enabled:, - metric:, - plan:, - subscription:, - thresholds:, - type: - ) - end - - sig do - override - .returns( - { - id: String, - created_at: Time, - currency: T.nilable(String), - customer: T.nilable(Orb::Models::CustomerMinifiedModel), - enabled: T::Boolean, - metric: T.nilable(Orb::Models::AlertModel::Metric), - plan: T.nilable(Orb::Models::AlertModel::Plan), - subscription: T.nilable(Orb::Models::SubscriptionMinifiedModel), - thresholds: T.nilable(T::Array[Orb::Models::ThresholdModel]), - type: Symbol - } - ) - end - def to_hash - end - - class Metric < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { params(id: String).void } - def initialize(id:) - end - - sig { override.returns({id: String}) } - def to_hash - end - end - - class Plan < Orb::BaseModel - sig { returns(T.nilable(String)) } - def id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def id=(_) - end - - sig { returns(T.nilable(String)) } - def external_plan_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_plan_id=(_) - end - - sig { returns(T.nilable(String)) } - def name - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def name=(_) - end - - sig { returns(String) } - def plan_version - end - - sig { params(_: String).returns(String) } - def plan_version=(_) - end - - sig do - params( - id: T.nilable(String), - external_plan_id: T.nilable(String), - name: T.nilable(String), - plan_version: String - ) - .void - end - def initialize(id:, external_plan_id:, name:, plan_version:) - end - - sig do - override - .returns( - { - id: T.nilable(String), - external_plan_id: T.nilable(String), - name: T.nilable(String), - plan_version: String - } - ) - end - def to_hash - end - end - - class Type < Orb::Enum - abstract! - - USAGE_EXCEEDED = :usage_exceeded - COST_EXCEEDED = :cost_exceeded - CREDIT_BALANCE_DEPLETED = :credit_balance_depleted - CREDIT_BALANCE_DROPPED = :credit_balance_dropped - CREDIT_BALANCE_RECOVERED = :credit_balance_recovered - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end -end diff --git a/rbi/lib/orb/models/alert_update_params.rbi b/rbi/lib/orb/models/alert_update_params.rbi index 293afd9d..38cf1879 100644 --- a/rbi/lib/orb/models/alert_update_params.rbi +++ b/rbi/lib/orb/models/alert_update_params.rbi @@ -6,17 +6,20 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters - sig { returns(T::Array[Orb::Models::ThresholdModel]) } + sig { returns(T::Array[Orb::Models::AlertUpdateParams::Threshold]) } def thresholds end - sig { params(_: T::Array[Orb::Models::ThresholdModel]).returns(T::Array[Orb::Models::ThresholdModel]) } + sig do + params(_: T::Array[Orb::Models::AlertUpdateParams::Threshold]) + .returns(T::Array[Orb::Models::AlertUpdateParams::Threshold]) + end def thresholds=(_) end sig do params( - thresholds: T::Array[Orb::Models::ThresholdModel], + thresholds: T::Array[Orb::Models::AlertUpdateParams::Threshold], request_options: T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything]) ) .void @@ -25,10 +28,31 @@ module Orb end sig do - override.returns({thresholds: T::Array[Orb::Models::ThresholdModel], request_options: Orb::RequestOptions}) + override + .returns( + {thresholds: T::Array[Orb::Models::AlertUpdateParams::Threshold], request_options: Orb::RequestOptions} + ) end def to_hash end + + class Threshold < Orb::BaseModel + sig { returns(Float) } + def value + end + + sig { params(_: Float).returns(Float) } + def value=(_) + end + + sig { params(value: Float).void } + def initialize(value:) + end + + sig { override.returns({value: Float}) } + def to_hash + end + end end end end diff --git a/rbi/lib/orb/models/allocation_model.rbi b/rbi/lib/orb/models/allocation_model.rbi deleted file mode 100644 index a0aede14..00000000 --- a/rbi/lib/orb/models/allocation_model.rbi +++ /dev/null @@ -1,31 +0,0 @@ -# typed: strong - -module Orb - module Models - class AllocationModel < Orb::BaseModel - sig { returns(T::Boolean) } - def allows_rollover - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def allows_rollover=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { params(allows_rollover: T::Boolean, currency: String).void } - def initialize(allows_rollover:, currency:) - end - - sig { override.returns({allows_rollover: T::Boolean, currency: String}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/amount_discount_interval_model.rbi b/rbi/lib/orb/models/amount_discount_interval_model.rbi deleted file mode 100644 index d0238926..00000000 --- a/rbi/lib/orb/models/amount_discount_interval_model.rbi +++ /dev/null @@ -1,102 +0,0 @@ -# typed: strong - -module Orb - module Models - class AmountDiscountIntervalModel < Orb::BaseModel - sig { returns(String) } - def amount_discount - end - - sig { params(_: String).returns(String) } - def amount_discount=(_) - end - - sig { returns(T::Array[String]) } - def applies_to_price_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_ids=(_) - end - - sig { returns(T::Array[String]) } - def applies_to_price_interval_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_interval_ids=(_) - end - - sig { returns(Symbol) } - def discount_type - end - - sig { params(_: Symbol).returns(Symbol) } - def discount_type=(_) - end - - sig { returns(T.nilable(Time)) } - def end_date - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def end_date=(_) - end - - sig { returns(Time) } - def start_date - end - - sig { params(_: Time).returns(Time) } - def start_date=(_) - end - - sig do - params( - amount_discount: String, - applies_to_price_ids: T::Array[String], - applies_to_price_interval_ids: T::Array[String], - discount_type: Symbol, - end_date: T.nilable(Time), - start_date: Time - ) - .void - end - def initialize( - amount_discount:, - applies_to_price_ids:, - applies_to_price_interval_ids:, - discount_type:, - end_date:, - start_date: - ) - end - - sig do - override - .returns( - { - amount_discount: String, - applies_to_price_ids: T::Array[String], - applies_to_price_interval_ids: T::Array[String], - discount_type: Symbol, - end_date: T.nilable(Time), - start_date: Time - } - ) - end - def to_hash - end - - class DiscountType < Orb::Enum - abstract! - - AMOUNT = :amount - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end -end diff --git a/rbi/lib/orb/models/amount_discount_model.rbi b/rbi/lib/orb/models/amount_discount_model.rbi deleted file mode 100644 index 12a53c42..00000000 --- a/rbi/lib/orb/models/amount_discount_model.rbi +++ /dev/null @@ -1,75 +0,0 @@ -# typed: strong - -module Orb - module Models - class AmountDiscountModel < Orb::BaseModel - sig { returns(String) } - def amount_discount - end - - sig { params(_: String).returns(String) } - def amount_discount=(_) - end - - sig { returns(T::Array[String]) } - def applies_to_price_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_ids=(_) - end - - sig { returns(Symbol) } - def discount_type - end - - sig { params(_: Symbol).returns(Symbol) } - def discount_type=(_) - end - - sig { returns(T.nilable(String)) } - def reason - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reason=(_) - end - - sig do - params( - amount_discount: String, - applies_to_price_ids: T::Array[String], - discount_type: Symbol, - reason: T.nilable(String) - ) - .void - end - def initialize(amount_discount:, applies_to_price_ids:, discount_type:, reason: nil) - end - - sig do - override - .returns( - { - amount_discount: String, - applies_to_price_ids: T::Array[String], - discount_type: Symbol, - reason: T.nilable(String) - } - ) - end - def to_hash - end - - class DiscountType < Orb::Enum - abstract! - - AMOUNT = :amount - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end -end diff --git a/rbi/lib/orb/models/auto_collection_model.rbi b/rbi/lib/orb/models/auto_collection_model.rbi deleted file mode 100644 index f552d9c7..00000000 --- a/rbi/lib/orb/models/auto_collection_model.rbi +++ /dev/null @@ -1,65 +0,0 @@ -# typed: strong - -module Orb - module Models - class AutoCollectionModel < Orb::BaseModel - sig { returns(T.nilable(T::Boolean)) } - def enabled - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def enabled=(_) - end - - sig { returns(T.nilable(Time)) } - def next_attempt_at - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def next_attempt_at=(_) - end - - sig { returns(T.nilable(Integer)) } - def num_attempts - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def num_attempts=(_) - end - - sig { returns(T.nilable(Time)) } - def previously_attempted_at - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def previously_attempted_at=(_) - end - - sig do - params( - enabled: T.nilable(T::Boolean), - next_attempt_at: T.nilable(Time), - num_attempts: T.nilable(Integer), - previously_attempted_at: T.nilable(Time) - ) - .void - end - def initialize(enabled:, next_attempt_at:, num_attempts:, previously_attempted_at:) - end - - sig do - override - .returns( - { - enabled: T.nilable(T::Boolean), - next_attempt_at: T.nilable(Time), - num_attempts: T.nilable(Integer), - previously_attempted_at: T.nilable(Time) - } - ) - end - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/backfill_model.rbi b/rbi/lib/orb/models/backfill_model.rbi deleted file mode 100644 index 0e3f17a4..00000000 --- a/rbi/lib/orb/models/backfill_model.rbi +++ /dev/null @@ -1,160 +0,0 @@ -# typed: strong - -module Orb - module Models - class BackfillModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Time)) } - def close_time - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def close_time=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(String)) } - def customer_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def customer_id=(_) - end - - sig { returns(Integer) } - def events_ingested - end - - sig { params(_: Integer).returns(Integer) } - def events_ingested=(_) - end - - sig { returns(T::Boolean) } - def replace_existing_events - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def replace_existing_events=(_) - end - - sig { returns(T.nilable(Time)) } - def reverted_at - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def reverted_at=(_) - end - - sig { returns(Symbol) } - def status - end - - sig { params(_: Symbol).returns(Symbol) } - def status=(_) - end - - sig { returns(Time) } - def timeframe_end - end - - sig { params(_: Time).returns(Time) } - def timeframe_end=(_) - end - - sig { returns(Time) } - def timeframe_start - end - - sig { params(_: Time).returns(Time) } - def timeframe_start=(_) - end - - sig { returns(T.nilable(String)) } - def deprecation_filter - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def deprecation_filter=(_) - end - - sig do - params( - id: String, - close_time: T.nilable(Time), - created_at: Time, - customer_id: T.nilable(String), - events_ingested: Integer, - replace_existing_events: T::Boolean, - reverted_at: T.nilable(Time), - status: Symbol, - timeframe_end: Time, - timeframe_start: Time, - deprecation_filter: T.nilable(String) - ) - .void - end - def initialize( - id:, - close_time:, - created_at:, - customer_id:, - events_ingested:, - replace_existing_events:, - reverted_at:, - status:, - timeframe_end:, - timeframe_start:, - deprecation_filter: nil - ) - end - - sig do - override - .returns( - { - id: String, - close_time: T.nilable(Time), - created_at: Time, - customer_id: T.nilable(String), - events_ingested: Integer, - replace_existing_events: T::Boolean, - reverted_at: T.nilable(Time), - status: Symbol, - timeframe_end: Time, - timeframe_start: Time, - deprecation_filter: T.nilable(String) - } - ) - end - def to_hash - end - - class Status < Orb::Enum - abstract! - - PENDING = :pending - REFLECTED = :reflected - PENDING_REVERT = :pending_revert - REVERTED = :reverted - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end -end diff --git a/rbi/lib/orb/models/billable_metric.rbi b/rbi/lib/orb/models/billable_metric.rbi index cf1527d9..4dc58f51 100644 --- a/rbi/lib/orb/models/billable_metric.rbi +++ b/rbi/lib/orb/models/billable_metric.rbi @@ -19,11 +19,11 @@ module Orb def description=(_) end - sig { returns(Orb::Models::ItemModel) } + sig { returns(Orb::Models::Item) } def item end - sig { params(_: Orb::Models::ItemModel).returns(Orb::Models::ItemModel) } + sig { params(_: Orb::Models::Item).returns(Orb::Models::Item) } def item=(_) end @@ -55,7 +55,7 @@ module Orb params( id: String, description: T.nilable(String), - item: Orb::Models::ItemModel, + item: Orb::Models::Item, metadata: T::Hash[Symbol, String], name: String, status: Symbol @@ -71,7 +71,7 @@ module Orb { id: String, description: T.nilable(String), - item: Orb::Models::ItemModel, + item: Orb::Models::Item, metadata: T::Hash[Symbol, String], name: String, status: Symbol diff --git a/rbi/lib/orb/models/billable_metric_model.rbi b/rbi/lib/orb/models/billable_metric_model.rbi deleted file mode 100644 index 859d0212..00000000 --- a/rbi/lib/orb/models/billable_metric_model.rbi +++ /dev/null @@ -1,97 +0,0 @@ -# typed: strong - -module Orb - module Models - class BillableMetricModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(String)) } - def description - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def description=(_) - end - - sig { returns(Orb::Models::ItemModel) } - def item - end - - sig { params(_: Orb::Models::ItemModel).returns(Orb::Models::ItemModel) } - def item=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Symbol) } - def status - end - - sig { params(_: Symbol).returns(Symbol) } - def status=(_) - end - - sig do - params( - id: String, - description: T.nilable(String), - item: Orb::Models::ItemModel, - metadata: T::Hash[Symbol, String], - name: String, - status: Symbol - ) - .void - end - def initialize(id:, description:, item:, metadata:, name:, status:) - end - - sig do - override - .returns( - { - id: String, - description: T.nilable(String), - item: Orb::Models::ItemModel, - metadata: T::Hash[Symbol, String], - name: String, - status: Symbol - } - ) - end - def to_hash - end - - class Status < Orb::Enum - abstract! - - ACTIVE = :active - DRAFT = :draft - ARCHIVED = :archived - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end -end diff --git a/rbi/lib/orb/models/billable_metric_simple_model.rbi b/rbi/lib/orb/models/billable_metric_simple_model.rbi deleted file mode 100644 index cf7f24e5..00000000 --- a/rbi/lib/orb/models/billable_metric_simple_model.rbi +++ /dev/null @@ -1,31 +0,0 @@ -# typed: strong - -module Orb - module Models - class BillableMetricSimpleModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { params(id: String, name: String).void } - def initialize(id:, name:) - end - - sig { override.returns({id: String, name: String}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/billable_metric_tiny_model.rbi b/rbi/lib/orb/models/billable_metric_tiny_model.rbi deleted file mode 100644 index 85ef17af..00000000 --- a/rbi/lib/orb/models/billable_metric_tiny_model.rbi +++ /dev/null @@ -1,23 +0,0 @@ -# typed: strong - -module Orb - module Models - class BillableMetricTinyModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { params(id: String).void } - def initialize(id:) - end - - sig { override.returns({id: String}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/billing_cycle_anchor_configuration_model.rbi b/rbi/lib/orb/models/billing_cycle_anchor_configuration_model.rbi deleted file mode 100644 index 3538a652..00000000 --- a/rbi/lib/orb/models/billing_cycle_anchor_configuration_model.rbi +++ /dev/null @@ -1,39 +0,0 @@ -# typed: strong - -module Orb - module Models - class BillingCycleAnchorConfigurationModel < Orb::BaseModel - sig { returns(Integer) } - def day - end - - sig { params(_: Integer).returns(Integer) } - def day=(_) - end - - sig { returns(T.nilable(Integer)) } - def month - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def month=(_) - end - - sig { returns(T.nilable(Integer)) } - def year - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def year=(_) - end - - sig { params(day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)).void } - def initialize(day:, month: nil, year: nil) - end - - sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/billing_cycle_configuration_model.rbi b/rbi/lib/orb/models/billing_cycle_configuration_model.rbi deleted file mode 100644 index e0c58b8d..00000000 --- a/rbi/lib/orb/models/billing_cycle_configuration_model.rbi +++ /dev/null @@ -1,42 +0,0 @@ -# typed: strong - -module Orb - module Models - class BillingCycleConfigurationModel < Orb::BaseModel - sig { returns(Integer) } - def duration - end - - sig { params(_: Integer).returns(Integer) } - def duration=(_) - end - - sig { returns(Symbol) } - def duration_unit - end - - sig { params(_: Symbol).returns(Symbol) } - def duration_unit=(_) - end - - sig { params(duration: Integer, duration_unit: Symbol).void } - def initialize(duration:, duration_unit:) - end - - sig { override.returns({duration: Integer, duration_unit: Symbol}) } - def to_hash - end - - class DurationUnit < Orb::Enum - abstract! - - DAY = :day - MONTH = :month - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end -end diff --git a/rbi/lib/orb/models/bps_config_model.rbi b/rbi/lib/orb/models/bps_config_model.rbi deleted file mode 100644 index 6a4d7e8d..00000000 --- a/rbi/lib/orb/models/bps_config_model.rbi +++ /dev/null @@ -1,31 +0,0 @@ -# typed: strong - -module Orb - module Models - class BpsConfigModel < Orb::BaseModel - sig { returns(Float) } - def bps - end - - sig { params(_: Float).returns(Float) } - def bps=(_) - end - - sig { returns(T.nilable(String)) } - def per_unit_maximum - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def per_unit_maximum=(_) - end - - sig { params(bps: Float, per_unit_maximum: T.nilable(String)).void } - def initialize(bps:, per_unit_maximum: nil) - end - - sig { override.returns({bps: Float, per_unit_maximum: T.nilable(String)}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/bulk_bps_config_model.rbi b/rbi/lib/orb/models/bulk_bps_config_model.rbi deleted file mode 100644 index 36a3fd9c..00000000 --- a/rbi/lib/orb/models/bulk_bps_config_model.rbi +++ /dev/null @@ -1,70 +0,0 @@ -# typed: strong - -module Orb - module Models - class BulkBpsConfigModel < Orb::BaseModel - sig { returns(T::Array[Orb::Models::BulkBpsConfigModel::Tier]) } - def tiers - end - - sig do - params(_: T::Array[Orb::Models::BulkBpsConfigModel::Tier]) - .returns(T::Array[Orb::Models::BulkBpsConfigModel::Tier]) - end - def tiers=(_) - end - - sig { params(tiers: T::Array[Orb::Models::BulkBpsConfigModel::Tier]).void } - def initialize(tiers:) - end - - sig { override.returns({tiers: T::Array[Orb::Models::BulkBpsConfigModel::Tier]}) } - def to_hash - end - - class Tier < Orb::BaseModel - sig { returns(Float) } - def bps - end - - sig { params(_: Float).returns(Float) } - def bps=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T.nilable(String)) } - def per_unit_maximum - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def per_unit_maximum=(_) - end - - sig do - params(bps: Float, maximum_amount: T.nilable(String), per_unit_maximum: T.nilable(String)).void - end - def initialize(bps:, maximum_amount: nil, per_unit_maximum: nil) - end - - sig do - override.returns( - { - bps: Float, - maximum_amount: T.nilable(String), - per_unit_maximum: T.nilable(String) - } - ) - end - def to_hash - end - end - end - end -end diff --git a/rbi/lib/orb/models/bulk_config_model.rbi b/rbi/lib/orb/models/bulk_config_model.rbi deleted file mode 100644 index cc704227..00000000 --- a/rbi/lib/orb/models/bulk_config_model.rbi +++ /dev/null @@ -1,52 +0,0 @@ -# typed: strong - -module Orb - module Models - class BulkConfigModel < Orb::BaseModel - sig { returns(T::Array[Orb::Models::BulkConfigModel::Tier]) } - def tiers - end - - sig do - params(_: T::Array[Orb::Models::BulkConfigModel::Tier]) - .returns(T::Array[Orb::Models::BulkConfigModel::Tier]) - end - def tiers=(_) - end - - sig { params(tiers: T::Array[Orb::Models::BulkConfigModel::Tier]).void } - def initialize(tiers:) - end - - sig { override.returns({tiers: T::Array[Orb::Models::BulkConfigModel::Tier]}) } - def to_hash - end - - class Tier < Orb::BaseModel - sig { returns(String) } - def unit_amount - end - - sig { params(_: String).returns(String) } - def unit_amount=(_) - end - - sig { returns(T.nilable(Float)) } - def maximum_units - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def maximum_units=(_) - end - - sig { params(unit_amount: String, maximum_units: T.nilable(Float)).void } - def initialize(unit_amount:, maximum_units: nil) - end - - sig { override.returns({unit_amount: String, maximum_units: T.nilable(Float)}) } - def to_hash - end - end - end - end -end diff --git a/rbi/lib/orb/models/coupon_model.rbi b/rbi/lib/orb/models/coupon_model.rbi deleted file mode 100644 index 4e3676c0..00000000 --- a/rbi/lib/orb/models/coupon_model.rbi +++ /dev/null @@ -1,114 +0,0 @@ -# typed: strong - -module Orb - module Models - class CouponModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Time)) } - def archived_at - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def archived_at=(_) - end - - sig { returns(T.any(Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount)) } - def discount - end - - sig do - params(_: T.any(Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount)) - .returns(T.any(Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount)) - end - def discount=(_) - end - - sig { returns(T.nilable(Integer)) } - def duration_in_months - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def duration_in_months=(_) - end - - sig { returns(T.nilable(Integer)) } - def max_redemptions - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def max_redemptions=(_) - end - - sig { returns(String) } - def redemption_code - end - - sig { params(_: String).returns(String) } - def redemption_code=(_) - end - - sig { returns(Integer) } - def times_redeemed - end - - sig { params(_: Integer).returns(Integer) } - def times_redeemed=(_) - end - - sig do - params( - id: String, - archived_at: T.nilable(Time), - discount: T.any(Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount), - duration_in_months: T.nilable(Integer), - max_redemptions: T.nilable(Integer), - redemption_code: String, - times_redeemed: Integer - ) - .void - end - def initialize( - id:, - archived_at:, - discount:, - duration_in_months:, - max_redemptions:, - redemption_code:, - times_redeemed: - ) - end - - sig do - override - .returns( - { - id: String, - archived_at: T.nilable(Time), - discount: T.any(Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount), - duration_in_months: T.nilable(Integer), - max_redemptions: T.nilable(Integer), - redemption_code: String, - times_redeemed: Integer - } - ) - end - def to_hash - end - - class Discount < Orb::Union - abstract! - - sig { override.returns([[Symbol, Orb::Models::PercentageDiscount], [Symbol, Orb::Models::AmountDiscount]]) } - private_class_method def self.variants - end - end - end - end -end diff --git a/rbi/lib/orb/models/coupon_redemption_model.rbi b/rbi/lib/orb/models/coupon_redemption_model.rbi deleted file mode 100644 index f4e3de57..00000000 --- a/rbi/lib/orb/models/coupon_redemption_model.rbi +++ /dev/null @@ -1,39 +0,0 @@ -# typed: strong - -module Orb - module Models - class CouponRedemptionModel < Orb::BaseModel - sig { returns(String) } - def coupon_id - end - - sig { params(_: String).returns(String) } - def coupon_id=(_) - end - - sig { returns(T.nilable(Time)) } - def end_date - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def end_date=(_) - end - - sig { returns(Time) } - def start_date - end - - sig { params(_: Time).returns(Time) } - def start_date=(_) - end - - sig { params(coupon_id: String, end_date: T.nilable(Time), start_date: Time).void } - def initialize(coupon_id:, end_date:, start_date:) - end - - sig { override.returns({coupon_id: String, end_date: T.nilable(Time), start_date: Time}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/create_customer_alert_request.rbi b/rbi/lib/orb/models/create_customer_alert_request.rbi index 66d7eae8..51c55ee6 100644 --- a/rbi/lib/orb/models/create_customer_alert_request.rbi +++ b/rbi/lib/orb/models/create_customer_alert_request.rbi @@ -19,24 +19,37 @@ module Orb def type=(_) end - sig { returns(T.nilable(T::Array[Orb::Models::ThresholdModel])) } + sig { returns(T.nilable(T::Array[Orb::Models::CreateCustomerAlertRequest::Threshold])) } def thresholds end sig do - params(_: T.nilable(T::Array[Orb::Models::ThresholdModel])) - .returns(T.nilable(T::Array[Orb::Models::ThresholdModel])) + params(_: T.nilable(T::Array[Orb::Models::CreateCustomerAlertRequest::Threshold])) + .returns(T.nilable(T::Array[Orb::Models::CreateCustomerAlertRequest::Threshold])) end def thresholds=(_) end - sig { params(currency: String, type: Symbol, thresholds: T.nilable(T::Array[Orb::Models::ThresholdModel])).void } + sig do + params( + currency: String, + type: Symbol, + thresholds: T.nilable(T::Array[Orb::Models::CreateCustomerAlertRequest::Threshold]) + ) + .void + end def initialize(currency:, type:, thresholds: nil) end sig do override - .returns({currency: String, type: Symbol, thresholds: T.nilable(T::Array[Orb::Models::ThresholdModel])}) + .returns( + { + currency: String, + type: Symbol, + thresholds: T.nilable(T::Array[Orb::Models::CreateCustomerAlertRequest::Threshold]) + } + ) end def to_hash end @@ -54,6 +67,24 @@ module Orb def self.values end end + + class Threshold < Orb::BaseModel + sig { returns(Float) } + def value + end + + sig { params(_: Float).returns(Float) } + def value=(_) + end + + sig { params(value: Float).void } + def initialize(value:) + end + + sig { override.returns({value: Float}) } + def to_hash + end + end end end end diff --git a/rbi/lib/orb/models/credit_ledger_entries_model.rbi b/rbi/lib/orb/models/credit_ledger_entries_model.rbi deleted file mode 100644 index c17e4b9b..00000000 --- a/rbi/lib/orb/models/credit_ledger_entries_model.rbi +++ /dev/null @@ -1,106 +0,0 @@ -# typed: strong - -module Orb - module Models - class CreditLedgerEntriesModel < Orb::BaseModel - sig do - returns( - T::Array[ - T.any( - Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry, - Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry, - Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry, - Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry, - Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry, - Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry, - Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry - ) - ] - ) - end - def data - end - - sig do - params( - _: T::Array[ - T.any( - Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry, - Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry, - Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry, - Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry, - Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry, - Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry, - Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry - ) - ] - ) - .returns( - T::Array[ - T.any( - Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry, - Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry, - Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry, - Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry, - Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry, - Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry, - Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry - ) - ] - ) - end - def data=(_) - end - - sig { returns(Orb::Models::PaginationMetadata) } - def pagination_metadata - end - - sig { params(_: Orb::Models::PaginationMetadata).returns(Orb::Models::PaginationMetadata) } - def pagination_metadata=(_) - end - - sig do - params( - data: T::Array[ - T.any( - Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry, - Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry, - Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry, - Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry, - Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry, - Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry, - Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry - ) - ], - pagination_metadata: Orb::Models::PaginationMetadata - ) - .void - end - def initialize(data:, pagination_metadata:) - end - - sig do - override - .returns( - { - data: T::Array[ - T.any( - Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry, - Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry, - Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry, - Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry, - Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry, - Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry, - Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry - ) - ], - pagination_metadata: Orb::Models::PaginationMetadata - } - ) - end - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/credit_ledger_entry_model.rbi b/rbi/lib/orb/models/credit_ledger_entry_model.rbi deleted file mode 100644 index 4b14dc7e..00000000 --- a/rbi/lib/orb/models/credit_ledger_entry_model.rbi +++ /dev/null @@ -1,1342 +0,0 @@ -# typed: strong - -module Orb - module Models - class CreditLedgerEntryModel < Orb::Union - abstract! - - class IncrementLedgerEntry < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(Float) } - def amount - end - - sig { params(_: Float).returns(Float) } - def amount=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(Orb::Models::AffectedBlockModel) } - def credit_block - end - - sig { params(_: Orb::Models::AffectedBlockModel).returns(Orb::Models::AffectedBlockModel) } - def credit_block=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(Orb::Models::CustomerMinifiedModel) } - def customer - end - - sig { params(_: Orb::Models::CustomerMinifiedModel).returns(Orb::Models::CustomerMinifiedModel) } - def customer=(_) - end - - sig { returns(T.nilable(String)) } - def description - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def description=(_) - end - - sig { returns(Float) } - def ending_balance - end - - sig { params(_: Float).returns(Float) } - def ending_balance=(_) - end - - sig { returns(Symbol) } - def entry_status - end - - sig { params(_: Symbol).returns(Symbol) } - def entry_status=(_) - end - - sig { returns(Symbol) } - def entry_type - end - - sig { params(_: Symbol).returns(Symbol) } - def entry_type=(_) - end - - sig { returns(Integer) } - def ledger_sequence_number - end - - sig { params(_: Integer).returns(Integer) } - def ledger_sequence_number=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(Float) } - def starting_balance - end - - sig { params(_: Float).returns(Float) } - def starting_balance=(_) - end - - sig do - params( - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: T.nilable(String), - ending_balance: Float, - entry_status: Symbol, - ledger_sequence_number: Integer, - metadata: T::Hash[Symbol, String], - starting_balance: Float, - entry_type: Symbol - ) - .void - end - def initialize( - id:, - amount:, - created_at:, - credit_block:, - currency:, - customer:, - description:, - ending_balance:, - entry_status:, - ledger_sequence_number:, - metadata:, - starting_balance:, - entry_type: :increment - ) - end - - sig do - override - .returns( - { - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: T.nilable(String), - ending_balance: Float, - entry_status: Symbol, - entry_type: Symbol, - ledger_sequence_number: Integer, - metadata: T::Hash[Symbol, String], - starting_balance: Float - } - ) - end - def to_hash - end - - class EntryStatus < Orb::Enum - abstract! - - COMMITTED = :committed - PENDING = :pending - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class DecrementLedgerEntry < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(Float) } - def amount - end - - sig { params(_: Float).returns(Float) } - def amount=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(Orb::Models::AffectedBlockModel) } - def credit_block - end - - sig { params(_: Orb::Models::AffectedBlockModel).returns(Orb::Models::AffectedBlockModel) } - def credit_block=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(Orb::Models::CustomerMinifiedModel) } - def customer - end - - sig { params(_: Orb::Models::CustomerMinifiedModel).returns(Orb::Models::CustomerMinifiedModel) } - def customer=(_) - end - - sig { returns(T.nilable(String)) } - def description - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def description=(_) - end - - sig { returns(Float) } - def ending_balance - end - - sig { params(_: Float).returns(Float) } - def ending_balance=(_) - end - - sig { returns(Symbol) } - def entry_status - end - - sig { params(_: Symbol).returns(Symbol) } - def entry_status=(_) - end - - sig { returns(Symbol) } - def entry_type - end - - sig { params(_: Symbol).returns(Symbol) } - def entry_type=(_) - end - - sig { returns(Integer) } - def ledger_sequence_number - end - - sig { params(_: Integer).returns(Integer) } - def ledger_sequence_number=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(Float) } - def starting_balance - end - - sig { params(_: Float).returns(Float) } - def starting_balance=(_) - end - - sig { returns(T.nilable(String)) } - def event_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def event_id=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_id=(_) - end - - sig { returns(T.nilable(String)) } - def price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def price_id=(_) - end - - sig do - params( - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: T.nilable(String), - ending_balance: Float, - entry_status: Symbol, - ledger_sequence_number: Integer, - metadata: T::Hash[Symbol, String], - starting_balance: Float, - event_id: T.nilable(String), - invoice_id: T.nilable(String), - price_id: T.nilable(String), - entry_type: Symbol - ) - .void - end - def initialize( - id:, - amount:, - created_at:, - credit_block:, - currency:, - customer:, - description:, - ending_balance:, - entry_status:, - ledger_sequence_number:, - metadata:, - starting_balance:, - event_id: nil, - invoice_id: nil, - price_id: nil, - entry_type: :decrement - ) - end - - sig do - override - .returns( - { - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: T.nilable(String), - ending_balance: Float, - entry_status: Symbol, - entry_type: Symbol, - ledger_sequence_number: Integer, - metadata: T::Hash[Symbol, String], - starting_balance: Float, - event_id: T.nilable(String), - invoice_id: T.nilable(String), - price_id: T.nilable(String) - } - ) - end - def to_hash - end - - class EntryStatus < Orb::Enum - abstract! - - COMMITTED = :committed - PENDING = :pending - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class ExpirationChangeLedgerEntry < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(Float) } - def amount - end - - sig { params(_: Float).returns(Float) } - def amount=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(Orb::Models::AffectedBlockModel) } - def credit_block - end - - sig { params(_: Orb::Models::AffectedBlockModel).returns(Orb::Models::AffectedBlockModel) } - def credit_block=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(Orb::Models::CustomerMinifiedModel) } - def customer - end - - sig { params(_: Orb::Models::CustomerMinifiedModel).returns(Orb::Models::CustomerMinifiedModel) } - def customer=(_) - end - - sig { returns(T.nilable(String)) } - def description - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def description=(_) - end - - sig { returns(Float) } - def ending_balance - end - - sig { params(_: Float).returns(Float) } - def ending_balance=(_) - end - - sig { returns(Symbol) } - def entry_status - end - - sig { params(_: Symbol).returns(Symbol) } - def entry_status=(_) - end - - sig { returns(Symbol) } - def entry_type - end - - sig { params(_: Symbol).returns(Symbol) } - def entry_type=(_) - end - - sig { returns(Integer) } - def ledger_sequence_number - end - - sig { params(_: Integer).returns(Integer) } - def ledger_sequence_number=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Time)) } - def new_block_expiry_date - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def new_block_expiry_date=(_) - end - - sig { returns(Float) } - def starting_balance - end - - sig { params(_: Float).returns(Float) } - def starting_balance=(_) - end - - sig do - params( - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: T.nilable(String), - ending_balance: Float, - entry_status: Symbol, - ledger_sequence_number: Integer, - metadata: T::Hash[Symbol, String], - new_block_expiry_date: T.nilable(Time), - starting_balance: Float, - entry_type: Symbol - ) - .void - end - def initialize( - id:, - amount:, - created_at:, - credit_block:, - currency:, - customer:, - description:, - ending_balance:, - entry_status:, - ledger_sequence_number:, - metadata:, - new_block_expiry_date:, - starting_balance:, - entry_type: :expiration_change - ) - end - - sig do - override - .returns( - { - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: T.nilable(String), - ending_balance: Float, - entry_status: Symbol, - entry_type: Symbol, - ledger_sequence_number: Integer, - metadata: T::Hash[Symbol, String], - new_block_expiry_date: T.nilable(Time), - starting_balance: Float - } - ) - end - def to_hash - end - - class EntryStatus < Orb::Enum - abstract! - - COMMITTED = :committed - PENDING = :pending - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class CreditBlockExpiryLedgerEntry < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(Float) } - def amount - end - - sig { params(_: Float).returns(Float) } - def amount=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(Orb::Models::AffectedBlockModel) } - def credit_block - end - - sig { params(_: Orb::Models::AffectedBlockModel).returns(Orb::Models::AffectedBlockModel) } - def credit_block=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(Orb::Models::CustomerMinifiedModel) } - def customer - end - - sig { params(_: Orb::Models::CustomerMinifiedModel).returns(Orb::Models::CustomerMinifiedModel) } - def customer=(_) - end - - sig { returns(T.nilable(String)) } - def description - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def description=(_) - end - - sig { returns(Float) } - def ending_balance - end - - sig { params(_: Float).returns(Float) } - def ending_balance=(_) - end - - sig { returns(Symbol) } - def entry_status - end - - sig { params(_: Symbol).returns(Symbol) } - def entry_status=(_) - end - - sig { returns(Symbol) } - def entry_type - end - - sig { params(_: Symbol).returns(Symbol) } - def entry_type=(_) - end - - sig { returns(Integer) } - def ledger_sequence_number - end - - sig { params(_: Integer).returns(Integer) } - def ledger_sequence_number=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(Float) } - def starting_balance - end - - sig { params(_: Float).returns(Float) } - def starting_balance=(_) - end - - sig do - params( - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: T.nilable(String), - ending_balance: Float, - entry_status: Symbol, - ledger_sequence_number: Integer, - metadata: T::Hash[Symbol, String], - starting_balance: Float, - entry_type: Symbol - ) - .void - end - def initialize( - id:, - amount:, - created_at:, - credit_block:, - currency:, - customer:, - description:, - ending_balance:, - entry_status:, - ledger_sequence_number:, - metadata:, - starting_balance:, - entry_type: :credit_block_expiry - ) - end - - sig do - override - .returns( - { - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: T.nilable(String), - ending_balance: Float, - entry_status: Symbol, - entry_type: Symbol, - ledger_sequence_number: Integer, - metadata: T::Hash[Symbol, String], - starting_balance: Float - } - ) - end - def to_hash - end - - class EntryStatus < Orb::Enum - abstract! - - COMMITTED = :committed - PENDING = :pending - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class VoidLedgerEntry < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(Float) } - def amount - end - - sig { params(_: Float).returns(Float) } - def amount=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(Orb::Models::AffectedBlockModel) } - def credit_block - end - - sig { params(_: Orb::Models::AffectedBlockModel).returns(Orb::Models::AffectedBlockModel) } - def credit_block=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(Orb::Models::CustomerMinifiedModel) } - def customer - end - - sig { params(_: Orb::Models::CustomerMinifiedModel).returns(Orb::Models::CustomerMinifiedModel) } - def customer=(_) - end - - sig { returns(T.nilable(String)) } - def description - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def description=(_) - end - - sig { returns(Float) } - def ending_balance - end - - sig { params(_: Float).returns(Float) } - def ending_balance=(_) - end - - sig { returns(Symbol) } - def entry_status - end - - sig { params(_: Symbol).returns(Symbol) } - def entry_status=(_) - end - - sig { returns(Symbol) } - def entry_type - end - - sig { params(_: Symbol).returns(Symbol) } - def entry_type=(_) - end - - sig { returns(Integer) } - def ledger_sequence_number - end - - sig { params(_: Integer).returns(Integer) } - def ledger_sequence_number=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(Float) } - def starting_balance - end - - sig { params(_: Float).returns(Float) } - def starting_balance=(_) - end - - sig { returns(Float) } - def void_amount - end - - sig { params(_: Float).returns(Float) } - def void_amount=(_) - end - - sig { returns(T.nilable(String)) } - def void_reason - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def void_reason=(_) - end - - sig do - params( - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: T.nilable(String), - ending_balance: Float, - entry_status: Symbol, - ledger_sequence_number: Integer, - metadata: T::Hash[Symbol, String], - starting_balance: Float, - void_amount: Float, - void_reason: T.nilable(String), - entry_type: Symbol - ) - .void - end - def initialize( - id:, - amount:, - created_at:, - credit_block:, - currency:, - customer:, - description:, - ending_balance:, - entry_status:, - ledger_sequence_number:, - metadata:, - starting_balance:, - void_amount:, - void_reason:, - entry_type: :void - ) - end - - sig do - override - .returns( - { - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: T.nilable(String), - ending_balance: Float, - entry_status: Symbol, - entry_type: Symbol, - ledger_sequence_number: Integer, - metadata: T::Hash[Symbol, String], - starting_balance: Float, - void_amount: Float, - void_reason: T.nilable(String) - } - ) - end - def to_hash - end - - class EntryStatus < Orb::Enum - abstract! - - COMMITTED = :committed - PENDING = :pending - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class VoidInitiatedLedgerEntry < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(Float) } - def amount - end - - sig { params(_: Float).returns(Float) } - def amount=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(Orb::Models::AffectedBlockModel) } - def credit_block - end - - sig { params(_: Orb::Models::AffectedBlockModel).returns(Orb::Models::AffectedBlockModel) } - def credit_block=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(Orb::Models::CustomerMinifiedModel) } - def customer - end - - sig { params(_: Orb::Models::CustomerMinifiedModel).returns(Orb::Models::CustomerMinifiedModel) } - def customer=(_) - end - - sig { returns(T.nilable(String)) } - def description - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def description=(_) - end - - sig { returns(Float) } - def ending_balance - end - - sig { params(_: Float).returns(Float) } - def ending_balance=(_) - end - - sig { returns(Symbol) } - def entry_status - end - - sig { params(_: Symbol).returns(Symbol) } - def entry_status=(_) - end - - sig { returns(Symbol) } - def entry_type - end - - sig { params(_: Symbol).returns(Symbol) } - def entry_type=(_) - end - - sig { returns(Integer) } - def ledger_sequence_number - end - - sig { params(_: Integer).returns(Integer) } - def ledger_sequence_number=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(Time) } - def new_block_expiry_date - end - - sig { params(_: Time).returns(Time) } - def new_block_expiry_date=(_) - end - - sig { returns(Float) } - def starting_balance - end - - sig { params(_: Float).returns(Float) } - def starting_balance=(_) - end - - sig { returns(Float) } - def void_amount - end - - sig { params(_: Float).returns(Float) } - def void_amount=(_) - end - - sig { returns(T.nilable(String)) } - def void_reason - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def void_reason=(_) - end - - sig do - params( - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: T.nilable(String), - ending_balance: Float, - entry_status: Symbol, - ledger_sequence_number: Integer, - metadata: T::Hash[Symbol, String], - new_block_expiry_date: Time, - starting_balance: Float, - void_amount: Float, - void_reason: T.nilable(String), - entry_type: Symbol - ) - .void - end - def initialize( - id:, - amount:, - created_at:, - credit_block:, - currency:, - customer:, - description:, - ending_balance:, - entry_status:, - ledger_sequence_number:, - metadata:, - new_block_expiry_date:, - starting_balance:, - void_amount:, - void_reason:, - entry_type: :void_initiated - ) - end - - sig do - override - .returns( - { - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: T.nilable(String), - ending_balance: Float, - entry_status: Symbol, - entry_type: Symbol, - ledger_sequence_number: Integer, - metadata: T::Hash[Symbol, String], - new_block_expiry_date: Time, - starting_balance: Float, - void_amount: Float, - void_reason: T.nilable(String) - } - ) - end - def to_hash - end - - class EntryStatus < Orb::Enum - abstract! - - COMMITTED = :committed - PENDING = :pending - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class AmendmentLedgerEntry < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(Float) } - def amount - end - - sig { params(_: Float).returns(Float) } - def amount=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(Orb::Models::AffectedBlockModel) } - def credit_block - end - - sig { params(_: Orb::Models::AffectedBlockModel).returns(Orb::Models::AffectedBlockModel) } - def credit_block=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(Orb::Models::CustomerMinifiedModel) } - def customer - end - - sig { params(_: Orb::Models::CustomerMinifiedModel).returns(Orb::Models::CustomerMinifiedModel) } - def customer=(_) - end - - sig { returns(T.nilable(String)) } - def description - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def description=(_) - end - - sig { returns(Float) } - def ending_balance - end - - sig { params(_: Float).returns(Float) } - def ending_balance=(_) - end - - sig { returns(Symbol) } - def entry_status - end - - sig { params(_: Symbol).returns(Symbol) } - def entry_status=(_) - end - - sig { returns(Symbol) } - def entry_type - end - - sig { params(_: Symbol).returns(Symbol) } - def entry_type=(_) - end - - sig { returns(Integer) } - def ledger_sequence_number - end - - sig { params(_: Integer).returns(Integer) } - def ledger_sequence_number=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(Float) } - def starting_balance - end - - sig { params(_: Float).returns(Float) } - def starting_balance=(_) - end - - sig do - params( - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: T.nilable(String), - ending_balance: Float, - entry_status: Symbol, - ledger_sequence_number: Integer, - metadata: T::Hash[Symbol, String], - starting_balance: Float, - entry_type: Symbol - ) - .void - end - def initialize( - id:, - amount:, - created_at:, - credit_block:, - currency:, - customer:, - description:, - ending_balance:, - entry_status:, - ledger_sequence_number:, - metadata:, - starting_balance:, - entry_type: :amendment - ) - end - - sig do - override - .returns( - { - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: T.nilable(String), - ending_balance: Float, - entry_status: Symbol, - entry_type: Symbol, - ledger_sequence_number: Integer, - metadata: T::Hash[Symbol, String], - starting_balance: Float - } - ) - end - def to_hash - end - - class EntryStatus < Orb::Enum - abstract! - - COMMITTED = :committed - PENDING = :pending - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - sig do - override - .returns( - [[Symbol, Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry], [Symbol, Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry], [Symbol, Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry], [Symbol, Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry], [Symbol, Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry], [Symbol, Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry], [Symbol, Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry]] - ) - end - private_class_method def self.variants - end - end - end -end diff --git a/rbi/lib/orb/models/credit_note.rbi b/rbi/lib/orb/models/credit_note.rbi index d918478e..f643a80c 100644 --- a/rbi/lib/orb/models/credit_note.rbi +++ b/rbi/lib/orb/models/credit_note.rbi @@ -35,11 +35,11 @@ module Orb def credit_note_pdf=(_) end - sig { returns(Orb::Models::CustomerMinifiedModel) } + sig { returns(Orb::Models::CreditNote::Customer) } def customer end - sig { params(_: Orb::Models::CustomerMinifiedModel).returns(Orb::Models::CustomerMinifiedModel) } + sig { params(_: Orb::Models::CreditNote::Customer).returns(Orb::Models::CreditNote::Customer) } def customer=(_) end @@ -61,13 +61,13 @@ module Orb def line_items=(_) end - sig { returns(T.nilable(Orb::Models::CreditNoteDiscountModel)) } + sig { returns(T.nilable(Orb::Models::CreditNote::MaximumAmountAdjustment)) } def maximum_amount_adjustment end sig do - params(_: T.nilable(Orb::Models::CreditNoteDiscountModel)) - .returns(T.nilable(Orb::Models::CreditNoteDiscountModel)) + params(_: T.nilable(Orb::Models::CreditNote::MaximumAmountAdjustment)) + .returns(T.nilable(Orb::Models::CreditNote::MaximumAmountAdjustment)) end def maximum_amount_adjustment=(_) end @@ -128,13 +128,12 @@ module Orb def voided_at=(_) end - sig { returns(T.nilable(T::Array[Orb::Models::CreditNoteDiscountModel])) } + sig { returns(T.nilable(T::Array[Orb::Models::CreditNote::Discount])) } def discounts end sig do - params(_: T::Array[Orb::Models::CreditNoteDiscountModel]) - .returns(T::Array[Orb::Models::CreditNoteDiscountModel]) + params(_: T::Array[Orb::Models::CreditNote::Discount]).returns(T::Array[Orb::Models::CreditNote::Discount]) end def discounts=(_) end @@ -145,10 +144,10 @@ module Orb created_at: Time, credit_note_number: String, credit_note_pdf: T.nilable(String), - customer: Orb::Models::CustomerMinifiedModel, + customer: Orb::Models::CreditNote::Customer, invoice_id: String, line_items: T::Array[Orb::Models::CreditNote::LineItem], - maximum_amount_adjustment: T.nilable(Orb::Models::CreditNoteDiscountModel), + maximum_amount_adjustment: T.nilable(Orb::Models::CreditNote::MaximumAmountAdjustment), memo: T.nilable(String), minimum_amount_refunded: T.nilable(String), reason: T.nilable(Symbol), @@ -156,7 +155,7 @@ module Orb total: String, type: Symbol, voided_at: T.nilable(Time), - discounts: T::Array[Orb::Models::CreditNoteDiscountModel] + discounts: T::Array[Orb::Models::CreditNote::Discount] ) .void end @@ -188,10 +187,10 @@ module Orb created_at: Time, credit_note_number: String, credit_note_pdf: T.nilable(String), - customer: Orb::Models::CustomerMinifiedModel, + customer: Orb::Models::CreditNote::Customer, invoice_id: String, line_items: T::Array[Orb::Models::CreditNote::LineItem], - maximum_amount_adjustment: T.nilable(Orb::Models::CreditNoteDiscountModel), + maximum_amount_adjustment: T.nilable(Orb::Models::CreditNote::MaximumAmountAdjustment), memo: T.nilable(String), minimum_amount_refunded: T.nilable(String), reason: T.nilable(Symbol), @@ -199,13 +198,39 @@ module Orb total: String, type: Symbol, voided_at: T.nilable(Time), - discounts: T::Array[Orb::Models::CreditNoteDiscountModel] + discounts: T::Array[Orb::Models::CreditNote::Discount] } ) end def to_hash end + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + class LineItem < Orb::BaseModel sig { returns(String) } def id @@ -255,11 +280,14 @@ module Orb def subtotal=(_) end - sig { returns(T::Array[Orb::Models::TaxAmountModel]) } + sig { returns(T::Array[Orb::Models::CreditNote::LineItem::TaxAmount]) } def tax_amounts end - sig { params(_: T::Array[Orb::Models::TaxAmountModel]).returns(T::Array[Orb::Models::TaxAmountModel]) } + sig do + params(_: T::Array[Orb::Models::CreditNote::LineItem::TaxAmount]) + .returns(T::Array[Orb::Models::CreditNote::LineItem::TaxAmount]) + end def tax_amounts=(_) end @@ -282,7 +310,7 @@ module Orb name: String, quantity: T.nilable(Float), subtotal: String, - tax_amounts: T::Array[Orb::Models::TaxAmountModel], + tax_amounts: T::Array[Orb::Models::CreditNote::LineItem::TaxAmount], discounts: T::Array[Orb::Models::CreditNote::LineItem::Discount] ) .void @@ -300,7 +328,7 @@ module Orb name: String, quantity: T.nilable(Float), subtotal: String, - tax_amounts: T::Array[Orb::Models::TaxAmountModel], + tax_amounts: T::Array[Orb::Models::CreditNote::LineItem::TaxAmount], discounts: T::Array[Orb::Models::CreditNote::LineItem::Discount] } ) @@ -308,6 +336,50 @@ module Orb def to_hash end + class TaxAmount < Orb::BaseModel + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(String) } + def tax_rate_description + end + + sig { params(_: String).returns(String) } + def tax_rate_description=(_) + end + + sig { returns(T.nilable(String)) } + def tax_rate_percentage + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def tax_rate_percentage=(_) + end + + sig do + params(amount: String, tax_rate_description: String, tax_rate_percentage: T.nilable(String)).void + end + def initialize(amount:, tax_rate_description:, tax_rate_percentage:) + end + + sig do + override.returns( + { + amount: String, + tax_rate_description: String, + tax_rate_percentage: T.nilable(String) + } + ) + end + def to_hash + end + end + class Discount < Orb::BaseModel sig { returns(String) } def id @@ -418,6 +490,121 @@ module Orb end end + class MaximumAmountAdjustment < Orb::BaseModel + sig { returns(String) } + def amount_applied + end + + sig { params(_: String).returns(String) } + def amount_applied=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(T.nilable(T::Array[Orb::Models::CreditNote::MaximumAmountAdjustment::AppliesToPrice])) } + def applies_to_prices + end + + sig do + params(_: T.nilable(T::Array[Orb::Models::CreditNote::MaximumAmountAdjustment::AppliesToPrice])) + .returns(T.nilable(T::Array[Orb::Models::CreditNote::MaximumAmountAdjustment::AppliesToPrice])) + end + def applies_to_prices=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + amount_applied: String, + discount_type: Symbol, + percentage_discount: Float, + applies_to_prices: T.nilable(T::Array[Orb::Models::CreditNote::MaximumAmountAdjustment::AppliesToPrice]), + reason: T.nilable(String) + ) + .void + end + def initialize( + amount_applied:, + discount_type:, + percentage_discount:, + applies_to_prices: nil, + reason: nil + ) + end + + sig do + override + .returns( + { + amount_applied: String, + discount_type: Symbol, + percentage_discount: Float, + applies_to_prices: T.nilable(T::Array[Orb::Models::CreditNote::MaximumAmountAdjustment::AppliesToPrice]), + reason: T.nilable(String) + } + ) + end + def to_hash + end + + class DiscountType < Orb::Enum + abstract! + + PERCENTAGE = :percentage + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class AppliesToPrice < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + end + class Reason < Orb::Enum abstract! @@ -441,6 +628,121 @@ module Orb def self.values end end + + class Discount < Orb::BaseModel + sig { returns(String) } + def amount_applied + end + + sig { params(_: String).returns(String) } + def amount_applied=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(T.nilable(T::Array[Orb::Models::CreditNote::Discount::AppliesToPrice])) } + def applies_to_prices + end + + sig do + params(_: T.nilable(T::Array[Orb::Models::CreditNote::Discount::AppliesToPrice])) + .returns(T.nilable(T::Array[Orb::Models::CreditNote::Discount::AppliesToPrice])) + end + def applies_to_prices=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + amount_applied: String, + discount_type: Symbol, + percentage_discount: Float, + applies_to_prices: T.nilable(T::Array[Orb::Models::CreditNote::Discount::AppliesToPrice]), + reason: T.nilable(String) + ) + .void + end + def initialize( + amount_applied:, + discount_type:, + percentage_discount:, + applies_to_prices: nil, + reason: nil + ) + end + + sig do + override + .returns( + { + amount_applied: String, + discount_type: Symbol, + percentage_discount: Float, + applies_to_prices: T.nilable(T::Array[Orb::Models::CreditNote::Discount::AppliesToPrice]), + reason: T.nilable(String) + } + ) + end + def to_hash + end + + class DiscountType < Orb::Enum + abstract! + + PERCENTAGE = :percentage + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class AppliesToPrice < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + end end end end diff --git a/rbi/lib/orb/models/credit_note_discount_model.rbi b/rbi/lib/orb/models/credit_note_discount_model.rbi deleted file mode 100644 index 9f8130a8..00000000 --- a/rbi/lib/orb/models/credit_note_discount_model.rbi +++ /dev/null @@ -1,120 +0,0 @@ -# typed: strong - -module Orb - module Models - class CreditNoteDiscountModel < Orb::BaseModel - sig { returns(String) } - def amount_applied - end - - sig { params(_: String).returns(String) } - def amount_applied=(_) - end - - sig { returns(Symbol) } - def discount_type - end - - sig { params(_: Symbol).returns(Symbol) } - def discount_type=(_) - end - - sig { returns(Float) } - def percentage_discount - end - - sig { params(_: Float).returns(Float) } - def percentage_discount=(_) - end - - sig { returns(T.nilable(T::Array[Orb::Models::CreditNoteDiscountModel::AppliesToPrice])) } - def applies_to_prices - end - - sig do - params(_: T.nilable(T::Array[Orb::Models::CreditNoteDiscountModel::AppliesToPrice])) - .returns(T.nilable(T::Array[Orb::Models::CreditNoteDiscountModel::AppliesToPrice])) - end - def applies_to_prices=(_) - end - - sig { returns(T.nilable(String)) } - def reason - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reason=(_) - end - - sig do - params( - amount_applied: String, - discount_type: Symbol, - percentage_discount: Float, - applies_to_prices: T.nilable(T::Array[Orb::Models::CreditNoteDiscountModel::AppliesToPrice]), - reason: T.nilable(String) - ) - .void - end - def initialize( - amount_applied:, - discount_type:, - percentage_discount:, - applies_to_prices: nil, - reason: nil - ) - end - - sig do - override - .returns( - { - amount_applied: String, - discount_type: Symbol, - percentage_discount: Float, - applies_to_prices: T.nilable(T::Array[Orb::Models::CreditNoteDiscountModel::AppliesToPrice]), - reason: T.nilable(String) - } - ) - end - def to_hash - end - - class DiscountType < Orb::Enum - abstract! - - PERCENTAGE = :percentage - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class AppliesToPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { params(id: String, name: String).void } - def initialize(id:, name:) - end - - sig { override.returns({id: String, name: String}) } - def to_hash - end - end - end - end -end diff --git a/rbi/lib/orb/models/credit_note_model.rbi b/rbi/lib/orb/models/credit_note_model.rbi deleted file mode 100644 index 6976757f..00000000 --- a/rbi/lib/orb/models/credit_note_model.rbi +++ /dev/null @@ -1,447 +0,0 @@ -# typed: strong - -module Orb - module Models - class CreditNoteModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(String) } - def credit_note_number - end - - sig { params(_: String).returns(String) } - def credit_note_number=(_) - end - - sig { returns(T.nilable(String)) } - def credit_note_pdf - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def credit_note_pdf=(_) - end - - sig { returns(Orb::Models::CustomerMinifiedModel) } - def customer - end - - sig { params(_: Orb::Models::CustomerMinifiedModel).returns(Orb::Models::CustomerMinifiedModel) } - def customer=(_) - end - - sig { returns(String) } - def invoice_id - end - - sig { params(_: String).returns(String) } - def invoice_id=(_) - end - - sig { returns(T::Array[Orb::Models::CreditNoteModel::LineItem]) } - def line_items - end - - sig do - params(_: T::Array[Orb::Models::CreditNoteModel::LineItem]) - .returns(T::Array[Orb::Models::CreditNoteModel::LineItem]) - end - def line_items=(_) - end - - sig { returns(T.nilable(Orb::Models::CreditNoteDiscountModel)) } - def maximum_amount_adjustment - end - - sig do - params(_: T.nilable(Orb::Models::CreditNoteDiscountModel)) - .returns(T.nilable(Orb::Models::CreditNoteDiscountModel)) - end - def maximum_amount_adjustment=(_) - end - - sig { returns(T.nilable(String)) } - def memo - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def memo=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount_refunded - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount_refunded=(_) - end - - sig { returns(T.nilable(Symbol)) } - def reason - end - - sig { params(_: T.nilable(Symbol)).returns(T.nilable(Symbol)) } - def reason=(_) - end - - sig { returns(String) } - def subtotal - end - - sig { params(_: String).returns(String) } - def subtotal=(_) - end - - sig { returns(String) } - def total - end - - sig { params(_: String).returns(String) } - def total=(_) - end - - sig { returns(Symbol) } - def type - end - - sig { params(_: Symbol).returns(Symbol) } - def type=(_) - end - - sig { returns(T.nilable(Time)) } - def voided_at - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def voided_at=(_) - end - - sig { returns(T.nilable(T::Array[Orb::Models::CreditNoteDiscountModel])) } - def discounts - end - - sig do - params(_: T::Array[Orb::Models::CreditNoteDiscountModel]) - .returns(T::Array[Orb::Models::CreditNoteDiscountModel]) - end - def discounts=(_) - end - - sig do - params( - id: String, - created_at: Time, - credit_note_number: String, - credit_note_pdf: T.nilable(String), - customer: Orb::Models::CustomerMinifiedModel, - invoice_id: String, - line_items: T::Array[Orb::Models::CreditNoteModel::LineItem], - maximum_amount_adjustment: T.nilable(Orb::Models::CreditNoteDiscountModel), - memo: T.nilable(String), - minimum_amount_refunded: T.nilable(String), - reason: T.nilable(Symbol), - subtotal: String, - total: String, - type: Symbol, - voided_at: T.nilable(Time), - discounts: T::Array[Orb::Models::CreditNoteDiscountModel] - ) - .void - end - def initialize( - id:, - created_at:, - credit_note_number:, - credit_note_pdf:, - customer:, - invoice_id:, - line_items:, - maximum_amount_adjustment:, - memo:, - minimum_amount_refunded:, - reason:, - subtotal:, - total:, - type:, - voided_at:, - discounts: nil - ) - end - - sig do - override - .returns( - { - id: String, - created_at: Time, - credit_note_number: String, - credit_note_pdf: T.nilable(String), - customer: Orb::Models::CustomerMinifiedModel, - invoice_id: String, - line_items: T::Array[Orb::Models::CreditNoteModel::LineItem], - maximum_amount_adjustment: T.nilable(Orb::Models::CreditNoteDiscountModel), - memo: T.nilable(String), - minimum_amount_refunded: T.nilable(String), - reason: T.nilable(Symbol), - subtotal: String, - total: String, - type: Symbol, - voided_at: T.nilable(Time), - discounts: T::Array[Orb::Models::CreditNoteDiscountModel] - } - ) - end - def to_hash - end - - class LineItem < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(String) } - def amount - end - - sig { params(_: String).returns(String) } - def amount=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Float)) } - def quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def quantity=(_) - end - - sig { returns(String) } - def subtotal - end - - sig { params(_: String).returns(String) } - def subtotal=(_) - end - - sig { returns(T::Array[Orb::Models::TaxAmountModel]) } - def tax_amounts - end - - sig { params(_: T::Array[Orb::Models::TaxAmountModel]).returns(T::Array[Orb::Models::TaxAmountModel]) } - def tax_amounts=(_) - end - - sig { returns(T.nilable(T::Array[Orb::Models::CreditNoteModel::LineItem::Discount])) } - def discounts - end - - sig do - params(_: T::Array[Orb::Models::CreditNoteModel::LineItem::Discount]) - .returns(T::Array[Orb::Models::CreditNoteModel::LineItem::Discount]) - end - def discounts=(_) - end - - sig do - params( - id: String, - amount: String, - item_id: String, - name: String, - quantity: T.nilable(Float), - subtotal: String, - tax_amounts: T::Array[Orb::Models::TaxAmountModel], - discounts: T::Array[Orb::Models::CreditNoteModel::LineItem::Discount] - ) - .void - end - def initialize(id:, amount:, item_id:, name:, quantity:, subtotal:, tax_amounts:, discounts: nil) - end - - sig do - override - .returns( - { - id: String, - amount: String, - item_id: String, - name: String, - quantity: T.nilable(Float), - subtotal: String, - tax_amounts: T::Array[Orb::Models::TaxAmountModel], - discounts: T::Array[Orb::Models::CreditNoteModel::LineItem::Discount] - } - ) - end - def to_hash - end - - class Discount < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(String) } - def amount_applied - end - - sig { params(_: String).returns(String) } - def amount_applied=(_) - end - - sig { returns(T::Array[String]) } - def applies_to_price_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_ids=(_) - end - - sig { returns(Symbol) } - def discount_type - end - - sig { params(_: Symbol).returns(Symbol) } - def discount_type=(_) - end - - sig { returns(Float) } - def percentage_discount - end - - sig { params(_: Float).returns(Float) } - def percentage_discount=(_) - end - - sig { returns(T.nilable(String)) } - def amount_discount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def amount_discount=(_) - end - - sig { returns(T.nilable(String)) } - def reason - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reason=(_) - end - - sig do - params( - id: String, - amount_applied: String, - applies_to_price_ids: T::Array[String], - discount_type: Symbol, - percentage_discount: Float, - amount_discount: T.nilable(String), - reason: T.nilable(String) - ) - .void - end - def initialize( - id:, - amount_applied:, - applies_to_price_ids:, - discount_type:, - percentage_discount:, - amount_discount: nil, - reason: nil - ) - end - - sig do - override - .returns( - { - id: String, - amount_applied: String, - applies_to_price_ids: T::Array[String], - discount_type: Symbol, - percentage_discount: Float, - amount_discount: T.nilable(String), - reason: T.nilable(String) - } - ) - end - def to_hash - end - - class DiscountType < Orb::Enum - abstract! - - PERCENTAGE = :percentage - AMOUNT = :amount - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end - - class Reason < Orb::Enum - abstract! - - DUPLICATE = T.let(:Duplicate, T.nilable(Symbol)) - FRAUDULENT = T.let(:Fraudulent, T.nilable(Symbol)) - ORDER_CHANGE = T.let(:"Order change", T.nilable(Symbol)) - PRODUCT_UNSATISFACTORY = T.let(:"Product unsatisfactory", T.nilable(Symbol)) - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class Type < Orb::Enum - abstract! - - REFUND = :refund - ADJUSTMENT = :adjustment - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end -end diff --git a/rbi/lib/orb/models/credit_note_summary_model.rbi b/rbi/lib/orb/models/credit_note_summary_model.rbi deleted file mode 100644 index fe3c6927..00000000 --- a/rbi/lib/orb/models/credit_note_summary_model.rbi +++ /dev/null @@ -1,95 +0,0 @@ -# typed: strong - -module Orb - module Models - class CreditNoteSummaryModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(String) } - def credit_note_number - end - - sig { params(_: String).returns(String) } - def credit_note_number=(_) - end - - sig { returns(T.nilable(String)) } - def memo - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def memo=(_) - end - - sig { returns(String) } - def reason - end - - sig { params(_: String).returns(String) } - def reason=(_) - end - - sig { returns(String) } - def total - end - - sig { params(_: String).returns(String) } - def total=(_) - end - - sig { returns(String) } - def type - end - - sig { params(_: String).returns(String) } - def type=(_) - end - - sig { returns(T.nilable(Time)) } - def voided_at - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def voided_at=(_) - end - - sig do - params( - id: String, - credit_note_number: String, - memo: T.nilable(String), - reason: String, - total: String, - type: String, - voided_at: T.nilable(Time) - ) - .void - end - def initialize(id:, credit_note_number:, memo:, reason:, total:, type:, voided_at:) - end - - sig do - override - .returns( - { - id: String, - credit_note_number: String, - memo: T.nilable(String), - reason: String, - total: String, - type: String, - voided_at: T.nilable(Time) - } - ) - end - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/custom_rating_function_config_model.rbi b/rbi/lib/orb/models/custom_rating_function_config_model.rbi deleted file mode 100644 index ca522b80..00000000 --- a/rbi/lib/orb/models/custom_rating_function_config_model.rbi +++ /dev/null @@ -1,7 +0,0 @@ -# typed: strong - -module Orb - module Models - CustomRatingFunctionConfigModel = T.type_alias { T::Hash[Symbol, T.anything] } - end -end diff --git a/rbi/lib/orb/models/customer.rbi b/rbi/lib/orb/models/customer.rbi index ecd3daa6..d9ea5366 100644 --- a/rbi/lib/orb/models/customer.rbi +++ b/rbi/lib/orb/models/customer.rbi @@ -35,11 +35,14 @@ module Orb def balance=(_) end - sig { returns(T.nilable(Orb::Models::AddressModel)) } + sig { returns(T.nilable(Orb::Models::Customer::BillingAddress)) } def billing_address end - sig { params(_: T.nilable(Orb::Models::AddressModel)).returns(T.nilable(Orb::Models::AddressModel)) } + sig do + params(_: T.nilable(Orb::Models::Customer::BillingAddress)) + .returns(T.nilable(Orb::Models::Customer::BillingAddress)) + end def billing_address=(_) end @@ -139,19 +142,22 @@ module Orb def portal_url=(_) end - sig { returns(T.nilable(Orb::Models::AddressModel)) } + sig { returns(T.nilable(Orb::Models::Customer::ShippingAddress)) } def shipping_address end - sig { params(_: T.nilable(Orb::Models::AddressModel)).returns(T.nilable(Orb::Models::AddressModel)) } + sig do + params(_: T.nilable(Orb::Models::Customer::ShippingAddress)) + .returns(T.nilable(Orb::Models::Customer::ShippingAddress)) + end def shipping_address=(_) end - sig { returns(T.nilable(Orb::Models::CustomerTaxIDModel)) } + sig { returns(T.nilable(Orb::Models::Customer::TaxID)) } def tax_id end - sig { params(_: T.nilable(Orb::Models::CustomerTaxIDModel)).returns(T.nilable(Orb::Models::CustomerTaxIDModel)) } + sig { params(_: T.nilable(Orb::Models::Customer::TaxID)).returns(T.nilable(Orb::Models::Customer::TaxID)) } def tax_id=(_) end @@ -191,7 +197,7 @@ module Orb additional_emails: T::Array[String], auto_collection: T::Boolean, balance: String, - billing_address: T.nilable(Orb::Models::AddressModel), + billing_address: T.nilable(Orb::Models::Customer::BillingAddress), created_at: Time, currency: T.nilable(String), email: String, @@ -204,8 +210,8 @@ module Orb payment_provider: T.nilable(Symbol), payment_provider_id: T.nilable(String), portal_url: T.nilable(String), - shipping_address: T.nilable(Orb::Models::AddressModel), - tax_id: T.nilable(Orb::Models::CustomerTaxIDModel), + shipping_address: T.nilable(Orb::Models::Customer::ShippingAddress), + tax_id: T.nilable(Orb::Models::Customer::TaxID), timezone: String, accounting_sync_configuration: T.nilable(Orb::Models::Customer::AccountingSyncConfiguration), reporting_configuration: T.nilable(Orb::Models::Customer::ReportingConfiguration) @@ -246,7 +252,7 @@ module Orb additional_emails: T::Array[String], auto_collection: T::Boolean, balance: String, - billing_address: T.nilable(Orb::Models::AddressModel), + billing_address: T.nilable(Orb::Models::Customer::BillingAddress), created_at: Time, currency: T.nilable(String), email: String, @@ -259,8 +265,8 @@ module Orb payment_provider: T.nilable(Symbol), payment_provider_id: T.nilable(String), portal_url: T.nilable(String), - shipping_address: T.nilable(Orb::Models::AddressModel), - tax_id: T.nilable(Orb::Models::CustomerTaxIDModel), + shipping_address: T.nilable(Orb::Models::Customer::ShippingAddress), + tax_id: T.nilable(Orb::Models::Customer::TaxID), timezone: String, accounting_sync_configuration: T.nilable(Orb::Models::Customer::AccountingSyncConfiguration), reporting_configuration: T.nilable(Orb::Models::Customer::ReportingConfiguration) @@ -270,33 +276,113 @@ module Orb def to_hash end + class BillingAddress < Orb::BaseModel + sig { returns(T.nilable(String)) } + def city + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def city=(_) + end + + sig { returns(T.nilable(String)) } + def country + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def country=(_) + end + + sig { returns(T.nilable(String)) } + def line1 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line1=(_) + end + + sig { returns(T.nilable(String)) } + def line2 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line2=(_) + end + + sig { returns(T.nilable(String)) } + def postal_code + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def postal_code=(_) + end + + sig { returns(T.nilable(String)) } + def state + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def state=(_) + end + + sig do + params( + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + ) + .void + end + def initialize(city:, country:, line1:, line2:, postal_code:, state:) + end + + sig do + override + .returns( + { + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + } + ) + end + def to_hash + end + end + class Hierarchy < Orb::BaseModel - sig { returns(T::Array[Orb::Models::CustomerMinifiedModel]) } + sig { returns(T::Array[Orb::Models::Customer::Hierarchy::Child]) } def children end sig do - params(_: T::Array[Orb::Models::CustomerMinifiedModel]) - .returns(T::Array[Orb::Models::CustomerMinifiedModel]) + params(_: T::Array[Orb::Models::Customer::Hierarchy::Child]) + .returns(T::Array[Orb::Models::Customer::Hierarchy::Child]) end def children=(_) end - sig { returns(T.nilable(Orb::Models::CustomerMinifiedModel)) } + sig { returns(T.nilable(Orb::Models::Customer::Hierarchy::Parent)) } def parent end sig do - params(_: T.nilable(Orb::Models::CustomerMinifiedModel)) - .returns(T.nilable(Orb::Models::CustomerMinifiedModel)) + params(_: T.nilable(Orb::Models::Customer::Hierarchy::Parent)) + .returns(T.nilable(Orb::Models::Customer::Hierarchy::Parent)) end def parent=(_) end sig do params( - children: T::Array[Orb::Models::CustomerMinifiedModel], - parent: T.nilable(Orb::Models::CustomerMinifiedModel) + children: T::Array[Orb::Models::Customer::Hierarchy::Child], + parent: T.nilable(Orb::Models::Customer::Hierarchy::Parent) ) .void end @@ -307,13 +393,65 @@ module Orb override .returns( { - children: T::Array[Orb::Models::CustomerMinifiedModel], - parent: T.nilable(Orb::Models::CustomerMinifiedModel) + children: T::Array[Orb::Models::Customer::Hierarchy::Child], + parent: T.nilable(Orb::Models::Customer::Hierarchy::Parent) } ) end def to_hash end + + class Child < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class Parent < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end end class PaymentProvider < Orb::Enum @@ -330,6 +468,287 @@ module Orb end end + class ShippingAddress < Orb::BaseModel + sig { returns(T.nilable(String)) } + def city + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def city=(_) + end + + sig { returns(T.nilable(String)) } + def country + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def country=(_) + end + + sig { returns(T.nilable(String)) } + def line1 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line1=(_) + end + + sig { returns(T.nilable(String)) } + def line2 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line2=(_) + end + + sig { returns(T.nilable(String)) } + def postal_code + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def postal_code=(_) + end + + sig { returns(T.nilable(String)) } + def state + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def state=(_) + end + + sig do + params( + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + ) + .void + end + def initialize(city:, country:, line1:, line2:, postal_code:, state:) + end + + sig do + override + .returns( + { + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + } + ) + end + def to_hash + end + end + + class TaxID < Orb::BaseModel + sig { returns(Symbol) } + def country + end + + sig { params(_: Symbol).returns(Symbol) } + def country=(_) + end + + sig { returns(Symbol) } + def type + end + + sig { params(_: Symbol).returns(Symbol) } + def type=(_) + end + + sig { returns(String) } + def value + end + + sig { params(_: String).returns(String) } + def value=(_) + end + + sig { params(country: Symbol, type: Symbol, value: String).void } + def initialize(country:, type:, value:) + end + + sig { override.returns({country: Symbol, type: Symbol, value: String}) } + def to_hash + end + + class Country < Orb::Enum + abstract! + + AD = :AD + AE = :AE + AR = :AR + AT = :AT + AU = :AU + BE = :BE + BG = :BG + BH = :BH + BO = :BO + BR = :BR + CA = :CA + CH = :CH + CL = :CL + CN = :CN + CO = :CO + CR = :CR + CY = :CY + CZ = :CZ + DE = :DE + DK = :DK + EE = :EE + DO = :DO + EC = :EC + EG = :EG + ES = :ES + EU = :EU + FI = :FI + FR = :FR + GB = :GB + GE = :GE + GR = :GR + HK = :HK + HR = :HR + HU = :HU + ID = :ID + IE = :IE + IL = :IL + IN = :IN + IS = :IS + IT = :IT + JP = :JP + KE = :KE + KR = :KR + KZ = :KZ + LI = :LI + LT = :LT + LU = :LU + LV = :LV + MT = :MT + MX = :MX + MY = :MY + NG = :NG + NL = :NL + NO = :NO + NZ = :NZ + OM = :OM + PE = :PE + PH = :PH + PL = :PL + PT = :PT + RO = :RO + RS = :RS + RU = :RU + SA = :SA + SE = :SE + SG = :SG + SI = :SI + SK = :SK + SV = :SV + TH = :TH + TR = :TR + TW = :TW + UA = :UA + US = :US + UY = :UY + VE = :VE + VN = :VN + ZA = :ZA + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class Type < Orb::Enum + abstract! + + AD_NRT = :ad_nrt + AE_TRN = :ae_trn + AR_CUIT = :ar_cuit + EU_VAT = :eu_vat + AU_ABN = :au_abn + AU_ARN = :au_arn + BG_UIC = :bg_uic + BH_VAT = :bh_vat + BO_TIN = :bo_tin + BR_CNPJ = :br_cnpj + BR_CPF = :br_cpf + CA_BN = :ca_bn + CA_GST_HST = :ca_gst_hst + CA_PST_BC = :ca_pst_bc + CA_PST_MB = :ca_pst_mb + CA_PST_SK = :ca_pst_sk + CA_QST = :ca_qst + CH_VAT = :ch_vat + CL_TIN = :cl_tin + CN_TIN = :cn_tin + CO_NIT = :co_nit + CR_TIN = :cr_tin + DO_RCN = :do_rcn + EC_RUC = :ec_ruc + EG_TIN = :eg_tin + ES_CIF = :es_cif + EU_OSS_VAT = :eu_oss_vat + GB_VAT = :gb_vat + GE_VAT = :ge_vat + HK_BR = :hk_br + HU_TIN = :hu_tin + ID_NPWP = :id_npwp + IL_VAT = :il_vat + IN_GST = :in_gst + IS_VAT = :is_vat + JP_CN = :jp_cn + JP_RN = :jp_rn + JP_TRN = :jp_trn + KE_PIN = :ke_pin + KR_BRN = :kr_brn + KZ_BIN = :kz_bin + LI_UID = :li_uid + MX_RFC = :mx_rfc + MY_FRP = :my_frp + MY_ITN = :my_itn + MY_SST = :my_sst + NG_TIN = :ng_tin + NO_VAT = :no_vat + NO_VOEC = :no_voec + NZ_GST = :nz_gst + OM_VAT = :om_vat + PE_RUC = :pe_ruc + PH_TIN = :ph_tin + RO_TIN = :ro_tin + RS_PIB = :rs_pib + RU_INN = :ru_inn + RU_KPP = :ru_kpp + SA_VAT = :sa_vat + SG_GST = :sg_gst + SG_UEN = :sg_uen + SI_TIN = :si_tin + SV_NIT = :sv_nit + TH_VAT = :th_vat + TR_TIN = :tr_tin + TW_VAT = :tw_vat + UA_VAT = :ua_vat + US_EIN = :us_ein + UY_RUC = :uy_ruc + VE_RIF = :ve_rif + VN_TIN = :vn_tin + ZA_VAT = :za_vat + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class AccountingSyncConfiguration < Orb::BaseModel sig { returns(T::Array[Orb::Models::Customer::AccountingSyncConfiguration::AccountingProvider]) } def accounting_providers diff --git a/rbi/lib/orb/models/customer_balance_transaction_model.rbi b/rbi/lib/orb/models/customer_balance_transaction_model.rbi deleted file mode 100644 index da1f6e97..00000000 --- a/rbi/lib/orb/models/customer_balance_transaction_model.rbi +++ /dev/null @@ -1,207 +0,0 @@ -# typed: strong - -module Orb - module Models - class CustomerBalanceTransactionModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(Symbol) } - def action - end - - sig { params(_: Symbol).returns(Symbol) } - def action=(_) - end - - sig { returns(String) } - def amount - end - - sig { params(_: String).returns(String) } - def amount=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::CustomerBalanceTransactionModel::CreditNote)) } - def credit_note - end - - sig do - params(_: T.nilable(Orb::Models::CustomerBalanceTransactionModel::CreditNote)) - .returns(T.nilable(Orb::Models::CustomerBalanceTransactionModel::CreditNote)) - end - def credit_note=(_) - end - - sig { returns(T.nilable(String)) } - def description - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def description=(_) - end - - sig { returns(String) } - def ending_balance - end - - sig { params(_: String).returns(String) } - def ending_balance=(_) - end - - sig { returns(T.nilable(Orb::Models::CustomerBalanceTransactionModel::Invoice)) } - def invoice - end - - sig do - params(_: T.nilable(Orb::Models::CustomerBalanceTransactionModel::Invoice)) - .returns(T.nilable(Orb::Models::CustomerBalanceTransactionModel::Invoice)) - end - def invoice=(_) - end - - sig { returns(String) } - def starting_balance - end - - sig { params(_: String).returns(String) } - def starting_balance=(_) - end - - sig { returns(Symbol) } - def type - end - - sig { params(_: Symbol).returns(Symbol) } - def type=(_) - end - - sig do - params( - id: String, - action: Symbol, - amount: String, - created_at: Time, - credit_note: T.nilable(Orb::Models::CustomerBalanceTransactionModel::CreditNote), - description: T.nilable(String), - ending_balance: String, - invoice: T.nilable(Orb::Models::CustomerBalanceTransactionModel::Invoice), - starting_balance: String, - type: Symbol - ) - .void - end - def initialize( - id:, - action:, - amount:, - created_at:, - credit_note:, - description:, - ending_balance:, - invoice:, - starting_balance:, - type: - ) - end - - sig do - override - .returns( - { - id: String, - action: Symbol, - amount: String, - created_at: Time, - credit_note: T.nilable(Orb::Models::CustomerBalanceTransactionModel::CreditNote), - description: T.nilable(String), - ending_balance: String, - invoice: T.nilable(Orb::Models::CustomerBalanceTransactionModel::Invoice), - starting_balance: String, - type: Symbol - } - ) - end - def to_hash - end - - class Action < Orb::Enum - abstract! - - APPLIED_TO_INVOICE = :applied_to_invoice - MANUAL_ADJUSTMENT = :manual_adjustment - PRORATED_REFUND = :prorated_refund - REVERT_PRORATED_REFUND = :revert_prorated_refund - RETURN_FROM_VOIDING = :return_from_voiding - CREDIT_NOTE_APPLIED = :credit_note_applied - CREDIT_NOTE_VOIDED = :credit_note_voided - OVERPAYMENT_REFUND = :overpayment_refund - EXTERNAL_PAYMENT = :external_payment - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class CreditNote < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { params(id: String).void } - def initialize(id:) - end - - sig { override.returns({id: String}) } - def to_hash - end - end - - class Invoice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { params(id: String).void } - def initialize(id:) - end - - sig { override.returns({id: String}) } - def to_hash - end - end - - class Type < Orb::Enum - abstract! - - INCREMENT = :increment - DECREMENT = :decrement - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end -end diff --git a/rbi/lib/orb/models/customer_costs_model.rbi b/rbi/lib/orb/models/customer_costs_model.rbi deleted file mode 100644 index 7fc80c37..00000000 --- a/rbi/lib/orb/models/customer_costs_model.rbi +++ /dev/null @@ -1,23 +0,0 @@ -# typed: strong - -module Orb - module Models - class CustomerCostsModel < Orb::BaseModel - sig { returns(T::Array[Orb::Models::AggregatedCostModel]) } - def data - end - - sig { params(_: T::Array[Orb::Models::AggregatedCostModel]).returns(T::Array[Orb::Models::AggregatedCostModel]) } - def data=(_) - end - - sig { params(data: T::Array[Orb::Models::AggregatedCostModel]).void } - def initialize(data:) - end - - sig { override.returns({data: T::Array[Orb::Models::AggregatedCostModel]}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/customer_create_params.rbi b/rbi/lib/orb/models/customer_create_params.rbi index f89bc712..76910a58 100644 --- a/rbi/lib/orb/models/customer_create_params.rbi +++ b/rbi/lib/orb/models/customer_create_params.rbi @@ -22,13 +22,13 @@ module Orb def name=(_) end - sig { returns(T.nilable(Orb::Models::NewAccountingSyncConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::CustomerCreateParams::AccountingSyncConfiguration)) } def accounting_sync_configuration end sig do - params(_: T.nilable(Orb::Models::NewAccountingSyncConfigurationModel)) - .returns(T.nilable(Orb::Models::NewAccountingSyncConfigurationModel)) + params(_: T.nilable(Orb::Models::CustomerCreateParams::AccountingSyncConfiguration)) + .returns(T.nilable(Orb::Models::CustomerCreateParams::AccountingSyncConfiguration)) end def accounting_sync_configuration=(_) end @@ -49,11 +49,14 @@ module Orb def auto_collection=(_) end - sig { returns(T.nilable(Orb::Models::AddressInputModel)) } + sig { returns(T.nilable(Orb::Models::CustomerCreateParams::BillingAddress)) } def billing_address end - sig { params(_: T.nilable(Orb::Models::AddressInputModel)).returns(T.nilable(Orb::Models::AddressInputModel)) } + sig do + params(_: T.nilable(Orb::Models::CustomerCreateParams::BillingAddress)) + .returns(T.nilable(Orb::Models::CustomerCreateParams::BillingAddress)) + end def billing_address=(_) end @@ -81,13 +84,13 @@ module Orb def external_customer_id=(_) end - sig { returns(T.nilable(Orb::Models::CustomerHierarchyConfigModel)) } + sig { returns(T.nilable(Orb::Models::CustomerCreateParams::Hierarchy)) } def hierarchy end sig do - params(_: T.nilable(Orb::Models::CustomerHierarchyConfigModel)) - .returns(T.nilable(Orb::Models::CustomerHierarchyConfigModel)) + params(_: T.nilable(Orb::Models::CustomerCreateParams::Hierarchy)) + .returns(T.nilable(Orb::Models::CustomerCreateParams::Hierarchy)) end def hierarchy=(_) end @@ -119,22 +122,25 @@ module Orb def payment_provider_id=(_) end - sig { returns(T.nilable(Orb::Models::NewReportingConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::CustomerCreateParams::ReportingConfiguration)) } def reporting_configuration end sig do - params(_: T.nilable(Orb::Models::NewReportingConfigurationModel)) - .returns(T.nilable(Orb::Models::NewReportingConfigurationModel)) + params(_: T.nilable(Orb::Models::CustomerCreateParams::ReportingConfiguration)) + .returns(T.nilable(Orb::Models::CustomerCreateParams::ReportingConfiguration)) end def reporting_configuration=(_) end - sig { returns(T.nilable(Orb::Models::AddressInputModel)) } + sig { returns(T.nilable(Orb::Models::CustomerCreateParams::ShippingAddress)) } def shipping_address end - sig { params(_: T.nilable(Orb::Models::AddressInputModel)).returns(T.nilable(Orb::Models::AddressInputModel)) } + sig do + params(_: T.nilable(Orb::Models::CustomerCreateParams::ShippingAddress)) + .returns(T.nilable(Orb::Models::CustomerCreateParams::ShippingAddress)) + end def shipping_address=(_) end @@ -142,8 +148,8 @@ module Orb returns( T.nilable( T.any( - Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration, - Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration + Orb::Models::CustomerCreateParams::TaxConfiguration::NewAvalaraTaxConfiguration, + Orb::Models::CustomerCreateParams::TaxConfiguration::NewTaxJarConfiguration ) ) ) @@ -155,16 +161,16 @@ module Orb params( _: T.nilable( T.any( - Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration, - Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration + Orb::Models::CustomerCreateParams::TaxConfiguration::NewAvalaraTaxConfiguration, + Orb::Models::CustomerCreateParams::TaxConfiguration::NewTaxJarConfiguration ) ) ) .returns( T.nilable( T.any( - Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration, - Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration + Orb::Models::CustomerCreateParams::TaxConfiguration::NewAvalaraTaxConfiguration, + Orb::Models::CustomerCreateParams::TaxConfiguration::NewTaxJarConfiguration ) ) ) @@ -172,11 +178,14 @@ module Orb def tax_configuration=(_) end - sig { returns(T.nilable(Orb::Models::CustomerTaxIDModel)) } + sig { returns(T.nilable(Orb::Models::CustomerCreateParams::TaxID)) } def tax_id end - sig { params(_: T.nilable(Orb::Models::CustomerTaxIDModel)).returns(T.nilable(Orb::Models::CustomerTaxIDModel)) } + sig do + params(_: T.nilable(Orb::Models::CustomerCreateParams::TaxID)) + .returns(T.nilable(Orb::Models::CustomerCreateParams::TaxID)) + end def tax_id=(_) end @@ -192,26 +201,26 @@ module Orb params( email: String, name: String, - accounting_sync_configuration: T.nilable(Orb::Models::NewAccountingSyncConfigurationModel), + accounting_sync_configuration: T.nilable(Orb::Models::CustomerCreateParams::AccountingSyncConfiguration), additional_emails: T.nilable(T::Array[String]), auto_collection: T.nilable(T::Boolean), - billing_address: T.nilable(Orb::Models::AddressInputModel), + billing_address: T.nilable(Orb::Models::CustomerCreateParams::BillingAddress), currency: T.nilable(String), email_delivery: T.nilable(T::Boolean), external_customer_id: T.nilable(String), - hierarchy: T.nilable(Orb::Models::CustomerHierarchyConfigModel), + hierarchy: T.nilable(Orb::Models::CustomerCreateParams::Hierarchy), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), payment_provider: T.nilable(Symbol), payment_provider_id: T.nilable(String), - reporting_configuration: T.nilable(Orb::Models::NewReportingConfigurationModel), - shipping_address: T.nilable(Orb::Models::AddressInputModel), + reporting_configuration: T.nilable(Orb::Models::CustomerCreateParams::ReportingConfiguration), + shipping_address: T.nilable(Orb::Models::CustomerCreateParams::ShippingAddress), tax_configuration: T.nilable( T.any( - Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration, - Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration + Orb::Models::CustomerCreateParams::TaxConfiguration::NewAvalaraTaxConfiguration, + Orb::Models::CustomerCreateParams::TaxConfiguration::NewTaxJarConfiguration ) ), - tax_id: T.nilable(Orb::Models::CustomerTaxIDModel), + tax_id: T.nilable(Orb::Models::CustomerCreateParams::TaxID), timezone: T.nilable(String), request_options: T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything]) ) @@ -246,26 +255,26 @@ module Orb { email: String, name: String, - accounting_sync_configuration: T.nilable(Orb::Models::NewAccountingSyncConfigurationModel), + accounting_sync_configuration: T.nilable(Orb::Models::CustomerCreateParams::AccountingSyncConfiguration), additional_emails: T.nilable(T::Array[String]), auto_collection: T.nilable(T::Boolean), - billing_address: T.nilable(Orb::Models::AddressInputModel), + billing_address: T.nilable(Orb::Models::CustomerCreateParams::BillingAddress), currency: T.nilable(String), email_delivery: T.nilable(T::Boolean), external_customer_id: T.nilable(String), - hierarchy: T.nilable(Orb::Models::CustomerHierarchyConfigModel), + hierarchy: T.nilable(Orb::Models::CustomerCreateParams::Hierarchy), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), payment_provider: T.nilable(Symbol), payment_provider_id: T.nilable(String), - reporting_configuration: T.nilable(Orb::Models::NewReportingConfigurationModel), - shipping_address: T.nilable(Orb::Models::AddressInputModel), + reporting_configuration: T.nilable(Orb::Models::CustomerCreateParams::ReportingConfiguration), + shipping_address: T.nilable(Orb::Models::CustomerCreateParams::ShippingAddress), tax_configuration: T.nilable( T.any( - Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration, - Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration + Orb::Models::CustomerCreateParams::TaxConfiguration::NewAvalaraTaxConfiguration, + Orb::Models::CustomerCreateParams::TaxConfiguration::NewTaxJarConfiguration ) ), - tax_id: T.nilable(Orb::Models::CustomerTaxIDModel), + tax_id: T.nilable(Orb::Models::CustomerCreateParams::TaxID), timezone: T.nilable(String), request_options: Orb::RequestOptions } @@ -274,6 +283,191 @@ module Orb def to_hash end + class AccountingSyncConfiguration < Orb::BaseModel + sig do + returns( + T.nilable(T::Array[Orb::Models::CustomerCreateParams::AccountingSyncConfiguration::AccountingProvider]) + ) + end + def accounting_providers + end + + sig do + params( + _: T.nilable(T::Array[Orb::Models::CustomerCreateParams::AccountingSyncConfiguration::AccountingProvider]) + ) + .returns( + T.nilable(T::Array[Orb::Models::CustomerCreateParams::AccountingSyncConfiguration::AccountingProvider]) + ) + end + def accounting_providers=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def excluded + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def excluded=(_) + end + + sig do + params( + accounting_providers: T.nilable(T::Array[Orb::Models::CustomerCreateParams::AccountingSyncConfiguration::AccountingProvider]), + excluded: T.nilable(T::Boolean) + ) + .void + end + def initialize(accounting_providers: nil, excluded: nil) + end + + sig do + override + .returns( + { + accounting_providers: T.nilable(T::Array[Orb::Models::CustomerCreateParams::AccountingSyncConfiguration::AccountingProvider]), + excluded: T.nilable(T::Boolean) + } + ) + end + def to_hash + end + + class AccountingProvider < Orb::BaseModel + sig { returns(String) } + def external_provider_id + end + + sig { params(_: String).returns(String) } + def external_provider_id=(_) + end + + sig { returns(String) } + def provider_type + end + + sig { params(_: String).returns(String) } + def provider_type=(_) + end + + sig { params(external_provider_id: String, provider_type: String).void } + def initialize(external_provider_id:, provider_type:) + end + + sig { override.returns({external_provider_id: String, provider_type: String}) } + def to_hash + end + end + end + + class BillingAddress < Orb::BaseModel + sig { returns(T.nilable(String)) } + def city + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def city=(_) + end + + sig { returns(T.nilable(String)) } + def country + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def country=(_) + end + + sig { returns(T.nilable(String)) } + def line1 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line1=(_) + end + + sig { returns(T.nilable(String)) } + def line2 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line2=(_) + end + + sig { returns(T.nilable(String)) } + def postal_code + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def postal_code=(_) + end + + sig { returns(T.nilable(String)) } + def state + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def state=(_) + end + + sig do + params( + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + ) + .void + end + def initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil) + end + + sig do + override + .returns( + { + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Hierarchy < Orb::BaseModel + sig { returns(T.nilable(T::Array[String])) } + def child_customer_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def child_customer_ids=(_) + end + + sig { returns(T.nilable(String)) } + def parent_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def parent_customer_id=(_) + end + + sig { params(child_customer_ids: T::Array[String], parent_customer_id: T.nilable(String)).void } + def initialize(child_customer_ids: nil, parent_customer_id: nil) + end + + sig do + override.returns({child_customer_ids: T::Array[String], parent_customer_id: T.nilable(String)}) + end + def to_hash + end + end + class PaymentProvider < Orb::Enum abstract! @@ -287,6 +481,388 @@ module Orb def self.values end end + + class ReportingConfiguration < Orb::BaseModel + sig { returns(T::Boolean) } + def exempt + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def exempt=(_) + end + + sig { params(exempt: T::Boolean).void } + def initialize(exempt:) + end + + sig { override.returns({exempt: T::Boolean}) } + def to_hash + end + end + + class ShippingAddress < Orb::BaseModel + sig { returns(T.nilable(String)) } + def city + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def city=(_) + end + + sig { returns(T.nilable(String)) } + def country + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def country=(_) + end + + sig { returns(T.nilable(String)) } + def line1 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line1=(_) + end + + sig { returns(T.nilable(String)) } + def line2 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line2=(_) + end + + sig { returns(T.nilable(String)) } + def postal_code + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def postal_code=(_) + end + + sig { returns(T.nilable(String)) } + def state + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def state=(_) + end + + sig do + params( + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + ) + .void + end + def initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil) + end + + sig do + override + .returns( + { + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + } + ) + end + def to_hash + end + end + + class TaxConfiguration < Orb::Union + abstract! + + class NewAvalaraTaxConfiguration < Orb::BaseModel + sig { returns(T::Boolean) } + def tax_exempt + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def tax_exempt=(_) + end + + sig { returns(Symbol) } + def tax_provider + end + + sig { params(_: Symbol).returns(Symbol) } + def tax_provider=(_) + end + + sig { returns(T.nilable(String)) } + def tax_exemption_code + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def tax_exemption_code=(_) + end + + sig do + params(tax_exempt: T::Boolean, tax_exemption_code: T.nilable(String), tax_provider: Symbol).void + end + def initialize(tax_exempt:, tax_exemption_code: nil, tax_provider: :avalara) + end + + sig do + override.returns( + { + tax_exempt: T::Boolean, + tax_provider: Symbol, + tax_exemption_code: T.nilable(String) + } + ) + end + def to_hash + end + end + + class NewTaxJarConfiguration < Orb::BaseModel + sig { returns(T::Boolean) } + def tax_exempt + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def tax_exempt=(_) + end + + sig { returns(Symbol) } + def tax_provider + end + + sig { params(_: Symbol).returns(Symbol) } + def tax_provider=(_) + end + + sig { params(tax_exempt: T::Boolean, tax_provider: Symbol).void } + def initialize(tax_exempt:, tax_provider: :taxjar) + end + + sig { override.returns({tax_exempt: T::Boolean, tax_provider: Symbol}) } + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::CustomerCreateParams::TaxConfiguration::NewAvalaraTaxConfiguration], [Symbol, Orb::Models::CustomerCreateParams::TaxConfiguration::NewTaxJarConfiguration]] + ) + end + private_class_method def self.variants + end + end + + class TaxID < Orb::BaseModel + sig { returns(Symbol) } + def country + end + + sig { params(_: Symbol).returns(Symbol) } + def country=(_) + end + + sig { returns(Symbol) } + def type + end + + sig { params(_: Symbol).returns(Symbol) } + def type=(_) + end + + sig { returns(String) } + def value + end + + sig { params(_: String).returns(String) } + def value=(_) + end + + sig { params(country: Symbol, type: Symbol, value: String).void } + def initialize(country:, type:, value:) + end + + sig { override.returns({country: Symbol, type: Symbol, value: String}) } + def to_hash + end + + class Country < Orb::Enum + abstract! + + AD = :AD + AE = :AE + AR = :AR + AT = :AT + AU = :AU + BE = :BE + BG = :BG + BH = :BH + BO = :BO + BR = :BR + CA = :CA + CH = :CH + CL = :CL + CN = :CN + CO = :CO + CR = :CR + CY = :CY + CZ = :CZ + DE = :DE + DK = :DK + EE = :EE + DO = :DO + EC = :EC + EG = :EG + ES = :ES + EU = :EU + FI = :FI + FR = :FR + GB = :GB + GE = :GE + GR = :GR + HK = :HK + HR = :HR + HU = :HU + ID = :ID + IE = :IE + IL = :IL + IN = :IN + IS = :IS + IT = :IT + JP = :JP + KE = :KE + KR = :KR + KZ = :KZ + LI = :LI + LT = :LT + LU = :LU + LV = :LV + MT = :MT + MX = :MX + MY = :MY + NG = :NG + NL = :NL + NO = :NO + NZ = :NZ + OM = :OM + PE = :PE + PH = :PH + PL = :PL + PT = :PT + RO = :RO + RS = :RS + RU = :RU + SA = :SA + SE = :SE + SG = :SG + SI = :SI + SK = :SK + SV = :SV + TH = :TH + TR = :TR + TW = :TW + UA = :UA + US = :US + UY = :UY + VE = :VE + VN = :VN + ZA = :ZA + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class Type < Orb::Enum + abstract! + + AD_NRT = :ad_nrt + AE_TRN = :ae_trn + AR_CUIT = :ar_cuit + EU_VAT = :eu_vat + AU_ABN = :au_abn + AU_ARN = :au_arn + BG_UIC = :bg_uic + BH_VAT = :bh_vat + BO_TIN = :bo_tin + BR_CNPJ = :br_cnpj + BR_CPF = :br_cpf + CA_BN = :ca_bn + CA_GST_HST = :ca_gst_hst + CA_PST_BC = :ca_pst_bc + CA_PST_MB = :ca_pst_mb + CA_PST_SK = :ca_pst_sk + CA_QST = :ca_qst + CH_VAT = :ch_vat + CL_TIN = :cl_tin + CN_TIN = :cn_tin + CO_NIT = :co_nit + CR_TIN = :cr_tin + DO_RCN = :do_rcn + EC_RUC = :ec_ruc + EG_TIN = :eg_tin + ES_CIF = :es_cif + EU_OSS_VAT = :eu_oss_vat + GB_VAT = :gb_vat + GE_VAT = :ge_vat + HK_BR = :hk_br + HU_TIN = :hu_tin + ID_NPWP = :id_npwp + IL_VAT = :il_vat + IN_GST = :in_gst + IS_VAT = :is_vat + JP_CN = :jp_cn + JP_RN = :jp_rn + JP_TRN = :jp_trn + KE_PIN = :ke_pin + KR_BRN = :kr_brn + KZ_BIN = :kz_bin + LI_UID = :li_uid + MX_RFC = :mx_rfc + MY_FRP = :my_frp + MY_ITN = :my_itn + MY_SST = :my_sst + NG_TIN = :ng_tin + NO_VAT = :no_vat + NO_VOEC = :no_voec + NZ_GST = :nz_gst + OM_VAT = :om_vat + PE_RUC = :pe_ruc + PH_TIN = :ph_tin + RO_TIN = :ro_tin + RS_PIB = :rs_pib + RU_INN = :ru_inn + RU_KPP = :ru_kpp + SA_VAT = :sa_vat + SG_GST = :sg_gst + SG_UEN = :sg_uen + SI_TIN = :si_tin + SV_NIT = :sv_nit + TH_VAT = :th_vat + TR_TIN = :tr_tin + TW_VAT = :tw_vat + UA_VAT = :ua_vat + US_EIN = :us_ein + UY_RUC = :uy_ruc + VE_RIF = :ve_rif + VN_TIN = :vn_tin + ZA_VAT = :za_vat + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end end end diff --git a/rbi/lib/orb/models/customer_hierarchy_config_model.rbi b/rbi/lib/orb/models/customer_hierarchy_config_model.rbi deleted file mode 100644 index 80d688b8..00000000 --- a/rbi/lib/orb/models/customer_hierarchy_config_model.rbi +++ /dev/null @@ -1,31 +0,0 @@ -# typed: strong - -module Orb - module Models - class CustomerHierarchyConfigModel < Orb::BaseModel - sig { returns(T.nilable(T::Array[String])) } - def child_customer_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def child_customer_ids=(_) - end - - sig { returns(T.nilable(String)) } - def parent_customer_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def parent_customer_id=(_) - end - - sig { params(child_customer_ids: T::Array[String], parent_customer_id: T.nilable(String)).void } - def initialize(child_customer_ids: nil, parent_customer_id: nil) - end - - sig { override.returns({child_customer_ids: T::Array[String], parent_customer_id: T.nilable(String)}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/customer_minified_model.rbi b/rbi/lib/orb/models/customer_minified_model.rbi deleted file mode 100644 index 616758bb..00000000 --- a/rbi/lib/orb/models/customer_minified_model.rbi +++ /dev/null @@ -1,31 +0,0 @@ -# typed: strong - -module Orb - module Models - class CustomerMinifiedModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(String)) } - def external_customer_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_customer_id=(_) - end - - sig { params(id: String, external_customer_id: T.nilable(String)).void } - def initialize(id:, external_customer_id:) - end - - sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/customer_model.rbi b/rbi/lib/orb/models/customer_model.rbi deleted file mode 100644 index 47e8d25d..00000000 --- a/rbi/lib/orb/models/customer_model.rbi +++ /dev/null @@ -1,432 +0,0 @@ -# typed: strong - -module Orb - module Models - class CustomerModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T::Array[String]) } - def additional_emails - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def additional_emails=(_) - end - - sig { returns(T::Boolean) } - def auto_collection - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def auto_collection=(_) - end - - sig { returns(String) } - def balance - end - - sig { params(_: String).returns(String) } - def balance=(_) - end - - sig { returns(T.nilable(Orb::Models::AddressModel)) } - def billing_address - end - - sig { params(_: T.nilable(Orb::Models::AddressModel)).returns(T.nilable(Orb::Models::AddressModel)) } - def billing_address=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(String) } - def email - end - - sig { params(_: String).returns(String) } - def email=(_) - end - - sig { returns(T::Boolean) } - def email_delivery - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def email_delivery=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def exempt_from_automated_tax - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def exempt_from_automated_tax=(_) - end - - sig { returns(T.nilable(String)) } - def external_customer_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_customer_id=(_) - end - - sig { returns(Orb::Models::CustomerModel::Hierarchy) } - def hierarchy - end - - sig { params(_: Orb::Models::CustomerModel::Hierarchy).returns(Orb::Models::CustomerModel::Hierarchy) } - def hierarchy=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Symbol)) } - def payment_provider - end - - sig { params(_: T.nilable(Symbol)).returns(T.nilable(Symbol)) } - def payment_provider=(_) - end - - sig { returns(T.nilable(String)) } - def payment_provider_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def payment_provider_id=(_) - end - - sig { returns(T.nilable(String)) } - def portal_url - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def portal_url=(_) - end - - sig { returns(T.nilable(Orb::Models::AddressModel)) } - def shipping_address - end - - sig { params(_: T.nilable(Orb::Models::AddressModel)).returns(T.nilable(Orb::Models::AddressModel)) } - def shipping_address=(_) - end - - sig { returns(T.nilable(Orb::Models::CustomerTaxIDModel)) } - def tax_id - end - - sig { params(_: T.nilable(Orb::Models::CustomerTaxIDModel)).returns(T.nilable(Orb::Models::CustomerTaxIDModel)) } - def tax_id=(_) - end - - sig { returns(String) } - def timezone - end - - sig { params(_: String).returns(String) } - def timezone=(_) - end - - sig { returns(T.nilable(Orb::Models::CustomerModel::AccountingSyncConfiguration)) } - def accounting_sync_configuration - end - - sig do - params(_: T.nilable(Orb::Models::CustomerModel::AccountingSyncConfiguration)) - .returns(T.nilable(Orb::Models::CustomerModel::AccountingSyncConfiguration)) - end - def accounting_sync_configuration=(_) - end - - sig { returns(T.nilable(Orb::Models::CustomerModel::ReportingConfiguration)) } - def reporting_configuration - end - - sig do - params(_: T.nilable(Orb::Models::CustomerModel::ReportingConfiguration)) - .returns(T.nilable(Orb::Models::CustomerModel::ReportingConfiguration)) - end - def reporting_configuration=(_) - end - - sig do - params( - id: String, - additional_emails: T::Array[String], - auto_collection: T::Boolean, - balance: String, - billing_address: T.nilable(Orb::Models::AddressModel), - created_at: Time, - currency: T.nilable(String), - email: String, - email_delivery: T::Boolean, - exempt_from_automated_tax: T.nilable(T::Boolean), - external_customer_id: T.nilable(String), - hierarchy: Orb::Models::CustomerModel::Hierarchy, - metadata: T::Hash[Symbol, String], - name: String, - payment_provider: T.nilable(Symbol), - payment_provider_id: T.nilable(String), - portal_url: T.nilable(String), - shipping_address: T.nilable(Orb::Models::AddressModel), - tax_id: T.nilable(Orb::Models::CustomerTaxIDModel), - timezone: String, - accounting_sync_configuration: T.nilable(Orb::Models::CustomerModel::AccountingSyncConfiguration), - reporting_configuration: T.nilable(Orb::Models::CustomerModel::ReportingConfiguration) - ) - .void - end - def initialize( - id:, - additional_emails:, - auto_collection:, - balance:, - billing_address:, - created_at:, - currency:, - email:, - email_delivery:, - exempt_from_automated_tax:, - external_customer_id:, - hierarchy:, - metadata:, - name:, - payment_provider:, - payment_provider_id:, - portal_url:, - shipping_address:, - tax_id:, - timezone:, - accounting_sync_configuration: nil, - reporting_configuration: nil - ) - end - - sig do - override - .returns( - { - id: String, - additional_emails: T::Array[String], - auto_collection: T::Boolean, - balance: String, - billing_address: T.nilable(Orb::Models::AddressModel), - created_at: Time, - currency: T.nilable(String), - email: String, - email_delivery: T::Boolean, - exempt_from_automated_tax: T.nilable(T::Boolean), - external_customer_id: T.nilable(String), - hierarchy: Orb::Models::CustomerModel::Hierarchy, - metadata: T::Hash[Symbol, String], - name: String, - payment_provider: T.nilable(Symbol), - payment_provider_id: T.nilable(String), - portal_url: T.nilable(String), - shipping_address: T.nilable(Orb::Models::AddressModel), - tax_id: T.nilable(Orb::Models::CustomerTaxIDModel), - timezone: String, - accounting_sync_configuration: T.nilable(Orb::Models::CustomerModel::AccountingSyncConfiguration), - reporting_configuration: T.nilable(Orb::Models::CustomerModel::ReportingConfiguration) - } - ) - end - def to_hash - end - - class Hierarchy < Orb::BaseModel - sig { returns(T::Array[Orb::Models::CustomerMinifiedModel]) } - def children - end - - sig do - params(_: T::Array[Orb::Models::CustomerMinifiedModel]) - .returns(T::Array[Orb::Models::CustomerMinifiedModel]) - end - def children=(_) - end - - sig { returns(T.nilable(Orb::Models::CustomerMinifiedModel)) } - def parent - end - - sig do - params(_: T.nilable(Orb::Models::CustomerMinifiedModel)) - .returns(T.nilable(Orb::Models::CustomerMinifiedModel)) - end - def parent=(_) - end - - sig do - params( - children: T::Array[Orb::Models::CustomerMinifiedModel], - parent: T.nilable(Orb::Models::CustomerMinifiedModel) - ) - .void - end - def initialize(children:, parent:) - end - - sig do - override - .returns( - { - children: T::Array[Orb::Models::CustomerMinifiedModel], - parent: T.nilable(Orb::Models::CustomerMinifiedModel) - } - ) - end - def to_hash - end - end - - class PaymentProvider < Orb::Enum - abstract! - - QUICKBOOKS = T.let(:quickbooks, T.nilable(Symbol)) - BILL_COM = T.let(:"bill.com", T.nilable(Symbol)) - STRIPE_CHARGE = T.let(:stripe_charge, T.nilable(Symbol)) - STRIPE_INVOICE = T.let(:stripe_invoice, T.nilable(Symbol)) - NETSUITE = T.let(:netsuite, T.nilable(Symbol)) - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class AccountingSyncConfiguration < Orb::BaseModel - sig { returns(T::Array[Orb::Models::CustomerModel::AccountingSyncConfiguration::AccountingProvider]) } - def accounting_providers - end - - sig do - params(_: T::Array[Orb::Models::CustomerModel::AccountingSyncConfiguration::AccountingProvider]) - .returns(T::Array[Orb::Models::CustomerModel::AccountingSyncConfiguration::AccountingProvider]) - end - def accounting_providers=(_) - end - - sig { returns(T::Boolean) } - def excluded - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def excluded=(_) - end - - sig do - params( - accounting_providers: T::Array[Orb::Models::CustomerModel::AccountingSyncConfiguration::AccountingProvider], - excluded: T::Boolean - ) - .void - end - def initialize(accounting_providers:, excluded:) - end - - sig do - override - .returns( - { - accounting_providers: T::Array[Orb::Models::CustomerModel::AccountingSyncConfiguration::AccountingProvider], - excluded: T::Boolean - } - ) - end - def to_hash - end - - class AccountingProvider < Orb::BaseModel - sig { returns(T.nilable(String)) } - def external_provider_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_provider_id=(_) - end - - sig { returns(Symbol) } - def provider_type - end - - sig { params(_: Symbol).returns(Symbol) } - def provider_type=(_) - end - - sig { params(external_provider_id: T.nilable(String), provider_type: Symbol).void } - def initialize(external_provider_id:, provider_type:) - end - - sig { override.returns({external_provider_id: T.nilable(String), provider_type: Symbol}) } - def to_hash - end - - class ProviderType < Orb::Enum - abstract! - - QUICKBOOKS = :quickbooks - NETSUITE = :netsuite - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end - - class ReportingConfiguration < Orb::BaseModel - sig { returns(T::Boolean) } - def exempt - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def exempt=(_) - end - - sig { params(exempt: T::Boolean).void } - def initialize(exempt:) - end - - sig { override.returns({exempt: T::Boolean}) } - def to_hash - end - end - end - end -end diff --git a/rbi/lib/orb/models/customer_tax_id_model.rbi b/rbi/lib/orb/models/customer_tax_id_model.rbi deleted file mode 100644 index 54d212b8..00000000 --- a/rbi/lib/orb/models/customer_tax_id_model.rbi +++ /dev/null @@ -1,206 +0,0 @@ -# typed: strong - -module Orb - module Models - class CustomerTaxIDModel < Orb::BaseModel - sig { returns(Symbol) } - def country - end - - sig { params(_: Symbol).returns(Symbol) } - def country=(_) - end - - sig { returns(Symbol) } - def type - end - - sig { params(_: Symbol).returns(Symbol) } - def type=(_) - end - - sig { returns(String) } - def value - end - - sig { params(_: String).returns(String) } - def value=(_) - end - - sig { params(country: Symbol, type: Symbol, value: String).void } - def initialize(country:, type:, value:) - end - - sig { override.returns({country: Symbol, type: Symbol, value: String}) } - def to_hash - end - - class Country < Orb::Enum - abstract! - - AD = :AD - AE = :AE - AR = :AR - AT = :AT - AU = :AU - BE = :BE - BG = :BG - BH = :BH - BO = :BO - BR = :BR - CA = :CA - CH = :CH - CL = :CL - CN = :CN - CO = :CO - CR = :CR - CY = :CY - CZ = :CZ - DE = :DE - DK = :DK - EE = :EE - DO = :DO - EC = :EC - EG = :EG - ES = :ES - EU = :EU - FI = :FI - FR = :FR - GB = :GB - GE = :GE - GR = :GR - HK = :HK - HR = :HR - HU = :HU - ID = :ID - IE = :IE - IL = :IL - IN = :IN - IS = :IS - IT = :IT - JP = :JP - KE = :KE - KR = :KR - KZ = :KZ - LI = :LI - LT = :LT - LU = :LU - LV = :LV - MT = :MT - MX = :MX - MY = :MY - NG = :NG - NL = :NL - NO = :NO - NZ = :NZ - OM = :OM - PE = :PE - PH = :PH - PL = :PL - PT = :PT - RO = :RO - RS = :RS - RU = :RU - SA = :SA - SE = :SE - SG = :SG - SI = :SI - SK = :SK - SV = :SV - TH = :TH - TR = :TR - TW = :TW - UA = :UA - US = :US - UY = :UY - VE = :VE - VN = :VN - ZA = :ZA - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class Type < Orb::Enum - abstract! - - AD_NRT = :ad_nrt - AE_TRN = :ae_trn - AR_CUIT = :ar_cuit - EU_VAT = :eu_vat - AU_ABN = :au_abn - AU_ARN = :au_arn - BG_UIC = :bg_uic - BH_VAT = :bh_vat - BO_TIN = :bo_tin - BR_CNPJ = :br_cnpj - BR_CPF = :br_cpf - CA_BN = :ca_bn - CA_GST_HST = :ca_gst_hst - CA_PST_BC = :ca_pst_bc - CA_PST_MB = :ca_pst_mb - CA_PST_SK = :ca_pst_sk - CA_QST = :ca_qst - CH_VAT = :ch_vat - CL_TIN = :cl_tin - CN_TIN = :cn_tin - CO_NIT = :co_nit - CR_TIN = :cr_tin - DO_RCN = :do_rcn - EC_RUC = :ec_ruc - EG_TIN = :eg_tin - ES_CIF = :es_cif - EU_OSS_VAT = :eu_oss_vat - GB_VAT = :gb_vat - GE_VAT = :ge_vat - HK_BR = :hk_br - HU_TIN = :hu_tin - ID_NPWP = :id_npwp - IL_VAT = :il_vat - IN_GST = :in_gst - IS_VAT = :is_vat - JP_CN = :jp_cn - JP_RN = :jp_rn - JP_TRN = :jp_trn - KE_PIN = :ke_pin - KR_BRN = :kr_brn - KZ_BIN = :kz_bin - LI_UID = :li_uid - MX_RFC = :mx_rfc - MY_FRP = :my_frp - MY_ITN = :my_itn - MY_SST = :my_sst - NG_TIN = :ng_tin - NO_VAT = :no_vat - NO_VOEC = :no_voec - NZ_GST = :nz_gst - OM_VAT = :om_vat - PE_RUC = :pe_ruc - PH_TIN = :ph_tin - RO_TIN = :ro_tin - RS_PIB = :rs_pib - RU_INN = :ru_inn - RU_KPP = :ru_kpp - SA_VAT = :sa_vat - SG_GST = :sg_gst - SG_UEN = :sg_uen - SI_TIN = :si_tin - SV_NIT = :sv_nit - TH_VAT = :th_vat - TR_TIN = :tr_tin - TW_VAT = :tw_vat - UA_VAT = :ua_vat - US_EIN = :us_ein - UY_RUC = :uy_ruc - VE_RIF = :ve_rif - VN_TIN = :vn_tin - ZA_VAT = :za_vat - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end -end diff --git a/rbi/lib/orb/models/customer_update_by_external_id_params.rbi b/rbi/lib/orb/models/customer_update_by_external_id_params.rbi index 99fe4531..6936f16b 100644 --- a/rbi/lib/orb/models/customer_update_by_external_id_params.rbi +++ b/rbi/lib/orb/models/customer_update_by_external_id_params.rbi @@ -2,17 +2,866 @@ module Orb module Models - class CustomerUpdateByExternalIDParams < Orb::Models::EditCustomerModel + class CustomerUpdateByExternalIDParams < Orb::BaseModel extend Orb::RequestParameters::Converter include Orb::RequestParameters - sig { params(request_options: T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])).void } - def initialize(request_options: {}) + sig { returns(T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration)) } + def accounting_sync_configuration end - sig { override.returns({request_options: Orb::RequestOptions}) } + sig do + params(_: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration)) + .returns(T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration)) + end + def accounting_sync_configuration=(_) + end + + sig { returns(T.nilable(T::Array[String])) } + def additional_emails + end + + sig { params(_: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def additional_emails=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def auto_collection + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def auto_collection=(_) + end + + sig { returns(T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::BillingAddress)) } + def billing_address + end + + sig do + params(_: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::BillingAddress)) + .returns(T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::BillingAddress)) + end + def billing_address=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def email + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def email=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def email_delivery + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def email_delivery=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { returns(T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::Hierarchy)) } + def hierarchy + end + + sig do + params(_: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::Hierarchy)) + .returns(T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::Hierarchy)) + end + def hierarchy=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def name + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def name=(_) + end + + sig { returns(T.nilable(Symbol)) } + def payment_provider + end + + sig { params(_: T.nilable(Symbol)).returns(T.nilable(Symbol)) } + def payment_provider=(_) + end + + sig { returns(T.nilable(String)) } + def payment_provider_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def payment_provider_id=(_) + end + + sig { returns(T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::ReportingConfiguration)) } + def reporting_configuration + end + + sig do + params(_: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::ReportingConfiguration)) + .returns(T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::ReportingConfiguration)) + end + def reporting_configuration=(_) + end + + sig { returns(T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::ShippingAddress)) } + def shipping_address + end + + sig do + params(_: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::ShippingAddress)) + .returns(T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::ShippingAddress)) + end + def shipping_address=(_) + end + + sig do + returns( + T.nilable( + T.any( + Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewAvalaraTaxConfiguration, + Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewTaxJarConfiguration + ) + ) + ) + end + def tax_configuration + end + + sig do + params( + _: T.nilable( + T.any( + Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewAvalaraTaxConfiguration, + Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewTaxJarConfiguration + ) + ) + ) + .returns( + T.nilable( + T.any( + Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewAvalaraTaxConfiguration, + Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewTaxJarConfiguration + ) + ) + ) + end + def tax_configuration=(_) + end + + sig { returns(T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::TaxID)) } + def tax_id + end + + sig do + params(_: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::TaxID)) + .returns(T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::TaxID)) + end + def tax_id=(_) + end + + sig do + params( + accounting_sync_configuration: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration), + additional_emails: T.nilable(T::Array[String]), + auto_collection: T.nilable(T::Boolean), + billing_address: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::BillingAddress), + currency: T.nilable(String), + email: T.nilable(String), + email_delivery: T.nilable(T::Boolean), + external_customer_id: T.nilable(String), + hierarchy: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::Hierarchy), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + name: T.nilable(String), + payment_provider: T.nilable(Symbol), + payment_provider_id: T.nilable(String), + reporting_configuration: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::ReportingConfiguration), + shipping_address: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::ShippingAddress), + tax_configuration: T.nilable( + T.any( + Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewAvalaraTaxConfiguration, + Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewTaxJarConfiguration + ) + ), + tax_id: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::TaxID), + request_options: T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything]) + ) + .void + end + def initialize( + accounting_sync_configuration: nil, + additional_emails: nil, + auto_collection: nil, + billing_address: nil, + currency: nil, + email: nil, + email_delivery: nil, + external_customer_id: nil, + hierarchy: nil, + metadata: nil, + name: nil, + payment_provider: nil, + payment_provider_id: nil, + reporting_configuration: nil, + shipping_address: nil, + tax_configuration: nil, + tax_id: nil, + request_options: {} + ) + end + + sig do + override + .returns( + { + accounting_sync_configuration: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration), + additional_emails: T.nilable(T::Array[String]), + auto_collection: T.nilable(T::Boolean), + billing_address: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::BillingAddress), + currency: T.nilable(String), + email: T.nilable(String), + email_delivery: T.nilable(T::Boolean), + external_customer_id: T.nilable(String), + hierarchy: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::Hierarchy), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + name: T.nilable(String), + payment_provider: T.nilable(Symbol), + payment_provider_id: T.nilable(String), + reporting_configuration: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::ReportingConfiguration), + shipping_address: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::ShippingAddress), + tax_configuration: T.nilable( + T.any( + Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewAvalaraTaxConfiguration, + Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewTaxJarConfiguration + ) + ), + tax_id: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::TaxID), + request_options: Orb::RequestOptions + } + ) + end def to_hash end + + class AccountingSyncConfiguration < Orb::BaseModel + sig do + returns( + T.nilable( + T::Array[Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration::AccountingProvider] + ) + ) + end + def accounting_providers + end + + sig do + params( + _: T.nilable( + T::Array[Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration::AccountingProvider] + ) + ) + .returns( + T.nilable( + T::Array[Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration::AccountingProvider] + ) + ) + end + def accounting_providers=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def excluded + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def excluded=(_) + end + + sig do + params( + accounting_providers: T.nilable( + T::Array[Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration::AccountingProvider] + ), + excluded: T.nilable(T::Boolean) + ) + .void + end + def initialize(accounting_providers: nil, excluded: nil) + end + + sig do + override + .returns( + { + accounting_providers: T.nilable( + T::Array[Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration::AccountingProvider] + ), + excluded: T.nilable(T::Boolean) + } + ) + end + def to_hash + end + + class AccountingProvider < Orb::BaseModel + sig { returns(String) } + def external_provider_id + end + + sig { params(_: String).returns(String) } + def external_provider_id=(_) + end + + sig { returns(String) } + def provider_type + end + + sig { params(_: String).returns(String) } + def provider_type=(_) + end + + sig { params(external_provider_id: String, provider_type: String).void } + def initialize(external_provider_id:, provider_type:) + end + + sig { override.returns({external_provider_id: String, provider_type: String}) } + def to_hash + end + end + end + + class BillingAddress < Orb::BaseModel + sig { returns(T.nilable(String)) } + def city + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def city=(_) + end + + sig { returns(T.nilable(String)) } + def country + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def country=(_) + end + + sig { returns(T.nilable(String)) } + def line1 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line1=(_) + end + + sig { returns(T.nilable(String)) } + def line2 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line2=(_) + end + + sig { returns(T.nilable(String)) } + def postal_code + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def postal_code=(_) + end + + sig { returns(T.nilable(String)) } + def state + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def state=(_) + end + + sig do + params( + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + ) + .void + end + def initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil) + end + + sig do + override + .returns( + { + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Hierarchy < Orb::BaseModel + sig { returns(T.nilable(T::Array[String])) } + def child_customer_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def child_customer_ids=(_) + end + + sig { returns(T.nilable(String)) } + def parent_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def parent_customer_id=(_) + end + + sig { params(child_customer_ids: T::Array[String], parent_customer_id: T.nilable(String)).void } + def initialize(child_customer_ids: nil, parent_customer_id: nil) + end + + sig do + override.returns({child_customer_ids: T::Array[String], parent_customer_id: T.nilable(String)}) + end + def to_hash + end + end + + class PaymentProvider < Orb::Enum + abstract! + + QUICKBOOKS = T.let(:quickbooks, T.nilable(Symbol)) + BILL_COM = T.let(:"bill.com", T.nilable(Symbol)) + STRIPE_CHARGE = T.let(:stripe_charge, T.nilable(Symbol)) + STRIPE_INVOICE = T.let(:stripe_invoice, T.nilable(Symbol)) + NETSUITE = T.let(:netsuite, T.nilable(Symbol)) + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class ReportingConfiguration < Orb::BaseModel + sig { returns(T::Boolean) } + def exempt + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def exempt=(_) + end + + sig { params(exempt: T::Boolean).void } + def initialize(exempt:) + end + + sig { override.returns({exempt: T::Boolean}) } + def to_hash + end + end + + class ShippingAddress < Orb::BaseModel + sig { returns(T.nilable(String)) } + def city + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def city=(_) + end + + sig { returns(T.nilable(String)) } + def country + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def country=(_) + end + + sig { returns(T.nilable(String)) } + def line1 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line1=(_) + end + + sig { returns(T.nilable(String)) } + def line2 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line2=(_) + end + + sig { returns(T.nilable(String)) } + def postal_code + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def postal_code=(_) + end + + sig { returns(T.nilable(String)) } + def state + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def state=(_) + end + + sig do + params( + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + ) + .void + end + def initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil) + end + + sig do + override + .returns( + { + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + } + ) + end + def to_hash + end + end + + class TaxConfiguration < Orb::Union + abstract! + + class NewAvalaraTaxConfiguration < Orb::BaseModel + sig { returns(T::Boolean) } + def tax_exempt + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def tax_exempt=(_) + end + + sig { returns(Symbol) } + def tax_provider + end + + sig { params(_: Symbol).returns(Symbol) } + def tax_provider=(_) + end + + sig { returns(T.nilable(String)) } + def tax_exemption_code + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def tax_exemption_code=(_) + end + + sig do + params(tax_exempt: T::Boolean, tax_exemption_code: T.nilable(String), tax_provider: Symbol).void + end + def initialize(tax_exempt:, tax_exemption_code: nil, tax_provider: :avalara) + end + + sig do + override.returns( + { + tax_exempt: T::Boolean, + tax_provider: Symbol, + tax_exemption_code: T.nilable(String) + } + ) + end + def to_hash + end + end + + class NewTaxJarConfiguration < Orb::BaseModel + sig { returns(T::Boolean) } + def tax_exempt + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def tax_exempt=(_) + end + + sig { returns(Symbol) } + def tax_provider + end + + sig { params(_: Symbol).returns(Symbol) } + def tax_provider=(_) + end + + sig { params(tax_exempt: T::Boolean, tax_provider: Symbol).void } + def initialize(tax_exempt:, tax_provider: :taxjar) + end + + sig { override.returns({tax_exempt: T::Boolean, tax_provider: Symbol}) } + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewAvalaraTaxConfiguration], [Symbol, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewTaxJarConfiguration]] + ) + end + private_class_method def self.variants + end + end + + class TaxID < Orb::BaseModel + sig { returns(Symbol) } + def country + end + + sig { params(_: Symbol).returns(Symbol) } + def country=(_) + end + + sig { returns(Symbol) } + def type + end + + sig { params(_: Symbol).returns(Symbol) } + def type=(_) + end + + sig { returns(String) } + def value + end + + sig { params(_: String).returns(String) } + def value=(_) + end + + sig { params(country: Symbol, type: Symbol, value: String).void } + def initialize(country:, type:, value:) + end + + sig { override.returns({country: Symbol, type: Symbol, value: String}) } + def to_hash + end + + class Country < Orb::Enum + abstract! + + AD = :AD + AE = :AE + AR = :AR + AT = :AT + AU = :AU + BE = :BE + BG = :BG + BH = :BH + BO = :BO + BR = :BR + CA = :CA + CH = :CH + CL = :CL + CN = :CN + CO = :CO + CR = :CR + CY = :CY + CZ = :CZ + DE = :DE + DK = :DK + EE = :EE + DO = :DO + EC = :EC + EG = :EG + ES = :ES + EU = :EU + FI = :FI + FR = :FR + GB = :GB + GE = :GE + GR = :GR + HK = :HK + HR = :HR + HU = :HU + ID = :ID + IE = :IE + IL = :IL + IN = :IN + IS = :IS + IT = :IT + JP = :JP + KE = :KE + KR = :KR + KZ = :KZ + LI = :LI + LT = :LT + LU = :LU + LV = :LV + MT = :MT + MX = :MX + MY = :MY + NG = :NG + NL = :NL + NO = :NO + NZ = :NZ + OM = :OM + PE = :PE + PH = :PH + PL = :PL + PT = :PT + RO = :RO + RS = :RS + RU = :RU + SA = :SA + SE = :SE + SG = :SG + SI = :SI + SK = :SK + SV = :SV + TH = :TH + TR = :TR + TW = :TW + UA = :UA + US = :US + UY = :UY + VE = :VE + VN = :VN + ZA = :ZA + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class Type < Orb::Enum + abstract! + + AD_NRT = :ad_nrt + AE_TRN = :ae_trn + AR_CUIT = :ar_cuit + EU_VAT = :eu_vat + AU_ABN = :au_abn + AU_ARN = :au_arn + BG_UIC = :bg_uic + BH_VAT = :bh_vat + BO_TIN = :bo_tin + BR_CNPJ = :br_cnpj + BR_CPF = :br_cpf + CA_BN = :ca_bn + CA_GST_HST = :ca_gst_hst + CA_PST_BC = :ca_pst_bc + CA_PST_MB = :ca_pst_mb + CA_PST_SK = :ca_pst_sk + CA_QST = :ca_qst + CH_VAT = :ch_vat + CL_TIN = :cl_tin + CN_TIN = :cn_tin + CO_NIT = :co_nit + CR_TIN = :cr_tin + DO_RCN = :do_rcn + EC_RUC = :ec_ruc + EG_TIN = :eg_tin + ES_CIF = :es_cif + EU_OSS_VAT = :eu_oss_vat + GB_VAT = :gb_vat + GE_VAT = :ge_vat + HK_BR = :hk_br + HU_TIN = :hu_tin + ID_NPWP = :id_npwp + IL_VAT = :il_vat + IN_GST = :in_gst + IS_VAT = :is_vat + JP_CN = :jp_cn + JP_RN = :jp_rn + JP_TRN = :jp_trn + KE_PIN = :ke_pin + KR_BRN = :kr_brn + KZ_BIN = :kz_bin + LI_UID = :li_uid + MX_RFC = :mx_rfc + MY_FRP = :my_frp + MY_ITN = :my_itn + MY_SST = :my_sst + NG_TIN = :ng_tin + NO_VAT = :no_vat + NO_VOEC = :no_voec + NZ_GST = :nz_gst + OM_VAT = :om_vat + PE_RUC = :pe_ruc + PH_TIN = :ph_tin + RO_TIN = :ro_tin + RS_PIB = :rs_pib + RU_INN = :ru_inn + RU_KPP = :ru_kpp + SA_VAT = :sa_vat + SG_GST = :sg_gst + SG_UEN = :sg_uen + SI_TIN = :si_tin + SV_NIT = :sv_nit + TH_VAT = :th_vat + TR_TIN = :tr_tin + TW_VAT = :tw_vat + UA_VAT = :ua_vat + US_EIN = :us_ein + UY_RUC = :uy_ruc + VE_RIF = :ve_rif + VN_TIN = :vn_tin + ZA_VAT = :za_vat + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end end end diff --git a/rbi/lib/orb/models/customer_update_params.rbi b/rbi/lib/orb/models/customer_update_params.rbi index 1d63484d..700cc5f3 100644 --- a/rbi/lib/orb/models/customer_update_params.rbi +++ b/rbi/lib/orb/models/customer_update_params.rbi @@ -2,17 +2,856 @@ module Orb module Models - class CustomerUpdateParams < Orb::Models::EditCustomerModel + class CustomerUpdateParams < Orb::BaseModel extend Orb::RequestParameters::Converter include Orb::RequestParameters - sig { params(request_options: T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])).void } - def initialize(request_options: {}) + sig { returns(T.nilable(Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration)) } + def accounting_sync_configuration end - sig { override.returns({request_options: Orb::RequestOptions}) } + sig do + params(_: T.nilable(Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration)) + .returns(T.nilable(Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration)) + end + def accounting_sync_configuration=(_) + end + + sig { returns(T.nilable(T::Array[String])) } + def additional_emails + end + + sig { params(_: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def additional_emails=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def auto_collection + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def auto_collection=(_) + end + + sig { returns(T.nilable(Orb::Models::CustomerUpdateParams::BillingAddress)) } + def billing_address + end + + sig do + params(_: T.nilable(Orb::Models::CustomerUpdateParams::BillingAddress)) + .returns(T.nilable(Orb::Models::CustomerUpdateParams::BillingAddress)) + end + def billing_address=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def email + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def email=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def email_delivery + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def email_delivery=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { returns(T.nilable(Orb::Models::CustomerUpdateParams::Hierarchy)) } + def hierarchy + end + + sig do + params(_: T.nilable(Orb::Models::CustomerUpdateParams::Hierarchy)) + .returns(T.nilable(Orb::Models::CustomerUpdateParams::Hierarchy)) + end + def hierarchy=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def name + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def name=(_) + end + + sig { returns(T.nilable(Symbol)) } + def payment_provider + end + + sig { params(_: T.nilable(Symbol)).returns(T.nilable(Symbol)) } + def payment_provider=(_) + end + + sig { returns(T.nilable(String)) } + def payment_provider_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def payment_provider_id=(_) + end + + sig { returns(T.nilable(Orb::Models::CustomerUpdateParams::ReportingConfiguration)) } + def reporting_configuration + end + + sig do + params(_: T.nilable(Orb::Models::CustomerUpdateParams::ReportingConfiguration)) + .returns(T.nilable(Orb::Models::CustomerUpdateParams::ReportingConfiguration)) + end + def reporting_configuration=(_) + end + + sig { returns(T.nilable(Orb::Models::CustomerUpdateParams::ShippingAddress)) } + def shipping_address + end + + sig do + params(_: T.nilable(Orb::Models::CustomerUpdateParams::ShippingAddress)) + .returns(T.nilable(Orb::Models::CustomerUpdateParams::ShippingAddress)) + end + def shipping_address=(_) + end + + sig do + returns( + T.nilable( + T.any( + Orb::Models::CustomerUpdateParams::TaxConfiguration::NewAvalaraTaxConfiguration, + Orb::Models::CustomerUpdateParams::TaxConfiguration::NewTaxJarConfiguration + ) + ) + ) + end + def tax_configuration + end + + sig do + params( + _: T.nilable( + T.any( + Orb::Models::CustomerUpdateParams::TaxConfiguration::NewAvalaraTaxConfiguration, + Orb::Models::CustomerUpdateParams::TaxConfiguration::NewTaxJarConfiguration + ) + ) + ) + .returns( + T.nilable( + T.any( + Orb::Models::CustomerUpdateParams::TaxConfiguration::NewAvalaraTaxConfiguration, + Orb::Models::CustomerUpdateParams::TaxConfiguration::NewTaxJarConfiguration + ) + ) + ) + end + def tax_configuration=(_) + end + + sig { returns(T.nilable(Orb::Models::CustomerUpdateParams::TaxID)) } + def tax_id + end + + sig do + params(_: T.nilable(Orb::Models::CustomerUpdateParams::TaxID)) + .returns(T.nilable(Orb::Models::CustomerUpdateParams::TaxID)) + end + def tax_id=(_) + end + + sig do + params( + accounting_sync_configuration: T.nilable(Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration), + additional_emails: T.nilable(T::Array[String]), + auto_collection: T.nilable(T::Boolean), + billing_address: T.nilable(Orb::Models::CustomerUpdateParams::BillingAddress), + currency: T.nilable(String), + email: T.nilable(String), + email_delivery: T.nilable(T::Boolean), + external_customer_id: T.nilable(String), + hierarchy: T.nilable(Orb::Models::CustomerUpdateParams::Hierarchy), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + name: T.nilable(String), + payment_provider: T.nilable(Symbol), + payment_provider_id: T.nilable(String), + reporting_configuration: T.nilable(Orb::Models::CustomerUpdateParams::ReportingConfiguration), + shipping_address: T.nilable(Orb::Models::CustomerUpdateParams::ShippingAddress), + tax_configuration: T.nilable( + T.any( + Orb::Models::CustomerUpdateParams::TaxConfiguration::NewAvalaraTaxConfiguration, + Orb::Models::CustomerUpdateParams::TaxConfiguration::NewTaxJarConfiguration + ) + ), + tax_id: T.nilable(Orb::Models::CustomerUpdateParams::TaxID), + request_options: T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything]) + ) + .void + end + def initialize( + accounting_sync_configuration: nil, + additional_emails: nil, + auto_collection: nil, + billing_address: nil, + currency: nil, + email: nil, + email_delivery: nil, + external_customer_id: nil, + hierarchy: nil, + metadata: nil, + name: nil, + payment_provider: nil, + payment_provider_id: nil, + reporting_configuration: nil, + shipping_address: nil, + tax_configuration: nil, + tax_id: nil, + request_options: {} + ) + end + + sig do + override + .returns( + { + accounting_sync_configuration: T.nilable(Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration), + additional_emails: T.nilable(T::Array[String]), + auto_collection: T.nilable(T::Boolean), + billing_address: T.nilable(Orb::Models::CustomerUpdateParams::BillingAddress), + currency: T.nilable(String), + email: T.nilable(String), + email_delivery: T.nilable(T::Boolean), + external_customer_id: T.nilable(String), + hierarchy: T.nilable(Orb::Models::CustomerUpdateParams::Hierarchy), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + name: T.nilable(String), + payment_provider: T.nilable(Symbol), + payment_provider_id: T.nilable(String), + reporting_configuration: T.nilable(Orb::Models::CustomerUpdateParams::ReportingConfiguration), + shipping_address: T.nilable(Orb::Models::CustomerUpdateParams::ShippingAddress), + tax_configuration: T.nilable( + T.any( + Orb::Models::CustomerUpdateParams::TaxConfiguration::NewAvalaraTaxConfiguration, + Orb::Models::CustomerUpdateParams::TaxConfiguration::NewTaxJarConfiguration + ) + ), + tax_id: T.nilable(Orb::Models::CustomerUpdateParams::TaxID), + request_options: Orb::RequestOptions + } + ) + end def to_hash end + + class AccountingSyncConfiguration < Orb::BaseModel + sig do + returns( + T.nilable(T::Array[Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration::AccountingProvider]) + ) + end + def accounting_providers + end + + sig do + params( + _: T.nilable(T::Array[Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration::AccountingProvider]) + ) + .returns( + T.nilable(T::Array[Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration::AccountingProvider]) + ) + end + def accounting_providers=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def excluded + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def excluded=(_) + end + + sig do + params( + accounting_providers: T.nilable(T::Array[Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration::AccountingProvider]), + excluded: T.nilable(T::Boolean) + ) + .void + end + def initialize(accounting_providers: nil, excluded: nil) + end + + sig do + override + .returns( + { + accounting_providers: T.nilable(T::Array[Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration::AccountingProvider]), + excluded: T.nilable(T::Boolean) + } + ) + end + def to_hash + end + + class AccountingProvider < Orb::BaseModel + sig { returns(String) } + def external_provider_id + end + + sig { params(_: String).returns(String) } + def external_provider_id=(_) + end + + sig { returns(String) } + def provider_type + end + + sig { params(_: String).returns(String) } + def provider_type=(_) + end + + sig { params(external_provider_id: String, provider_type: String).void } + def initialize(external_provider_id:, provider_type:) + end + + sig { override.returns({external_provider_id: String, provider_type: String}) } + def to_hash + end + end + end + + class BillingAddress < Orb::BaseModel + sig { returns(T.nilable(String)) } + def city + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def city=(_) + end + + sig { returns(T.nilable(String)) } + def country + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def country=(_) + end + + sig { returns(T.nilable(String)) } + def line1 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line1=(_) + end + + sig { returns(T.nilable(String)) } + def line2 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line2=(_) + end + + sig { returns(T.nilable(String)) } + def postal_code + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def postal_code=(_) + end + + sig { returns(T.nilable(String)) } + def state + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def state=(_) + end + + sig do + params( + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + ) + .void + end + def initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil) + end + + sig do + override + .returns( + { + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Hierarchy < Orb::BaseModel + sig { returns(T.nilable(T::Array[String])) } + def child_customer_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def child_customer_ids=(_) + end + + sig { returns(T.nilable(String)) } + def parent_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def parent_customer_id=(_) + end + + sig { params(child_customer_ids: T::Array[String], parent_customer_id: T.nilable(String)).void } + def initialize(child_customer_ids: nil, parent_customer_id: nil) + end + + sig do + override.returns({child_customer_ids: T::Array[String], parent_customer_id: T.nilable(String)}) + end + def to_hash + end + end + + class PaymentProvider < Orb::Enum + abstract! + + QUICKBOOKS = T.let(:quickbooks, T.nilable(Symbol)) + BILL_COM = T.let(:"bill.com", T.nilable(Symbol)) + STRIPE_CHARGE = T.let(:stripe_charge, T.nilable(Symbol)) + STRIPE_INVOICE = T.let(:stripe_invoice, T.nilable(Symbol)) + NETSUITE = T.let(:netsuite, T.nilable(Symbol)) + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class ReportingConfiguration < Orb::BaseModel + sig { returns(T::Boolean) } + def exempt + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def exempt=(_) + end + + sig { params(exempt: T::Boolean).void } + def initialize(exempt:) + end + + sig { override.returns({exempt: T::Boolean}) } + def to_hash + end + end + + class ShippingAddress < Orb::BaseModel + sig { returns(T.nilable(String)) } + def city + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def city=(_) + end + + sig { returns(T.nilable(String)) } + def country + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def country=(_) + end + + sig { returns(T.nilable(String)) } + def line1 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line1=(_) + end + + sig { returns(T.nilable(String)) } + def line2 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line2=(_) + end + + sig { returns(T.nilable(String)) } + def postal_code + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def postal_code=(_) + end + + sig { returns(T.nilable(String)) } + def state + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def state=(_) + end + + sig do + params( + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + ) + .void + end + def initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil) + end + + sig do + override + .returns( + { + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + } + ) + end + def to_hash + end + end + + class TaxConfiguration < Orb::Union + abstract! + + class NewAvalaraTaxConfiguration < Orb::BaseModel + sig { returns(T::Boolean) } + def tax_exempt + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def tax_exempt=(_) + end + + sig { returns(Symbol) } + def tax_provider + end + + sig { params(_: Symbol).returns(Symbol) } + def tax_provider=(_) + end + + sig { returns(T.nilable(String)) } + def tax_exemption_code + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def tax_exemption_code=(_) + end + + sig do + params(tax_exempt: T::Boolean, tax_exemption_code: T.nilable(String), tax_provider: Symbol).void + end + def initialize(tax_exempt:, tax_exemption_code: nil, tax_provider: :avalara) + end + + sig do + override.returns( + { + tax_exempt: T::Boolean, + tax_provider: Symbol, + tax_exemption_code: T.nilable(String) + } + ) + end + def to_hash + end + end + + class NewTaxJarConfiguration < Orb::BaseModel + sig { returns(T::Boolean) } + def tax_exempt + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def tax_exempt=(_) + end + + sig { returns(Symbol) } + def tax_provider + end + + sig { params(_: Symbol).returns(Symbol) } + def tax_provider=(_) + end + + sig { params(tax_exempt: T::Boolean, tax_provider: Symbol).void } + def initialize(tax_exempt:, tax_provider: :taxjar) + end + + sig { override.returns({tax_exempt: T::Boolean, tax_provider: Symbol}) } + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::CustomerUpdateParams::TaxConfiguration::NewAvalaraTaxConfiguration], [Symbol, Orb::Models::CustomerUpdateParams::TaxConfiguration::NewTaxJarConfiguration]] + ) + end + private_class_method def self.variants + end + end + + class TaxID < Orb::BaseModel + sig { returns(Symbol) } + def country + end + + sig { params(_: Symbol).returns(Symbol) } + def country=(_) + end + + sig { returns(Symbol) } + def type + end + + sig { params(_: Symbol).returns(Symbol) } + def type=(_) + end + + sig { returns(String) } + def value + end + + sig { params(_: String).returns(String) } + def value=(_) + end + + sig { params(country: Symbol, type: Symbol, value: String).void } + def initialize(country:, type:, value:) + end + + sig { override.returns({country: Symbol, type: Symbol, value: String}) } + def to_hash + end + + class Country < Orb::Enum + abstract! + + AD = :AD + AE = :AE + AR = :AR + AT = :AT + AU = :AU + BE = :BE + BG = :BG + BH = :BH + BO = :BO + BR = :BR + CA = :CA + CH = :CH + CL = :CL + CN = :CN + CO = :CO + CR = :CR + CY = :CY + CZ = :CZ + DE = :DE + DK = :DK + EE = :EE + DO = :DO + EC = :EC + EG = :EG + ES = :ES + EU = :EU + FI = :FI + FR = :FR + GB = :GB + GE = :GE + GR = :GR + HK = :HK + HR = :HR + HU = :HU + ID = :ID + IE = :IE + IL = :IL + IN = :IN + IS = :IS + IT = :IT + JP = :JP + KE = :KE + KR = :KR + KZ = :KZ + LI = :LI + LT = :LT + LU = :LU + LV = :LV + MT = :MT + MX = :MX + MY = :MY + NG = :NG + NL = :NL + NO = :NO + NZ = :NZ + OM = :OM + PE = :PE + PH = :PH + PL = :PL + PT = :PT + RO = :RO + RS = :RS + RU = :RU + SA = :SA + SE = :SE + SG = :SG + SI = :SI + SK = :SK + SV = :SV + TH = :TH + TR = :TR + TW = :TW + UA = :UA + US = :US + UY = :UY + VE = :VE + VN = :VN + ZA = :ZA + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class Type < Orb::Enum + abstract! + + AD_NRT = :ad_nrt + AE_TRN = :ae_trn + AR_CUIT = :ar_cuit + EU_VAT = :eu_vat + AU_ABN = :au_abn + AU_ARN = :au_arn + BG_UIC = :bg_uic + BH_VAT = :bh_vat + BO_TIN = :bo_tin + BR_CNPJ = :br_cnpj + BR_CPF = :br_cpf + CA_BN = :ca_bn + CA_GST_HST = :ca_gst_hst + CA_PST_BC = :ca_pst_bc + CA_PST_MB = :ca_pst_mb + CA_PST_SK = :ca_pst_sk + CA_QST = :ca_qst + CH_VAT = :ch_vat + CL_TIN = :cl_tin + CN_TIN = :cn_tin + CO_NIT = :co_nit + CR_TIN = :cr_tin + DO_RCN = :do_rcn + EC_RUC = :ec_ruc + EG_TIN = :eg_tin + ES_CIF = :es_cif + EU_OSS_VAT = :eu_oss_vat + GB_VAT = :gb_vat + GE_VAT = :ge_vat + HK_BR = :hk_br + HU_TIN = :hu_tin + ID_NPWP = :id_npwp + IL_VAT = :il_vat + IN_GST = :in_gst + IS_VAT = :is_vat + JP_CN = :jp_cn + JP_RN = :jp_rn + JP_TRN = :jp_trn + KE_PIN = :ke_pin + KR_BRN = :kr_brn + KZ_BIN = :kz_bin + LI_UID = :li_uid + MX_RFC = :mx_rfc + MY_FRP = :my_frp + MY_ITN = :my_itn + MY_SST = :my_sst + NG_TIN = :ng_tin + NO_VAT = :no_vat + NO_VOEC = :no_voec + NZ_GST = :nz_gst + OM_VAT = :om_vat + PE_RUC = :pe_ruc + PH_TIN = :ph_tin + RO_TIN = :ro_tin + RS_PIB = :rs_pib + RU_INN = :ru_inn + RU_KPP = :ru_kpp + SA_VAT = :sa_vat + SG_GST = :sg_gst + SG_UEN = :sg_uen + SI_TIN = :si_tin + SV_NIT = :sv_nit + TH_VAT = :th_vat + TR_TIN = :tr_tin + TW_VAT = :tw_vat + UA_VAT = :ua_vat + US_EIN = :us_ein + UY_RUC = :uy_ruc + VE_RIF = :ve_rif + VN_TIN = :vn_tin + ZA_VAT = :za_vat + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end end end diff --git a/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi b/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi new file mode 100644 index 00000000..a1ae1d60 --- /dev/null +++ b/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi @@ -0,0 +1,209 @@ +# typed: strong + +module Orb + module Models + module Customers + class BalanceTransactionCreateResponse < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def action + end + + sig { params(_: Symbol).returns(Symbol) } + def action=(_) + end + + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(T.nilable(Orb::Models::Customers::BalanceTransactionCreateResponse::CreditNote)) } + def credit_note + end + + sig do + params(_: T.nilable(Orb::Models::Customers::BalanceTransactionCreateResponse::CreditNote)) + .returns(T.nilable(Orb::Models::Customers::BalanceTransactionCreateResponse::CreditNote)) + end + def credit_note=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(String) } + def ending_balance + end + + sig { params(_: String).returns(String) } + def ending_balance=(_) + end + + sig { returns(T.nilable(Orb::Models::Customers::BalanceTransactionCreateResponse::Invoice)) } + def invoice + end + + sig do + params(_: T.nilable(Orb::Models::Customers::BalanceTransactionCreateResponse::Invoice)) + .returns(T.nilable(Orb::Models::Customers::BalanceTransactionCreateResponse::Invoice)) + end + def invoice=(_) + end + + sig { returns(String) } + def starting_balance + end + + sig { params(_: String).returns(String) } + def starting_balance=(_) + end + + sig { returns(Symbol) } + def type + end + + sig { params(_: Symbol).returns(Symbol) } + def type=(_) + end + + sig do + params( + id: String, + action: Symbol, + amount: String, + created_at: Time, + credit_note: T.nilable(Orb::Models::Customers::BalanceTransactionCreateResponse::CreditNote), + description: T.nilable(String), + ending_balance: String, + invoice: T.nilable(Orb::Models::Customers::BalanceTransactionCreateResponse::Invoice), + starting_balance: String, + type: Symbol + ) + .void + end + def initialize( + id:, + action:, + amount:, + created_at:, + credit_note:, + description:, + ending_balance:, + invoice:, + starting_balance:, + type: + ) + end + + sig do + override + .returns( + { + id: String, + action: Symbol, + amount: String, + created_at: Time, + credit_note: T.nilable(Orb::Models::Customers::BalanceTransactionCreateResponse::CreditNote), + description: T.nilable(String), + ending_balance: String, + invoice: T.nilable(Orb::Models::Customers::BalanceTransactionCreateResponse::Invoice), + starting_balance: String, + type: Symbol + } + ) + end + def to_hash + end + + class Action < Orb::Enum + abstract! + + APPLIED_TO_INVOICE = :applied_to_invoice + MANUAL_ADJUSTMENT = :manual_adjustment + PRORATED_REFUND = :prorated_refund + REVERT_PRORATED_REFUND = :revert_prorated_refund + RETURN_FROM_VOIDING = :return_from_voiding + CREDIT_NOTE_APPLIED = :credit_note_applied + CREDIT_NOTE_VOIDED = :credit_note_voided + OVERPAYMENT_REFUND = :overpayment_refund + EXTERNAL_PAYMENT = :external_payment + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class CreditNote < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class Invoice < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class Type < Orb::Enum + abstract! + + INCREMENT = :increment + DECREMENT = :decrement + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + end +end diff --git a/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi b/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi new file mode 100644 index 00000000..e1e1a4e1 --- /dev/null +++ b/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi @@ -0,0 +1,209 @@ +# typed: strong + +module Orb + module Models + module Customers + class BalanceTransactionListResponse < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def action + end + + sig { params(_: Symbol).returns(Symbol) } + def action=(_) + end + + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(T.nilable(Orb::Models::Customers::BalanceTransactionListResponse::CreditNote)) } + def credit_note + end + + sig do + params(_: T.nilable(Orb::Models::Customers::BalanceTransactionListResponse::CreditNote)) + .returns(T.nilable(Orb::Models::Customers::BalanceTransactionListResponse::CreditNote)) + end + def credit_note=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(String) } + def ending_balance + end + + sig { params(_: String).returns(String) } + def ending_balance=(_) + end + + sig { returns(T.nilable(Orb::Models::Customers::BalanceTransactionListResponse::Invoice)) } + def invoice + end + + sig do + params(_: T.nilable(Orb::Models::Customers::BalanceTransactionListResponse::Invoice)) + .returns(T.nilable(Orb::Models::Customers::BalanceTransactionListResponse::Invoice)) + end + def invoice=(_) + end + + sig { returns(String) } + def starting_balance + end + + sig { params(_: String).returns(String) } + def starting_balance=(_) + end + + sig { returns(Symbol) } + def type + end + + sig { params(_: Symbol).returns(Symbol) } + def type=(_) + end + + sig do + params( + id: String, + action: Symbol, + amount: String, + created_at: Time, + credit_note: T.nilable(Orb::Models::Customers::BalanceTransactionListResponse::CreditNote), + description: T.nilable(String), + ending_balance: String, + invoice: T.nilable(Orb::Models::Customers::BalanceTransactionListResponse::Invoice), + starting_balance: String, + type: Symbol + ) + .void + end + def initialize( + id:, + action:, + amount:, + created_at:, + credit_note:, + description:, + ending_balance:, + invoice:, + starting_balance:, + type: + ) + end + + sig do + override + .returns( + { + id: String, + action: Symbol, + amount: String, + created_at: Time, + credit_note: T.nilable(Orb::Models::Customers::BalanceTransactionListResponse::CreditNote), + description: T.nilable(String), + ending_balance: String, + invoice: T.nilable(Orb::Models::Customers::BalanceTransactionListResponse::Invoice), + starting_balance: String, + type: Symbol + } + ) + end + def to_hash + end + + class Action < Orb::Enum + abstract! + + APPLIED_TO_INVOICE = :applied_to_invoice + MANUAL_ADJUSTMENT = :manual_adjustment + PRORATED_REFUND = :prorated_refund + REVERT_PRORATED_REFUND = :revert_prorated_refund + RETURN_FROM_VOIDING = :return_from_voiding + CREDIT_NOTE_APPLIED = :credit_note_applied + CREDIT_NOTE_VOIDED = :credit_note_voided + OVERPAYMENT_REFUND = :overpayment_refund + EXTERNAL_PAYMENT = :external_payment + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class CreditNote < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class Invoice < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class Type < Orb::Enum + abstract! + + INCREMENT = :increment + DECREMENT = :decrement + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + end +end diff --git a/rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi b/rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi new file mode 100644 index 00000000..34d6d4be --- /dev/null +++ b/rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi @@ -0,0 +1,327 @@ +# typed: strong + +module Orb + module Models + module Customers + class CostListByExternalIDResponse < Orb::BaseModel + sig { returns(T::Array[Orb::Models::Customers::CostListByExternalIDResponse::Data]) } + def data + end + + sig do + params(_: T::Array[Orb::Models::Customers::CostListByExternalIDResponse::Data]) + .returns(T::Array[Orb::Models::Customers::CostListByExternalIDResponse::Data]) + end + def data=(_) + end + + sig { params(data: T::Array[Orb::Models::Customers::CostListByExternalIDResponse::Data]).void } + def initialize(data:) + end + + sig { override.returns({data: T::Array[Orb::Models::Customers::CostListByExternalIDResponse::Data]}) } + def to_hash + end + + class Data < Orb::BaseModel + sig { returns(T::Array[Orb::Models::Customers::CostListByExternalIDResponse::Data::PerPriceCost]) } + def per_price_costs + end + + sig do + params(_: T::Array[Orb::Models::Customers::CostListByExternalIDResponse::Data::PerPriceCost]) + .returns(T::Array[Orb::Models::Customers::CostListByExternalIDResponse::Data::PerPriceCost]) + end + def per_price_costs=(_) + end + + sig { returns(String) } + def subtotal + end + + sig { params(_: String).returns(String) } + def subtotal=(_) + end + + sig { returns(Time) } + def timeframe_end + end + + sig { params(_: Time).returns(Time) } + def timeframe_end=(_) + end + + sig { returns(Time) } + def timeframe_start + end + + sig { params(_: Time).returns(Time) } + def timeframe_start=(_) + end + + sig { returns(String) } + def total + end + + sig { params(_: String).returns(String) } + def total=(_) + end + + sig do + params( + per_price_costs: T::Array[Orb::Models::Customers::CostListByExternalIDResponse::Data::PerPriceCost], + subtotal: String, + timeframe_end: Time, + timeframe_start: Time, + total: String + ) + .void + end + def initialize(per_price_costs:, subtotal:, timeframe_end:, timeframe_start:, total:) + end + + sig do + override + .returns( + { + per_price_costs: T::Array[Orb::Models::Customers::CostListByExternalIDResponse::Data::PerPriceCost], + subtotal: String, + timeframe_end: Time, + timeframe_start: Time, + total: String + } + ) + end + def to_hash + end + + class PerPriceCost < Orb::BaseModel + sig do + returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price + end + + sig do + params( + _: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + .returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(String) } + def subtotal + end + + sig { params(_: String).returns(String) } + def subtotal=(_) + end + + sig { returns(String) } + def total + end + + sig { params(_: String).returns(String) } + def total=(_) + end + + sig { returns(T.nilable(Float)) } + def quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def quantity=(_) + end + + sig do + params( + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + price_id: String, + subtotal: String, + total: String, + quantity: T.nilable(Float) + ) + .void + end + def initialize(price:, price_id:, subtotal:, total:, quantity: nil) + end + + sig do + override + .returns( + { + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + price_id: String, + subtotal: String, + total: String, + quantity: T.nilable(Float) + } + ) + end + def to_hash + end + end + end + end + end + end +end diff --git a/rbi/lib/orb/models/customers/cost_list_response.rbi b/rbi/lib/orb/models/customers/cost_list_response.rbi new file mode 100644 index 00000000..51a7b606 --- /dev/null +++ b/rbi/lib/orb/models/customers/cost_list_response.rbi @@ -0,0 +1,327 @@ +# typed: strong + +module Orb + module Models + module Customers + class CostListResponse < Orb::BaseModel + sig { returns(T::Array[Orb::Models::Customers::CostListResponse::Data]) } + def data + end + + sig do + params(_: T::Array[Orb::Models::Customers::CostListResponse::Data]) + .returns(T::Array[Orb::Models::Customers::CostListResponse::Data]) + end + def data=(_) + end + + sig { params(data: T::Array[Orb::Models::Customers::CostListResponse::Data]).void } + def initialize(data:) + end + + sig { override.returns({data: T::Array[Orb::Models::Customers::CostListResponse::Data]}) } + def to_hash + end + + class Data < Orb::BaseModel + sig { returns(T::Array[Orb::Models::Customers::CostListResponse::Data::PerPriceCost]) } + def per_price_costs + end + + sig do + params(_: T::Array[Orb::Models::Customers::CostListResponse::Data::PerPriceCost]) + .returns(T::Array[Orb::Models::Customers::CostListResponse::Data::PerPriceCost]) + end + def per_price_costs=(_) + end + + sig { returns(String) } + def subtotal + end + + sig { params(_: String).returns(String) } + def subtotal=(_) + end + + sig { returns(Time) } + def timeframe_end + end + + sig { params(_: Time).returns(Time) } + def timeframe_end=(_) + end + + sig { returns(Time) } + def timeframe_start + end + + sig { params(_: Time).returns(Time) } + def timeframe_start=(_) + end + + sig { returns(String) } + def total + end + + sig { params(_: String).returns(String) } + def total=(_) + end + + sig do + params( + per_price_costs: T::Array[Orb::Models::Customers::CostListResponse::Data::PerPriceCost], + subtotal: String, + timeframe_end: Time, + timeframe_start: Time, + total: String + ) + .void + end + def initialize(per_price_costs:, subtotal:, timeframe_end:, timeframe_start:, total:) + end + + sig do + override + .returns( + { + per_price_costs: T::Array[Orb::Models::Customers::CostListResponse::Data::PerPriceCost], + subtotal: String, + timeframe_end: Time, + timeframe_start: Time, + total: String + } + ) + end + def to_hash + end + + class PerPriceCost < Orb::BaseModel + sig do + returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price + end + + sig do + params( + _: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + .returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(String) } + def subtotal + end + + sig { params(_: String).returns(String) } + def subtotal=(_) + end + + sig { returns(String) } + def total + end + + sig { params(_: String).returns(String) } + def total=(_) + end + + sig { returns(T.nilable(Float)) } + def quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def quantity=(_) + end + + sig do + params( + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + price_id: String, + subtotal: String, + total: String, + quantity: T.nilable(Float) + ) + .void + end + def initialize(price:, price_id:, subtotal:, total:, quantity: nil) + end + + sig do + override + .returns( + { + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + price_id: String, + subtotal: String, + total: String, + quantity: T.nilable(Float) + } + ) + end + def to_hash + end + end + end + end + end + end +end diff --git a/rbi/lib/orb/models/customer_credit_balances_model.rbi b/rbi/lib/orb/models/customers/credit_list_by_external_id_response.rbi similarity index 68% rename from rbi/lib/orb/models/customer_credit_balances_model.rbi rename to rbi/lib/orb/models/customers/credit_list_by_external_id_response.rbi index fad2202b..d828b3a2 100644 --- a/rbi/lib/orb/models/customer_credit_balances_model.rbi +++ b/rbi/lib/orb/models/customers/credit_list_by_external_id_response.rbi @@ -2,49 +2,8 @@ module Orb module Models - class CustomerCreditBalancesModel < Orb::BaseModel - sig { returns(T::Array[Orb::Models::CustomerCreditBalancesModel::Data]) } - def data - end - - sig do - params(_: T::Array[Orb::Models::CustomerCreditBalancesModel::Data]) - .returns(T::Array[Orb::Models::CustomerCreditBalancesModel::Data]) - end - def data=(_) - end - - sig { returns(Orb::Models::PaginationMetadata) } - def pagination_metadata - end - - sig { params(_: Orb::Models::PaginationMetadata).returns(Orb::Models::PaginationMetadata) } - def pagination_metadata=(_) - end - - sig do - params( - data: T::Array[Orb::Models::CustomerCreditBalancesModel::Data], - pagination_metadata: Orb::Models::PaginationMetadata - ) - .void - end - def initialize(data:, pagination_metadata:) - end - - sig do - override - .returns( - { - data: T::Array[Orb::Models::CustomerCreditBalancesModel::Data], - pagination_metadata: Orb::Models::PaginationMetadata - } - ) - end - def to_hash - end - - class Data < Orb::BaseModel + module Customers + class CreditListByExternalIDResponse < Orb::BaseModel sig { returns(String) } def id end diff --git a/rbi/lib/orb/models/customers/credit_list_response.rbi b/rbi/lib/orb/models/customers/credit_list_response.rbi new file mode 100644 index 00000000..0560a765 --- /dev/null +++ b/rbi/lib/orb/models/customers/credit_list_response.rbi @@ -0,0 +1,116 @@ +# typed: strong + +module Orb + module Models + module Customers + class CreditListResponse < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def balance + end + + sig { params(_: Float).returns(Float) } + def balance=(_) + end + + sig { returns(T.nilable(Time)) } + def effective_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def effective_date=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(Float)) } + def maximum_initial_balance + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def maximum_initial_balance=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig { returns(Symbol) } + def status + end + + sig { params(_: Symbol).returns(Symbol) } + def status=(_) + end + + sig do + params( + id: String, + balance: Float, + effective_date: T.nilable(Time), + expiry_date: T.nilable(Time), + maximum_initial_balance: T.nilable(Float), + per_unit_cost_basis: T.nilable(String), + status: Symbol + ) + .void + end + def initialize( + id:, + balance:, + effective_date:, + expiry_date:, + maximum_initial_balance:, + per_unit_cost_basis:, + status: + ) + end + + sig do + override + .returns( + { + id: String, + balance: Float, + effective_date: T.nilable(Time), + expiry_date: T.nilable(Time), + maximum_initial_balance: T.nilable(Float), + per_unit_cost_basis: T.nilable(String), + status: Symbol + } + ) + end + def to_hash + end + + class Status < Orb::Enum + abstract! + + ACTIVE = :active + PENDING_PAYMENT = :pending_payment + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + end +end diff --git a/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi b/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi new file mode 100644 index 00000000..4418a9e9 --- /dev/null +++ b/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi @@ -0,0 +1,1984 @@ +# typed: strong + +module Orb + module Models + module Customers + module Credits + class LedgerCreateEntryByExternalIDResponse < Orb::Union + abstract! + + class IncrementLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::CreditBlock + ) + end + def credit_block + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::CreditBlock + ) + .returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::CreditBlock + ) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::Customer + ) + end + def customer + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::Customer + ) + .returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::Customer + ) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + starting_balance:, + entry_type: :increment + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class DecrementLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::CreditBlock + ) + end + def credit_block + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::CreditBlock + ) + .returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::CreditBlock + ) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::Customer + ) + end + def customer + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::Customer + ) + .returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::Customer + ) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig { returns(T.nilable(String)) } + def event_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def event_id=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_id=(_) + end + + sig { returns(T.nilable(String)) } + def price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def price_id=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + event_id: T.nilable(String), + invoice_id: T.nilable(String), + price_id: T.nilable(String), + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + starting_balance:, + event_id: nil, + invoice_id: nil, + price_id: nil, + entry_type: :decrement + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + event_id: T.nilable(String), + invoice_id: T.nilable(String), + price_id: T.nilable(String) + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class ExpirationChangeLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::CreditBlock + ) + end + def credit_block + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::CreditBlock + ) + .returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::CreditBlock + ) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::Customer + ) + end + def customer + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::Customer + ) + .returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::Customer + ) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(T.nilable(Time)) } + def new_block_expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def new_block_expiry_date=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + new_block_expiry_date: T.nilable(Time), + starting_balance: Float, + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + new_block_expiry_date:, + starting_balance:, + entry_type: :expiration_change + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + new_block_expiry_date: T.nilable(Time), + starting_balance: Float + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class CreditBlockExpiryLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::CreditBlock + ) + end + def credit_block + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::CreditBlock + ) + .returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::CreditBlock + ) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::Customer + ) + end + def customer + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::Customer + ) + .returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::Customer + ) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + starting_balance:, + entry_type: :credit_block_expiry + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class VoidLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::CreditBlock + ) + end + def credit_block + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::CreditBlock + ) + .returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::CreditBlock + ) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::Customer) } + def customer + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::Customer + ) + .returns(Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::Customer) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig { returns(Float) } + def void_amount + end + + sig { params(_: Float).returns(Float) } + def void_amount=(_) + end + + sig { returns(T.nilable(String)) } + def void_reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def void_reason=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + void_amount: Float, + void_reason: T.nilable(String), + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + starting_balance:, + void_amount:, + void_reason:, + entry_type: :void + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + void_amount: Float, + void_reason: T.nilable(String) + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class VoidInitiatedLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::CreditBlock + ) + end + def credit_block + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::CreditBlock + ) + .returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::CreditBlock + ) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::Customer + ) + end + def customer + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::Customer + ) + .returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::Customer + ) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Time) } + def new_block_expiry_date + end + + sig { params(_: Time).returns(Time) } + def new_block_expiry_date=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig { returns(Float) } + def void_amount + end + + sig { params(_: Float).returns(Float) } + def void_amount=(_) + end + + sig { returns(T.nilable(String)) } + def void_reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def void_reason=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + new_block_expiry_date: Time, + starting_balance: Float, + void_amount: Float, + void_reason: T.nilable(String), + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + new_block_expiry_date:, + starting_balance:, + void_amount:, + void_reason:, + entry_type: :void_initiated + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + new_block_expiry_date: Time, + starting_balance: Float, + void_amount: Float, + void_reason: T.nilable(String) + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class AmendmentLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::CreditBlock + ) + end + def credit_block + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::CreditBlock + ) + .returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::CreditBlock + ) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::Customer + ) + end + def customer + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::Customer + ) + .returns( + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::Customer + ) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + starting_balance:, + entry_type: :amendment + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry]] + ) + end + private_class_method def self.variants + end + end + end + end + end +end diff --git a/rbi/lib/orb/models/customers/credits/ledger_create_entry_response.rbi b/rbi/lib/orb/models/customers/credits/ledger_create_entry_response.rbi new file mode 100644 index 00000000..58563497 --- /dev/null +++ b/rbi/lib/orb/models/customers/credits/ledger_create_entry_response.rbi @@ -0,0 +1,1906 @@ +# typed: strong + +module Orb + module Models + module Customers + module Credits + class LedgerCreateEntryResponse < Orb::Union + abstract! + + class IncrementLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::CreditBlock) } + def credit_block + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::CreditBlock) + .returns(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::CreditBlock) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::Customer) } + def customer + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::Customer) + .returns(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::Customer) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + starting_balance:, + entry_type: :increment + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class DecrementLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::CreditBlock) } + def credit_block + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::CreditBlock) + .returns(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::CreditBlock) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::Customer) } + def customer + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::Customer) + .returns(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::Customer) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig { returns(T.nilable(String)) } + def event_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def event_id=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_id=(_) + end + + sig { returns(T.nilable(String)) } + def price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def price_id=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + event_id: T.nilable(String), + invoice_id: T.nilable(String), + price_id: T.nilable(String), + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + starting_balance:, + event_id: nil, + invoice_id: nil, + price_id: nil, + entry_type: :decrement + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + event_id: T.nilable(String), + invoice_id: T.nilable(String), + price_id: T.nilable(String) + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class ExpirationChangeLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::CreditBlock + ) + end + def credit_block + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::CreditBlock + ) + .returns( + Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::CreditBlock + ) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::Customer) } + def customer + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::Customer + ) + .returns(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::Customer) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(T.nilable(Time)) } + def new_block_expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def new_block_expiry_date=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + new_block_expiry_date: T.nilable(Time), + starting_balance: Float, + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + new_block_expiry_date:, + starting_balance:, + entry_type: :expiration_change + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + new_block_expiry_date: T.nilable(Time), + starting_balance: Float + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class CreditBlockExpiryLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::CreditBlock + ) + end + def credit_block + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::CreditBlock + ) + .returns( + Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::CreditBlock + ) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::Customer + ) + end + def customer + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::Customer + ) + .returns( + Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::Customer + ) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + starting_balance:, + entry_type: :credit_block_expiry + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class VoidLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::CreditBlock) } + def credit_block + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::CreditBlock) + .returns(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::CreditBlock) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::Customer) } + def customer + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::Customer) + .returns(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::Customer) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig { returns(Float) } + def void_amount + end + + sig { params(_: Float).returns(Float) } + def void_amount=(_) + end + + sig { returns(T.nilable(String)) } + def void_reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def void_reason=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + void_amount: Float, + void_reason: T.nilable(String), + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + starting_balance:, + void_amount:, + void_reason:, + entry_type: :void + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + void_amount: Float, + void_reason: T.nilable(String) + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class VoidInitiatedLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::CreditBlock) } + def credit_block + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::CreditBlock + ) + .returns(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::CreditBlock) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::Customer) } + def customer + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::Customer) + .returns(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::Customer) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Time) } + def new_block_expiry_date + end + + sig { params(_: Time).returns(Time) } + def new_block_expiry_date=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig { returns(Float) } + def void_amount + end + + sig { params(_: Float).returns(Float) } + def void_amount=(_) + end + + sig { returns(T.nilable(String)) } + def void_reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def void_reason=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + new_block_expiry_date: Time, + starting_balance: Float, + void_amount: Float, + void_reason: T.nilable(String), + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + new_block_expiry_date:, + starting_balance:, + void_amount:, + void_reason:, + entry_type: :void_initiated + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + new_block_expiry_date: Time, + starting_balance: Float, + void_amount: Float, + void_reason: T.nilable(String) + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class AmendmentLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::CreditBlock) } + def credit_block + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::CreditBlock) + .returns(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::CreditBlock) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::Customer) } + def customer + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::Customer) + .returns(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::Customer) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + starting_balance:, + entry_type: :amendment + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry]] + ) + end + private_class_method def self.variants + end + end + end + end + end +end diff --git a/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rbi b/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rbi new file mode 100644 index 00000000..fa9322ba --- /dev/null +++ b/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rbi @@ -0,0 +1,1950 @@ +# typed: strong + +module Orb + module Models + module Customers + module Credits + class LedgerListByExternalIDResponse < Orb::Union + abstract! + + class IncrementLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::CreditBlock + ) + end + def credit_block + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::CreditBlock + ) + .returns( + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::CreditBlock + ) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::Customer) } + def customer + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::Customer) + .returns(Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::Customer) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + starting_balance:, + entry_type: :increment + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class DecrementLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::CreditBlock + ) + end + def credit_block + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::CreditBlock + ) + .returns( + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::CreditBlock + ) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::Customer) } + def customer + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::Customer) + .returns(Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::Customer) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig { returns(T.nilable(String)) } + def event_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def event_id=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_id=(_) + end + + sig { returns(T.nilable(String)) } + def price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def price_id=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + event_id: T.nilable(String), + invoice_id: T.nilable(String), + price_id: T.nilable(String), + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + starting_balance:, + event_id: nil, + invoice_id: nil, + price_id: nil, + entry_type: :decrement + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + event_id: T.nilable(String), + invoice_id: T.nilable(String), + price_id: T.nilable(String) + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class ExpirationChangeLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::CreditBlock + ) + end + def credit_block + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::CreditBlock + ) + .returns( + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::CreditBlock + ) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::Customer + ) + end + def customer + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::Customer + ) + .returns( + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::Customer + ) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(T.nilable(Time)) } + def new_block_expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def new_block_expiry_date=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + new_block_expiry_date: T.nilable(Time), + starting_balance: Float, + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + new_block_expiry_date:, + starting_balance:, + entry_type: :expiration_change + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + new_block_expiry_date: T.nilable(Time), + starting_balance: Float + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class CreditBlockExpiryLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::CreditBlock + ) + end + def credit_block + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::CreditBlock + ) + .returns( + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::CreditBlock + ) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::Customer + ) + end + def customer + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::Customer + ) + .returns( + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::Customer + ) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + starting_balance:, + entry_type: :credit_block_expiry + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class VoidLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::CreditBlock) } + def credit_block + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::CreditBlock) + .returns(Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::CreditBlock) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::Customer) } + def customer + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::Customer) + .returns(Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::Customer) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig { returns(Float) } + def void_amount + end + + sig { params(_: Float).returns(Float) } + def void_amount=(_) + end + + sig { returns(T.nilable(String)) } + def void_reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def void_reason=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + void_amount: Float, + void_reason: T.nilable(String), + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + starting_balance:, + void_amount:, + void_reason:, + entry_type: :void + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + void_amount: Float, + void_reason: T.nilable(String) + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class VoidInitiatedLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::CreditBlock + ) + end + def credit_block + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::CreditBlock + ) + .returns( + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::CreditBlock + ) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::Customer + ) + end + def customer + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::Customer + ) + .returns( + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::Customer + ) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Time) } + def new_block_expiry_date + end + + sig { params(_: Time).returns(Time) } + def new_block_expiry_date=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig { returns(Float) } + def void_amount + end + + sig { params(_: Float).returns(Float) } + def void_amount=(_) + end + + sig { returns(T.nilable(String)) } + def void_reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def void_reason=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + new_block_expiry_date: Time, + starting_balance: Float, + void_amount: Float, + void_reason: T.nilable(String), + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + new_block_expiry_date:, + starting_balance:, + void_amount:, + void_reason:, + entry_type: :void_initiated + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + new_block_expiry_date: Time, + starting_balance: Float, + void_amount: Float, + void_reason: T.nilable(String) + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class AmendmentLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig do + returns( + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::CreditBlock + ) + end + def credit_block + end + + sig do + params( + _: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::CreditBlock + ) + .returns( + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::CreditBlock + ) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::Customer) } + def customer + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::Customer) + .returns(Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::Customer) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + starting_balance:, + entry_type: :amendment + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry]] + ) + end + private_class_method def self.variants + end + end + end + end + end +end diff --git a/rbi/lib/orb/models/customers/credits/ledger_list_response.rbi b/rbi/lib/orb/models/customers/credits/ledger_list_response.rbi new file mode 100644 index 00000000..e314d630 --- /dev/null +++ b/rbi/lib/orb/models/customers/credits/ledger_list_response.rbi @@ -0,0 +1,1878 @@ +# typed: strong + +module Orb + module Models + module Customers + module Credits + class LedgerListResponse < Orb::Union + abstract! + + class IncrementLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::CreditBlock) } + def credit_block + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::CreditBlock) + .returns(Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::CreditBlock) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::Customer) } + def customer + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::Customer) + .returns(Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::Customer) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + starting_balance:, + entry_type: :increment + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class DecrementLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::CreditBlock) } + def credit_block + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::CreditBlock) + .returns(Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::CreditBlock) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::Customer) } + def customer + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::Customer) + .returns(Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::Customer) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig { returns(T.nilable(String)) } + def event_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def event_id=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_id=(_) + end + + sig { returns(T.nilable(String)) } + def price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def price_id=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + event_id: T.nilable(String), + invoice_id: T.nilable(String), + price_id: T.nilable(String), + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + starting_balance:, + event_id: nil, + invoice_id: nil, + price_id: nil, + entry_type: :decrement + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + event_id: T.nilable(String), + invoice_id: T.nilable(String), + price_id: T.nilable(String) + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class ExpirationChangeLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::CreditBlock) } + def credit_block + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::CreditBlock) + .returns(Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::CreditBlock) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::Customer) } + def customer + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::Customer) + .returns(Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::Customer) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(T.nilable(Time)) } + def new_block_expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def new_block_expiry_date=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + new_block_expiry_date: T.nilable(Time), + starting_balance: Float, + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + new_block_expiry_date:, + starting_balance:, + entry_type: :expiration_change + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + new_block_expiry_date: T.nilable(Time), + starting_balance: Float + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class CreditBlockExpiryLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::CreditBlock) } + def credit_block + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::CreditBlock) + .returns(Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::CreditBlock) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::Customer) } + def customer + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::Customer) + .returns(Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::Customer) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + starting_balance:, + entry_type: :credit_block_expiry + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class VoidLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::CreditBlock) } + def credit_block + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::CreditBlock) + .returns(Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::CreditBlock) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::Customer) } + def customer + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::Customer) + .returns(Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::Customer) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig { returns(Float) } + def void_amount + end + + sig { params(_: Float).returns(Float) } + def void_amount=(_) + end + + sig { returns(T.nilable(String)) } + def void_reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def void_reason=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + void_amount: Float, + void_reason: T.nilable(String), + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + starting_balance:, + void_amount:, + void_reason:, + entry_type: :void + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + void_amount: Float, + void_reason: T.nilable(String) + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class VoidInitiatedLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::CreditBlock) } + def credit_block + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::CreditBlock) + .returns(Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::CreditBlock) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::Customer) } + def customer + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::Customer) + .returns(Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::Customer) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Time) } + def new_block_expiry_date + end + + sig { params(_: Time).returns(Time) } + def new_block_expiry_date=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig { returns(Float) } + def void_amount + end + + sig { params(_: Float).returns(Float) } + def void_amount=(_) + end + + sig { returns(T.nilable(String)) } + def void_reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def void_reason=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + new_block_expiry_date: Time, + starting_balance: Float, + void_amount: Float, + void_reason: T.nilable(String), + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + new_block_expiry_date:, + starting_balance:, + void_amount:, + void_reason:, + entry_type: :void_initiated + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + new_block_expiry_date: Time, + starting_balance: Float, + void_amount: Float, + void_reason: T.nilable(String) + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class AmendmentLedgerEntry < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Float) } + def amount + end + + sig { params(_: Float).returns(Float) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::CreditBlock) } + def credit_block + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::CreditBlock) + .returns(Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::CreditBlock) + end + def credit_block=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::Customer) } + def customer + end + + sig do + params(_: Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::Customer) + .returns(Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::Customer) + end + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(Float) } + def ending_balance + end + + sig { params(_: Float).returns(Float) } + def ending_balance=(_) + end + + sig { returns(Symbol) } + def entry_status + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_status=(_) + end + + sig { returns(Symbol) } + def entry_type + end + + sig { params(_: Symbol).returns(Symbol) } + def entry_type=(_) + end + + sig { returns(Integer) } + def ledger_sequence_number + end + + sig { params(_: Integer).returns(Integer) } + def ledger_sequence_number=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(Float) } + def starting_balance + end + + sig { params(_: Float).returns(Float) } + def starting_balance=(_) + end + + sig do + params( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float, + entry_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + created_at:, + credit_block:, + currency:, + customer:, + description:, + ending_balance:, + entry_status:, + ledger_sequence_number:, + metadata:, + starting_balance:, + entry_type: :amendment + ) + end + + sig do + override + .returns( + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::Customer, + description: T.nilable(String), + ending_balance: Float, + entry_status: Symbol, + entry_type: Symbol, + ledger_sequence_number: Integer, + metadata: T::Hash[Symbol, String], + starting_balance: Float + } + ) + end + def to_hash + end + + class CreditBlock < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def expiry_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def expiry_date=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_cost_basis + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_cost_basis=(_) + end + + sig do + params(id: String, expiry_date: T.nilable(Time), per_unit_cost_basis: T.nilable(String)).void + end + def initialize(id:, expiry_date:, per_unit_cost_basis:) + end + + sig do + override.returns( + { + id: String, + expiry_date: T.nilable(Time), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class EntryStatus < Orb::Enum + abstract! + + COMMITTED = :committed + PENDING = :pending + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry]] + ) + end + private_class_method def self.variants + end + end + end + end + end +end diff --git a/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rbi b/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rbi new file mode 100644 index 00000000..57300e69 --- /dev/null +++ b/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rbi @@ -0,0 +1,192 @@ +# typed: strong + +module Orb + module Models + module Customers + module Credits + class TopUpCreateByExternalIDResponse < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::InvoiceSettings) } + def invoice_settings + end + + sig do + params(_: Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::InvoiceSettings) + .returns(Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::InvoiceSettings) + end + def invoice_settings=(_) + end + + sig { returns(String) } + def per_unit_cost_basis + end + + sig { params(_: String).returns(String) } + def per_unit_cost_basis=(_) + end + + sig { returns(String) } + def threshold + end + + sig { params(_: String).returns(String) } + def threshold=(_) + end + + sig { returns(T.nilable(Integer)) } + def expires_after + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def expires_after=(_) + end + + sig { returns(T.nilable(Symbol)) } + def expires_after_unit + end + + sig { params(_: T.nilable(Symbol)).returns(T.nilable(Symbol)) } + def expires_after_unit=(_) + end + + sig do + params( + id: String, + amount: String, + currency: String, + invoice_settings: Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::InvoiceSettings, + per_unit_cost_basis: String, + threshold: String, + expires_after: T.nilable(Integer), + expires_after_unit: T.nilable(Symbol) + ) + .void + end + def initialize( + id:, + amount:, + currency:, + invoice_settings:, + per_unit_cost_basis:, + threshold:, + expires_after: nil, + expires_after_unit: nil + ) + end + + sig do + override + .returns( + { + id: String, + amount: String, + currency: String, + invoice_settings: Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::InvoiceSettings, + per_unit_cost_basis: String, + threshold: String, + expires_after: T.nilable(Integer), + expires_after_unit: T.nilable(Symbol) + } + ) + end + def to_hash + end + + class InvoiceSettings < Orb::BaseModel + sig { returns(T::Boolean) } + def auto_collection + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def auto_collection=(_) + end + + sig { returns(Integer) } + def net_terms + end + + sig { params(_: Integer).returns(Integer) } + def net_terms=(_) + end + + sig { returns(T.nilable(String)) } + def memo + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def memo=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def require_successful_payment + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def require_successful_payment=(_) + end + + sig do + params( + auto_collection: T::Boolean, + net_terms: Integer, + memo: T.nilable(String), + require_successful_payment: T::Boolean + ) + .void + end + def initialize(auto_collection:, net_terms:, memo: nil, require_successful_payment: nil) + end + + sig do + override + .returns( + { + auto_collection: T::Boolean, + net_terms: Integer, + memo: T.nilable(String), + require_successful_payment: T::Boolean + } + ) + end + def to_hash + end + end + + class ExpiresAfterUnit < Orb::Enum + abstract! + + DAY = T.let(:day, T.nilable(Symbol)) + MONTH = T.let(:month, T.nilable(Symbol)) + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + end + end +end diff --git a/rbi/lib/orb/models/customers/credits/top_up_create_response.rbi b/rbi/lib/orb/models/customers/credits/top_up_create_response.rbi new file mode 100644 index 00000000..99266258 --- /dev/null +++ b/rbi/lib/orb/models/customers/credits/top_up_create_response.rbi @@ -0,0 +1,192 @@ +# typed: strong + +module Orb + module Models + module Customers + module Credits + class TopUpCreateResponse < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(Orb::Models::Customers::Credits::TopUpCreateResponse::InvoiceSettings) } + def invoice_settings + end + + sig do + params(_: Orb::Models::Customers::Credits::TopUpCreateResponse::InvoiceSettings) + .returns(Orb::Models::Customers::Credits::TopUpCreateResponse::InvoiceSettings) + end + def invoice_settings=(_) + end + + sig { returns(String) } + def per_unit_cost_basis + end + + sig { params(_: String).returns(String) } + def per_unit_cost_basis=(_) + end + + sig { returns(String) } + def threshold + end + + sig { params(_: String).returns(String) } + def threshold=(_) + end + + sig { returns(T.nilable(Integer)) } + def expires_after + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def expires_after=(_) + end + + sig { returns(T.nilable(Symbol)) } + def expires_after_unit + end + + sig { params(_: T.nilable(Symbol)).returns(T.nilable(Symbol)) } + def expires_after_unit=(_) + end + + sig do + params( + id: String, + amount: String, + currency: String, + invoice_settings: Orb::Models::Customers::Credits::TopUpCreateResponse::InvoiceSettings, + per_unit_cost_basis: String, + threshold: String, + expires_after: T.nilable(Integer), + expires_after_unit: T.nilable(Symbol) + ) + .void + end + def initialize( + id:, + amount:, + currency:, + invoice_settings:, + per_unit_cost_basis:, + threshold:, + expires_after: nil, + expires_after_unit: nil + ) + end + + sig do + override + .returns( + { + id: String, + amount: String, + currency: String, + invoice_settings: Orb::Models::Customers::Credits::TopUpCreateResponse::InvoiceSettings, + per_unit_cost_basis: String, + threshold: String, + expires_after: T.nilable(Integer), + expires_after_unit: T.nilable(Symbol) + } + ) + end + def to_hash + end + + class InvoiceSettings < Orb::BaseModel + sig { returns(T::Boolean) } + def auto_collection + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def auto_collection=(_) + end + + sig { returns(Integer) } + def net_terms + end + + sig { params(_: Integer).returns(Integer) } + def net_terms=(_) + end + + sig { returns(T.nilable(String)) } + def memo + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def memo=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def require_successful_payment + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def require_successful_payment=(_) + end + + sig do + params( + auto_collection: T::Boolean, + net_terms: Integer, + memo: T.nilable(String), + require_successful_payment: T::Boolean + ) + .void + end + def initialize(auto_collection:, net_terms:, memo: nil, require_successful_payment: nil) + end + + sig do + override + .returns( + { + auto_collection: T::Boolean, + net_terms: Integer, + memo: T.nilable(String), + require_successful_payment: T::Boolean + } + ) + end + def to_hash + end + end + + class ExpiresAfterUnit < Orb::Enum + abstract! + + DAY = T.let(:day, T.nilable(Symbol)) + MONTH = T.let(:month, T.nilable(Symbol)) + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + end + end +end diff --git a/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rbi b/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rbi new file mode 100644 index 00000000..8d17536e --- /dev/null +++ b/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rbi @@ -0,0 +1,192 @@ +# typed: strong + +module Orb + module Models + module Customers + module Credits + class TopUpListByExternalIDResponse < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::InvoiceSettings) } + def invoice_settings + end + + sig do + params(_: Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::InvoiceSettings) + .returns(Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::InvoiceSettings) + end + def invoice_settings=(_) + end + + sig { returns(String) } + def per_unit_cost_basis + end + + sig { params(_: String).returns(String) } + def per_unit_cost_basis=(_) + end + + sig { returns(String) } + def threshold + end + + sig { params(_: String).returns(String) } + def threshold=(_) + end + + sig { returns(T.nilable(Integer)) } + def expires_after + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def expires_after=(_) + end + + sig { returns(T.nilable(Symbol)) } + def expires_after_unit + end + + sig { params(_: T.nilable(Symbol)).returns(T.nilable(Symbol)) } + def expires_after_unit=(_) + end + + sig do + params( + id: String, + amount: String, + currency: String, + invoice_settings: Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::InvoiceSettings, + per_unit_cost_basis: String, + threshold: String, + expires_after: T.nilable(Integer), + expires_after_unit: T.nilable(Symbol) + ) + .void + end + def initialize( + id:, + amount:, + currency:, + invoice_settings:, + per_unit_cost_basis:, + threshold:, + expires_after: nil, + expires_after_unit: nil + ) + end + + sig do + override + .returns( + { + id: String, + amount: String, + currency: String, + invoice_settings: Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::InvoiceSettings, + per_unit_cost_basis: String, + threshold: String, + expires_after: T.nilable(Integer), + expires_after_unit: T.nilable(Symbol) + } + ) + end + def to_hash + end + + class InvoiceSettings < Orb::BaseModel + sig { returns(T::Boolean) } + def auto_collection + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def auto_collection=(_) + end + + sig { returns(Integer) } + def net_terms + end + + sig { params(_: Integer).returns(Integer) } + def net_terms=(_) + end + + sig { returns(T.nilable(String)) } + def memo + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def memo=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def require_successful_payment + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def require_successful_payment=(_) + end + + sig do + params( + auto_collection: T::Boolean, + net_terms: Integer, + memo: T.nilable(String), + require_successful_payment: T::Boolean + ) + .void + end + def initialize(auto_collection:, net_terms:, memo: nil, require_successful_payment: nil) + end + + sig do + override + .returns( + { + auto_collection: T::Boolean, + net_terms: Integer, + memo: T.nilable(String), + require_successful_payment: T::Boolean + } + ) + end + def to_hash + end + end + + class ExpiresAfterUnit < Orb::Enum + abstract! + + DAY = T.let(:day, T.nilable(Symbol)) + MONTH = T.let(:month, T.nilable(Symbol)) + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + end + end +end diff --git a/rbi/lib/orb/models/customers/credits/top_up_list_response.rbi b/rbi/lib/orb/models/customers/credits/top_up_list_response.rbi new file mode 100644 index 00000000..c5171a6d --- /dev/null +++ b/rbi/lib/orb/models/customers/credits/top_up_list_response.rbi @@ -0,0 +1,192 @@ +# typed: strong + +module Orb + module Models + module Customers + module Credits + class TopUpListResponse < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(Orb::Models::Customers::Credits::TopUpListResponse::InvoiceSettings) } + def invoice_settings + end + + sig do + params(_: Orb::Models::Customers::Credits::TopUpListResponse::InvoiceSettings) + .returns(Orb::Models::Customers::Credits::TopUpListResponse::InvoiceSettings) + end + def invoice_settings=(_) + end + + sig { returns(String) } + def per_unit_cost_basis + end + + sig { params(_: String).returns(String) } + def per_unit_cost_basis=(_) + end + + sig { returns(String) } + def threshold + end + + sig { params(_: String).returns(String) } + def threshold=(_) + end + + sig { returns(T.nilable(Integer)) } + def expires_after + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def expires_after=(_) + end + + sig { returns(T.nilable(Symbol)) } + def expires_after_unit + end + + sig { params(_: T.nilable(Symbol)).returns(T.nilable(Symbol)) } + def expires_after_unit=(_) + end + + sig do + params( + id: String, + amount: String, + currency: String, + invoice_settings: Orb::Models::Customers::Credits::TopUpListResponse::InvoiceSettings, + per_unit_cost_basis: String, + threshold: String, + expires_after: T.nilable(Integer), + expires_after_unit: T.nilable(Symbol) + ) + .void + end + def initialize( + id:, + amount:, + currency:, + invoice_settings:, + per_unit_cost_basis:, + threshold:, + expires_after: nil, + expires_after_unit: nil + ) + end + + sig do + override + .returns( + { + id: String, + amount: String, + currency: String, + invoice_settings: Orb::Models::Customers::Credits::TopUpListResponse::InvoiceSettings, + per_unit_cost_basis: String, + threshold: String, + expires_after: T.nilable(Integer), + expires_after_unit: T.nilable(Symbol) + } + ) + end + def to_hash + end + + class InvoiceSettings < Orb::BaseModel + sig { returns(T::Boolean) } + def auto_collection + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def auto_collection=(_) + end + + sig { returns(Integer) } + def net_terms + end + + sig { params(_: Integer).returns(Integer) } + def net_terms=(_) + end + + sig { returns(T.nilable(String)) } + def memo + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def memo=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def require_successful_payment + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def require_successful_payment=(_) + end + + sig do + params( + auto_collection: T::Boolean, + net_terms: Integer, + memo: T.nilable(String), + require_successful_payment: T::Boolean + ) + .void + end + def initialize(auto_collection:, net_terms:, memo: nil, require_successful_payment: nil) + end + + sig do + override + .returns( + { + auto_collection: T::Boolean, + net_terms: Integer, + memo: T.nilable(String), + require_successful_payment: T::Boolean + } + ) + end + def to_hash + end + end + + class ExpiresAfterUnit < Orb::Enum + abstract! + + DAY = T.let(:day, T.nilable(Symbol)) + MONTH = T.let(:month, T.nilable(Symbol)) + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + end + end +end diff --git a/rbi/lib/orb/models/dimensional_price_configuration_model.rbi b/rbi/lib/orb/models/dimensional_price_configuration_model.rbi deleted file mode 100644 index e57d55de..00000000 --- a/rbi/lib/orb/models/dimensional_price_configuration_model.rbi +++ /dev/null @@ -1,31 +0,0 @@ -# typed: strong - -module Orb - module Models - class DimensionalPriceConfigurationModel < Orb::BaseModel - sig { returns(T::Array[String]) } - def dimension_values - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def dimension_values=(_) - end - - sig { returns(String) } - def dimensional_price_group_id - end - - sig { params(_: String).returns(String) } - def dimensional_price_group_id=(_) - end - - sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } - def initialize(dimension_values:, dimensional_price_group_id:) - end - - sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/dimensional_price_group_model.rbi b/rbi/lib/orb/models/dimensional_price_group_model.rbi deleted file mode 100644 index 3b3c4877..00000000 --- a/rbi/lib/orb/models/dimensional_price_group_model.rbi +++ /dev/null @@ -1,92 +0,0 @@ -# typed: strong - -module Orb - module Models - class DimensionalPriceGroupModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(String) } - def billable_metric_id - end - - sig { params(_: String).returns(String) } - def billable_metric_id=(_) - end - - sig { returns(T::Array[String]) } - def dimensions - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def dimensions=(_) - end - - sig { returns(T.nilable(String)) } - def external_dimensional_price_group_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_dimensional_price_group_id=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig do - params( - id: String, - billable_metric_id: String, - dimensions: T::Array[String], - external_dimensional_price_group_id: T.nilable(String), - metadata: T::Hash[Symbol, String], - name: String - ) - .void - end - def initialize( - id:, - billable_metric_id:, - dimensions:, - external_dimensional_price_group_id:, - metadata:, - name: - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric_id: String, - dimensions: T::Array[String], - external_dimensional_price_group_id: T.nilable(String), - metadata: T::Hash[Symbol, String], - name: String - } - ) - end - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/dimensional_price_groups.rbi b/rbi/lib/orb/models/dimensional_price_groups.rbi index 155743ab..a5156ccb 100644 --- a/rbi/lib/orb/models/dimensional_price_groups.rbi +++ b/rbi/lib/orb/models/dimensional_price_groups.rbi @@ -3,13 +3,13 @@ module Orb module Models class DimensionalPriceGroupsAPI < Orb::BaseModel - sig { returns(T::Array[Orb::Models::DimensionalPriceGroupModel]) } + sig { returns(T::Array[Orb::Models::DimensionalPriceGroup]) } def data end sig do - params(_: T::Array[Orb::Models::DimensionalPriceGroupModel]) - .returns(T::Array[Orb::Models::DimensionalPriceGroupModel]) + params(_: T::Array[Orb::Models::DimensionalPriceGroup]) + .returns(T::Array[Orb::Models::DimensionalPriceGroup]) end def data=(_) end @@ -24,7 +24,7 @@ module Orb sig do params( - data: T::Array[Orb::Models::DimensionalPriceGroupModel], + data: T::Array[Orb::Models::DimensionalPriceGroup], pagination_metadata: Orb::Models::PaginationMetadata ) .void @@ -35,10 +35,7 @@ module Orb sig do override .returns( - { - data: T::Array[Orb::Models::DimensionalPriceGroupModel], - pagination_metadata: Orb::Models::PaginationMetadata - } + {data: T::Array[Orb::Models::DimensionalPriceGroup], pagination_metadata: Orb::Models::PaginationMetadata} ) end def to_hash diff --git a/rbi/lib/orb/models/discount_model.rbi b/rbi/lib/orb/models/discount_model.rbi deleted file mode 100644 index 2be3da8d..00000000 --- a/rbi/lib/orb/models/discount_model.rbi +++ /dev/null @@ -1,78 +0,0 @@ -# typed: strong - -module Orb - module Models - class DiscountModel < Orb::Union - abstract! - - class UsageDiscount < Orb::BaseModel - sig { returns(T::Array[String]) } - def applies_to_price_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_ids=(_) - end - - sig { returns(Symbol) } - def discount_type - end - - sig { params(_: Symbol).returns(Symbol) } - def discount_type=(_) - end - - sig { returns(Float) } - def usage_discount - end - - sig { params(_: Float).returns(Float) } - def usage_discount=(_) - end - - sig { returns(T.nilable(String)) } - def reason - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reason=(_) - end - - sig do - params( - applies_to_price_ids: T::Array[String], - usage_discount: Float, - reason: T.nilable(String), - discount_type: Symbol - ) - .void - end - def initialize(applies_to_price_ids:, usage_discount:, reason: nil, discount_type: :usage) - end - - sig do - override - .returns( - { - applies_to_price_ids: T::Array[String], - discount_type: Symbol, - usage_discount: Float, - reason: T.nilable(String) - } - ) - end - def to_hash - end - end - - sig do - override - .returns( - [[Symbol, Orb::Models::PercentageDiscount], [Symbol, Orb::Models::TrialDiscount], [Symbol, Orb::Models::DiscountModel::UsageDiscount], [Symbol, Orb::Models::AmountDiscount]] - ) - end - private_class_method def self.variants - end - end - end -end diff --git a/rbi/lib/orb/models/discount_override_model.rbi b/rbi/lib/orb/models/discount_override_model.rbi deleted file mode 100644 index 9a78ba64..00000000 --- a/rbi/lib/orb/models/discount_override_model.rbi +++ /dev/null @@ -1,77 +0,0 @@ -# typed: strong - -module Orb - module Models - class DiscountOverrideModel < Orb::BaseModel - sig { returns(Symbol) } - def discount_type - end - - sig { params(_: Symbol).returns(Symbol) } - def discount_type=(_) - end - - sig { returns(T.nilable(String)) } - def amount_discount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def amount_discount=(_) - end - - sig { returns(T.nilable(Float)) } - def percentage_discount - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def percentage_discount=(_) - end - - sig { returns(T.nilable(Float)) } - def usage_discount - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def usage_discount=(_) - end - - sig do - params( - discount_type: Symbol, - amount_discount: T.nilable(String), - percentage_discount: T.nilable(Float), - usage_discount: T.nilable(Float) - ) - .void - end - def initialize(discount_type:, amount_discount: nil, percentage_discount: nil, usage_discount: nil) - end - - sig do - override - .returns( - { - discount_type: Symbol, - amount_discount: T.nilable(String), - percentage_discount: T.nilable(Float), - usage_discount: T.nilable(Float) - } - ) - end - def to_hash - end - - class DiscountType < Orb::Enum - abstract! - - PERCENTAGE = :percentage - USAGE = :usage - AMOUNT = :amount - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end -end diff --git a/rbi/lib/orb/models/edit_customer_model.rbi b/rbi/lib/orb/models/edit_customer_model.rbi deleted file mode 100644 index f2ab5e8b..00000000 --- a/rbi/lib/orb/models/edit_customer_model.rbi +++ /dev/null @@ -1,275 +0,0 @@ -# typed: strong - -module Orb - module Models - class EditCustomerModel < Orb::BaseModel - sig { returns(T.nilable(Orb::Models::NewAccountingSyncConfigurationModel)) } - def accounting_sync_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewAccountingSyncConfigurationModel)) - .returns(T.nilable(Orb::Models::NewAccountingSyncConfigurationModel)) - end - def accounting_sync_configuration=(_) - end - - sig { returns(T.nilable(T::Array[String])) } - def additional_emails - end - - sig { params(_: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } - def additional_emails=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def auto_collection - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def auto_collection=(_) - end - - sig { returns(T.nilable(Orb::Models::AddressInputModel)) } - def billing_address - end - - sig { params(_: T.nilable(Orb::Models::AddressInputModel)).returns(T.nilable(Orb::Models::AddressInputModel)) } - def billing_address=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def email - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def email=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def email_delivery - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def email_delivery=(_) - end - - sig { returns(T.nilable(String)) } - def external_customer_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_customer_id=(_) - end - - sig { returns(T.nilable(Orb::Models::CustomerHierarchyConfigModel)) } - def hierarchy - end - - sig do - params(_: T.nilable(Orb::Models::CustomerHierarchyConfigModel)) - .returns(T.nilable(Orb::Models::CustomerHierarchyConfigModel)) - end - def hierarchy=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def name - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def name=(_) - end - - sig { returns(T.nilable(Symbol)) } - def payment_provider - end - - sig { params(_: T.nilable(Symbol)).returns(T.nilable(Symbol)) } - def payment_provider=(_) - end - - sig { returns(T.nilable(String)) } - def payment_provider_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def payment_provider_id=(_) - end - - sig { returns(T.nilable(Orb::Models::NewReportingConfigurationModel)) } - def reporting_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewReportingConfigurationModel)) - .returns(T.nilable(Orb::Models::NewReportingConfigurationModel)) - end - def reporting_configuration=(_) - end - - sig { returns(T.nilable(Orb::Models::AddressInputModel)) } - def shipping_address - end - - sig { params(_: T.nilable(Orb::Models::AddressInputModel)).returns(T.nilable(Orb::Models::AddressInputModel)) } - def shipping_address=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration, - Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration - ) - ) - ) - end - def tax_configuration - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration, - Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration, - Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration - ) - ) - ) - end - def tax_configuration=(_) - end - - sig { returns(T.nilable(Orb::Models::CustomerTaxIDModel)) } - def tax_id - end - - sig { params(_: T.nilable(Orb::Models::CustomerTaxIDModel)).returns(T.nilable(Orb::Models::CustomerTaxIDModel)) } - def tax_id=(_) - end - - sig do - params( - accounting_sync_configuration: T.nilable(Orb::Models::NewAccountingSyncConfigurationModel), - additional_emails: T.nilable(T::Array[String]), - auto_collection: T.nilable(T::Boolean), - billing_address: T.nilable(Orb::Models::AddressInputModel), - currency: T.nilable(String), - email: T.nilable(String), - email_delivery: T.nilable(T::Boolean), - external_customer_id: T.nilable(String), - hierarchy: T.nilable(Orb::Models::CustomerHierarchyConfigModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - name: T.nilable(String), - payment_provider: T.nilable(Symbol), - payment_provider_id: T.nilable(String), - reporting_configuration: T.nilable(Orb::Models::NewReportingConfigurationModel), - shipping_address: T.nilable(Orb::Models::AddressInputModel), - tax_configuration: T.nilable( - T.any( - Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration, - Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration - ) - ), - tax_id: T.nilable(Orb::Models::CustomerTaxIDModel) - ) - .void - end - def initialize( - accounting_sync_configuration: nil, - additional_emails: nil, - auto_collection: nil, - billing_address: nil, - currency: nil, - email: nil, - email_delivery: nil, - external_customer_id: nil, - hierarchy: nil, - metadata: nil, - name: nil, - payment_provider: nil, - payment_provider_id: nil, - reporting_configuration: nil, - shipping_address: nil, - tax_configuration: nil, - tax_id: nil - ) - end - - sig do - override - .returns( - { - accounting_sync_configuration: T.nilable(Orb::Models::NewAccountingSyncConfigurationModel), - additional_emails: T.nilable(T::Array[String]), - auto_collection: T.nilable(T::Boolean), - billing_address: T.nilable(Orb::Models::AddressInputModel), - currency: T.nilable(String), - email: T.nilable(String), - email_delivery: T.nilable(T::Boolean), - external_customer_id: T.nilable(String), - hierarchy: T.nilable(Orb::Models::CustomerHierarchyConfigModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - name: T.nilable(String), - payment_provider: T.nilable(Symbol), - payment_provider_id: T.nilable(String), - reporting_configuration: T.nilable(Orb::Models::NewReportingConfigurationModel), - shipping_address: T.nilable(Orb::Models::AddressInputModel), - tax_configuration: T.nilable( - T.any( - Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration, - Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration - ) - ), - tax_id: T.nilable(Orb::Models::CustomerTaxIDModel) - } - ) - end - def to_hash - end - - class PaymentProvider < Orb::Enum - abstract! - - QUICKBOOKS = T.let(:quickbooks, T.nilable(Symbol)) - BILL_COM = T.let(:"bill.com", T.nilable(Symbol)) - STRIPE_CHARGE = T.let(:stripe_charge, T.nilable(Symbol)) - STRIPE_INVOICE = T.let(:stripe_invoice, T.nilable(Symbol)) - NETSUITE = T.let(:netsuite, T.nilable(Symbol)) - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end -end diff --git a/rbi/lib/orb/models/edit_plan_model.rbi b/rbi/lib/orb/models/edit_plan_model.rbi deleted file mode 100644 index 544a74b2..00000000 --- a/rbi/lib/orb/models/edit_plan_model.rbi +++ /dev/null @@ -1,45 +0,0 @@ -# typed: strong - -module Orb - module Models - class EditPlanModel < Orb::BaseModel - sig { returns(T.nilable(String)) } - def external_plan_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_plan_id=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - external_plan_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - ).void - end - def initialize(external_plan_id: nil, metadata: nil) - end - - sig do - override - .returns({ - external_plan_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - }) - end - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/events/backfill_close_response.rbi b/rbi/lib/orb/models/events/backfill_close_response.rbi new file mode 100644 index 00000000..15811b62 --- /dev/null +++ b/rbi/lib/orb/models/events/backfill_close_response.rbi @@ -0,0 +1,162 @@ +# typed: strong + +module Orb + module Models + module Events + class BackfillCloseResponse < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def close_time + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def close_time=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(T.nilable(String)) } + def customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def customer_id=(_) + end + + sig { returns(Integer) } + def events_ingested + end + + sig { params(_: Integer).returns(Integer) } + def events_ingested=(_) + end + + sig { returns(T::Boolean) } + def replace_existing_events + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def replace_existing_events=(_) + end + + sig { returns(T.nilable(Time)) } + def reverted_at + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def reverted_at=(_) + end + + sig { returns(Symbol) } + def status + end + + sig { params(_: Symbol).returns(Symbol) } + def status=(_) + end + + sig { returns(Time) } + def timeframe_end + end + + sig { params(_: Time).returns(Time) } + def timeframe_end=(_) + end + + sig { returns(Time) } + def timeframe_start + end + + sig { params(_: Time).returns(Time) } + def timeframe_start=(_) + end + + sig { returns(T.nilable(String)) } + def deprecation_filter + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def deprecation_filter=(_) + end + + sig do + params( + id: String, + close_time: T.nilable(Time), + created_at: Time, + customer_id: T.nilable(String), + events_ingested: Integer, + replace_existing_events: T::Boolean, + reverted_at: T.nilable(Time), + status: Symbol, + timeframe_end: Time, + timeframe_start: Time, + deprecation_filter: T.nilable(String) + ) + .void + end + def initialize( + id:, + close_time:, + created_at:, + customer_id:, + events_ingested:, + replace_existing_events:, + reverted_at:, + status:, + timeframe_end:, + timeframe_start:, + deprecation_filter: nil + ) + end + + sig do + override + .returns( + { + id: String, + close_time: T.nilable(Time), + created_at: Time, + customer_id: T.nilable(String), + events_ingested: Integer, + replace_existing_events: T::Boolean, + reverted_at: T.nilable(Time), + status: Symbol, + timeframe_end: Time, + timeframe_start: Time, + deprecation_filter: T.nilable(String) + } + ) + end + def to_hash + end + + class Status < Orb::Enum + abstract! + + PENDING = :pending + REFLECTED = :reflected + PENDING_REVERT = :pending_revert + REVERTED = :reverted + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + end +end diff --git a/rbi/lib/orb/models/events/backfill_create_response.rbi b/rbi/lib/orb/models/events/backfill_create_response.rbi new file mode 100644 index 00000000..8f7e0aea --- /dev/null +++ b/rbi/lib/orb/models/events/backfill_create_response.rbi @@ -0,0 +1,162 @@ +# typed: strong + +module Orb + module Models + module Events + class BackfillCreateResponse < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def close_time + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def close_time=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(T.nilable(String)) } + def customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def customer_id=(_) + end + + sig { returns(Integer) } + def events_ingested + end + + sig { params(_: Integer).returns(Integer) } + def events_ingested=(_) + end + + sig { returns(T::Boolean) } + def replace_existing_events + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def replace_existing_events=(_) + end + + sig { returns(T.nilable(Time)) } + def reverted_at + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def reverted_at=(_) + end + + sig { returns(Symbol) } + def status + end + + sig { params(_: Symbol).returns(Symbol) } + def status=(_) + end + + sig { returns(Time) } + def timeframe_end + end + + sig { params(_: Time).returns(Time) } + def timeframe_end=(_) + end + + sig { returns(Time) } + def timeframe_start + end + + sig { params(_: Time).returns(Time) } + def timeframe_start=(_) + end + + sig { returns(T.nilable(String)) } + def deprecation_filter + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def deprecation_filter=(_) + end + + sig do + params( + id: String, + close_time: T.nilable(Time), + created_at: Time, + customer_id: T.nilable(String), + events_ingested: Integer, + replace_existing_events: T::Boolean, + reverted_at: T.nilable(Time), + status: Symbol, + timeframe_end: Time, + timeframe_start: Time, + deprecation_filter: T.nilable(String) + ) + .void + end + def initialize( + id:, + close_time:, + created_at:, + customer_id:, + events_ingested:, + replace_existing_events:, + reverted_at:, + status:, + timeframe_end:, + timeframe_start:, + deprecation_filter: nil + ) + end + + sig do + override + .returns( + { + id: String, + close_time: T.nilable(Time), + created_at: Time, + customer_id: T.nilable(String), + events_ingested: Integer, + replace_existing_events: T::Boolean, + reverted_at: T.nilable(Time), + status: Symbol, + timeframe_end: Time, + timeframe_start: Time, + deprecation_filter: T.nilable(String) + } + ) + end + def to_hash + end + + class Status < Orb::Enum + abstract! + + PENDING = :pending + REFLECTED = :reflected + PENDING_REVERT = :pending_revert + REVERTED = :reverted + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + end +end diff --git a/rbi/lib/orb/models/events/backfill_fetch_response.rbi b/rbi/lib/orb/models/events/backfill_fetch_response.rbi new file mode 100644 index 00000000..b8a5636f --- /dev/null +++ b/rbi/lib/orb/models/events/backfill_fetch_response.rbi @@ -0,0 +1,162 @@ +# typed: strong + +module Orb + module Models + module Events + class BackfillFetchResponse < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def close_time + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def close_time=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(T.nilable(String)) } + def customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def customer_id=(_) + end + + sig { returns(Integer) } + def events_ingested + end + + sig { params(_: Integer).returns(Integer) } + def events_ingested=(_) + end + + sig { returns(T::Boolean) } + def replace_existing_events + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def replace_existing_events=(_) + end + + sig { returns(T.nilable(Time)) } + def reverted_at + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def reverted_at=(_) + end + + sig { returns(Symbol) } + def status + end + + sig { params(_: Symbol).returns(Symbol) } + def status=(_) + end + + sig { returns(Time) } + def timeframe_end + end + + sig { params(_: Time).returns(Time) } + def timeframe_end=(_) + end + + sig { returns(Time) } + def timeframe_start + end + + sig { params(_: Time).returns(Time) } + def timeframe_start=(_) + end + + sig { returns(T.nilable(String)) } + def deprecation_filter + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def deprecation_filter=(_) + end + + sig do + params( + id: String, + close_time: T.nilable(Time), + created_at: Time, + customer_id: T.nilable(String), + events_ingested: Integer, + replace_existing_events: T::Boolean, + reverted_at: T.nilable(Time), + status: Symbol, + timeframe_end: Time, + timeframe_start: Time, + deprecation_filter: T.nilable(String) + ) + .void + end + def initialize( + id:, + close_time:, + created_at:, + customer_id:, + events_ingested:, + replace_existing_events:, + reverted_at:, + status:, + timeframe_end:, + timeframe_start:, + deprecation_filter: nil + ) + end + + sig do + override + .returns( + { + id: String, + close_time: T.nilable(Time), + created_at: Time, + customer_id: T.nilable(String), + events_ingested: Integer, + replace_existing_events: T::Boolean, + reverted_at: T.nilable(Time), + status: Symbol, + timeframe_end: Time, + timeframe_start: Time, + deprecation_filter: T.nilable(String) + } + ) + end + def to_hash + end + + class Status < Orb::Enum + abstract! + + PENDING = :pending + REFLECTED = :reflected + PENDING_REVERT = :pending_revert + REVERTED = :reverted + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + end +end diff --git a/rbi/lib/orb/models/events/backfill_list_response.rbi b/rbi/lib/orb/models/events/backfill_list_response.rbi new file mode 100644 index 00000000..3beb2761 --- /dev/null +++ b/rbi/lib/orb/models/events/backfill_list_response.rbi @@ -0,0 +1,162 @@ +# typed: strong + +module Orb + module Models + module Events + class BackfillListResponse < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def close_time + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def close_time=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(T.nilable(String)) } + def customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def customer_id=(_) + end + + sig { returns(Integer) } + def events_ingested + end + + sig { params(_: Integer).returns(Integer) } + def events_ingested=(_) + end + + sig { returns(T::Boolean) } + def replace_existing_events + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def replace_existing_events=(_) + end + + sig { returns(T.nilable(Time)) } + def reverted_at + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def reverted_at=(_) + end + + sig { returns(Symbol) } + def status + end + + sig { params(_: Symbol).returns(Symbol) } + def status=(_) + end + + sig { returns(Time) } + def timeframe_end + end + + sig { params(_: Time).returns(Time) } + def timeframe_end=(_) + end + + sig { returns(Time) } + def timeframe_start + end + + sig { params(_: Time).returns(Time) } + def timeframe_start=(_) + end + + sig { returns(T.nilable(String)) } + def deprecation_filter + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def deprecation_filter=(_) + end + + sig do + params( + id: String, + close_time: T.nilable(Time), + created_at: Time, + customer_id: T.nilable(String), + events_ingested: Integer, + replace_existing_events: T::Boolean, + reverted_at: T.nilable(Time), + status: Symbol, + timeframe_end: Time, + timeframe_start: Time, + deprecation_filter: T.nilable(String) + ) + .void + end + def initialize( + id:, + close_time:, + created_at:, + customer_id:, + events_ingested:, + replace_existing_events:, + reverted_at:, + status:, + timeframe_end:, + timeframe_start:, + deprecation_filter: nil + ) + end + + sig do + override + .returns( + { + id: String, + close_time: T.nilable(Time), + created_at: Time, + customer_id: T.nilable(String), + events_ingested: Integer, + replace_existing_events: T::Boolean, + reverted_at: T.nilable(Time), + status: Symbol, + timeframe_end: Time, + timeframe_start: Time, + deprecation_filter: T.nilable(String) + } + ) + end + def to_hash + end + + class Status < Orb::Enum + abstract! + + PENDING = :pending + REFLECTED = :reflected + PENDING_REVERT = :pending_revert + REVERTED = :reverted + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + end +end diff --git a/rbi/lib/orb/models/events/backfill_revert_response.rbi b/rbi/lib/orb/models/events/backfill_revert_response.rbi new file mode 100644 index 00000000..501598fc --- /dev/null +++ b/rbi/lib/orb/models/events/backfill_revert_response.rbi @@ -0,0 +1,162 @@ +# typed: strong + +module Orb + module Models + module Events + class BackfillRevertResponse < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Time)) } + def close_time + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def close_time=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(T.nilable(String)) } + def customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def customer_id=(_) + end + + sig { returns(Integer) } + def events_ingested + end + + sig { params(_: Integer).returns(Integer) } + def events_ingested=(_) + end + + sig { returns(T::Boolean) } + def replace_existing_events + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def replace_existing_events=(_) + end + + sig { returns(T.nilable(Time)) } + def reverted_at + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def reverted_at=(_) + end + + sig { returns(Symbol) } + def status + end + + sig { params(_: Symbol).returns(Symbol) } + def status=(_) + end + + sig { returns(Time) } + def timeframe_end + end + + sig { params(_: Time).returns(Time) } + def timeframe_end=(_) + end + + sig { returns(Time) } + def timeframe_start + end + + sig { params(_: Time).returns(Time) } + def timeframe_start=(_) + end + + sig { returns(T.nilable(String)) } + def deprecation_filter + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def deprecation_filter=(_) + end + + sig do + params( + id: String, + close_time: T.nilable(Time), + created_at: Time, + customer_id: T.nilable(String), + events_ingested: Integer, + replace_existing_events: T::Boolean, + reverted_at: T.nilable(Time), + status: Symbol, + timeframe_end: Time, + timeframe_start: Time, + deprecation_filter: T.nilable(String) + ) + .void + end + def initialize( + id:, + close_time:, + created_at:, + customer_id:, + events_ingested:, + replace_existing_events:, + reverted_at:, + status:, + timeframe_end:, + timeframe_start:, + deprecation_filter: nil + ) + end + + sig do + override + .returns( + { + id: String, + close_time: T.nilable(Time), + created_at: Time, + customer_id: T.nilable(String), + events_ingested: Integer, + replace_existing_events: T::Boolean, + reverted_at: T.nilable(Time), + status: Symbol, + timeframe_end: Time, + timeframe_start: Time, + deprecation_filter: T.nilable(String) + } + ) + end + def to_hash + end + + class Status < Orb::Enum + abstract! + + PENDING = :pending + REFLECTED = :reflected + PENDING_REVERT = :pending_revert + REVERTED = :reverted + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + end +end diff --git a/rbi/lib/orb/models/fixed_fee_quantity_schedule_entry_model.rbi b/rbi/lib/orb/models/fixed_fee_quantity_schedule_entry_model.rbi deleted file mode 100644 index 0a803d90..00000000 --- a/rbi/lib/orb/models/fixed_fee_quantity_schedule_entry_model.rbi +++ /dev/null @@ -1,49 +0,0 @@ -# typed: strong - -module Orb - module Models - class FixedFeeQuantityScheduleEntryModel < Orb::BaseModel - sig { returns(T.nilable(Time)) } - def end_date - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def end_date=(_) - end - - sig { returns(String) } - def price_id - end - - sig { params(_: String).returns(String) } - def price_id=(_) - end - - sig { returns(Float) } - def quantity - end - - sig { params(_: Float).returns(Float) } - def quantity=(_) - end - - sig { returns(Time) } - def start_date - end - - sig { params(_: Time).returns(Time) } - def start_date=(_) - end - - sig { params(end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time).void } - def initialize(end_date:, price_id:, quantity:, start_date:) - end - - sig do - override.returns({end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time}) - end - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/invoice.rbi b/rbi/lib/orb/models/invoice.rbi index 7a9b7a53..90b16c14 100644 --- a/rbi/lib/orb/models/invoice.rbi +++ b/rbi/lib/orb/models/invoice.rbi @@ -19,19 +19,22 @@ module Orb def amount_due=(_) end - sig { returns(Orb::Models::AutoCollectionModel) } + sig { returns(Orb::Models::Invoice::AutoCollection) } def auto_collection end - sig { params(_: Orb::Models::AutoCollectionModel).returns(Orb::Models::AutoCollectionModel) } + sig { params(_: Orb::Models::Invoice::AutoCollection).returns(Orb::Models::Invoice::AutoCollection) } def auto_collection=(_) end - sig { returns(T.nilable(Orb::Models::AddressModel)) } + sig { returns(T.nilable(Orb::Models::Invoice::BillingAddress)) } def billing_address end - sig { params(_: T.nilable(Orb::Models::AddressModel)).returns(T.nilable(Orb::Models::AddressModel)) } + sig do + params(_: T.nilable(Orb::Models::Invoice::BillingAddress)) + .returns(T.nilable(Orb::Models::Invoice::BillingAddress)) + end def billing_address=(_) end @@ -43,14 +46,11 @@ module Orb def created_at=(_) end - sig { returns(T::Array[Orb::Models::CreditNoteSummaryModel]) } + sig { returns(T::Array[Orb::Models::Invoice::CreditNote]) } def credit_notes end - sig do - params(_: T::Array[Orb::Models::CreditNoteSummaryModel]) - .returns(T::Array[Orb::Models::CreditNoteSummaryModel]) - end + sig { params(_: T::Array[Orb::Models::Invoice::CreditNote]).returns(T::Array[Orb::Models::Invoice::CreditNote]) } def credit_notes=(_) end @@ -62,30 +62,33 @@ module Orb def currency=(_) end - sig { returns(Orb::Models::CustomerMinifiedModel) } + sig { returns(Orb::Models::Invoice::Customer) } def customer end - sig { params(_: Orb::Models::CustomerMinifiedModel).returns(Orb::Models::CustomerMinifiedModel) } + sig { params(_: Orb::Models::Invoice::Customer).returns(Orb::Models::Invoice::Customer) } def customer=(_) end - sig { returns(T::Array[Orb::Models::CustomerBalanceTransactionModel]) } + sig { returns(T::Array[Orb::Models::Invoice::CustomerBalanceTransaction]) } def customer_balance_transactions end sig do - params(_: T::Array[Orb::Models::CustomerBalanceTransactionModel]) - .returns(T::Array[Orb::Models::CustomerBalanceTransactionModel]) + params(_: T::Array[Orb::Models::Invoice::CustomerBalanceTransaction]) + .returns(T::Array[Orb::Models::Invoice::CustomerBalanceTransaction]) end def customer_balance_transactions=(_) end - sig { returns(T.nilable(Orb::Models::CustomerTaxIDModel)) } + sig { returns(T.nilable(Orb::Models::Invoice::CustomerTaxID)) } def customer_tax_id end - sig { params(_: T.nilable(Orb::Models::CustomerTaxIDModel)).returns(T.nilable(Orb::Models::CustomerTaxIDModel)) } + sig do + params(_: T.nilable(Orb::Models::Invoice::CustomerTaxID)) + .returns(T.nilable(Orb::Models::Invoice::CustomerTaxID)) + end def customer_tax_id=(_) end @@ -188,21 +191,19 @@ module Orb def issued_at=(_) end - sig { returns(T::Array[Orb::Models::InvoiceLineItemModel]) } + sig { returns(T::Array[Orb::Models::Invoice::LineItem]) } def line_items end - sig do - params(_: T::Array[Orb::Models::InvoiceLineItemModel]).returns(T::Array[Orb::Models::InvoiceLineItemModel]) - end + sig { params(_: T::Array[Orb::Models::Invoice::LineItem]).returns(T::Array[Orb::Models::Invoice::LineItem]) } def line_items=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Invoice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig { params(_: T.nilable(Orb::Models::Invoice::Maximum)).returns(T.nilable(Orb::Models::Invoice::Maximum)) } def maximum=(_) end @@ -230,11 +231,11 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Invoice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig { params(_: T.nilable(Orb::Models::Invoice::Minimum)).returns(T.nilable(Orb::Models::Invoice::Minimum)) } def minimum=(_) end @@ -254,11 +255,14 @@ module Orb def paid_at=(_) end - sig { returns(T::Array[Orb::Models::PaymentAttemptModel]) } + sig { returns(T::Array[Orb::Models::Invoice::PaymentAttempt]) } def payment_attempts end - sig { params(_: T::Array[Orb::Models::PaymentAttemptModel]).returns(T::Array[Orb::Models::PaymentAttemptModel]) } + sig do + params(_: T::Array[Orb::Models::Invoice::PaymentAttempt]) + .returns(T::Array[Orb::Models::Invoice::PaymentAttempt]) + end def payment_attempts=(_) end @@ -286,11 +290,14 @@ module Orb def scheduled_issue_at=(_) end - sig { returns(T.nilable(Orb::Models::AddressModel)) } + sig { returns(T.nilable(Orb::Models::Invoice::ShippingAddress)) } def shipping_address end - sig { params(_: T.nilable(Orb::Models::AddressModel)).returns(T.nilable(Orb::Models::AddressModel)) } + sig do + params(_: T.nilable(Orb::Models::Invoice::ShippingAddress)) + .returns(T.nilable(Orb::Models::Invoice::ShippingAddress)) + end def shipping_address=(_) end @@ -302,13 +309,13 @@ module Orb def status=(_) end - sig { returns(T.nilable(Orb::Models::SubscriptionMinifiedModel)) } + sig { returns(T.nilable(Orb::Models::Invoice::Subscription)) } def subscription end sig do - params(_: T.nilable(Orb::Models::SubscriptionMinifiedModel)) - .returns(T.nilable(Orb::Models::SubscriptionMinifiedModel)) + params(_: T.nilable(Orb::Models::Invoice::Subscription)) + .returns(T.nilable(Orb::Models::Invoice::Subscription)) end def subscription=(_) end @@ -357,14 +364,14 @@ module Orb params( id: String, amount_due: String, - auto_collection: Orb::Models::AutoCollectionModel, - billing_address: T.nilable(Orb::Models::AddressModel), + auto_collection: Orb::Models::Invoice::AutoCollection, + billing_address: T.nilable(Orb::Models::Invoice::BillingAddress), created_at: Time, - credit_notes: T::Array[Orb::Models::CreditNoteSummaryModel], + credit_notes: T::Array[Orb::Models::Invoice::CreditNote], currency: String, - customer: Orb::Models::CustomerMinifiedModel, - customer_balance_transactions: T::Array[Orb::Models::CustomerBalanceTransactionModel], - customer_tax_id: T.nilable(Orb::Models::CustomerTaxIDModel), + customer: Orb::Models::Invoice::Customer, + customer_balance_transactions: T::Array[Orb::Models::Invoice::CustomerBalanceTransaction], + customer_tax_id: T.nilable(Orb::Models::Invoice::CustomerTaxID), discount: T.anything, discounts: T::Array[T.any(Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount)], due_date: T.nilable(Time), @@ -376,21 +383,21 @@ module Orb invoice_source: Symbol, issue_failed_at: T.nilable(Time), issued_at: T.nilable(Time), - line_items: T::Array[Orb::Models::InvoiceLineItemModel], - maximum: T.nilable(Orb::Models::MaximumModel), + line_items: T::Array[Orb::Models::Invoice::LineItem], + maximum: T.nilable(Orb::Models::Invoice::Maximum), maximum_amount: T.nilable(String), memo: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Invoice::Minimum), minimum_amount: T.nilable(String), paid_at: T.nilable(Time), - payment_attempts: T::Array[Orb::Models::PaymentAttemptModel], + payment_attempts: T::Array[Orb::Models::Invoice::PaymentAttempt], payment_failed_at: T.nilable(Time), payment_started_at: T.nilable(Time), scheduled_issue_at: T.nilable(Time), - shipping_address: T.nilable(Orb::Models::AddressModel), + shipping_address: T.nilable(Orb::Models::Invoice::ShippingAddress), status: Symbol, - subscription: T.nilable(Orb::Models::SubscriptionMinifiedModel), + subscription: T.nilable(Orb::Models::Invoice::Subscription), subtotal: String, sync_failed_at: T.nilable(Time), total: String, @@ -450,14 +457,14 @@ module Orb { id: String, amount_due: String, - auto_collection: Orb::Models::AutoCollectionModel, - billing_address: T.nilable(Orb::Models::AddressModel), + auto_collection: Orb::Models::Invoice::AutoCollection, + billing_address: T.nilable(Orb::Models::Invoice::BillingAddress), created_at: Time, - credit_notes: T::Array[Orb::Models::CreditNoteSummaryModel], + credit_notes: T::Array[Orb::Models::Invoice::CreditNote], currency: String, - customer: Orb::Models::CustomerMinifiedModel, - customer_balance_transactions: T::Array[Orb::Models::CustomerBalanceTransactionModel], - customer_tax_id: T.nilable(Orb::Models::CustomerTaxIDModel), + customer: Orb::Models::Invoice::Customer, + customer_balance_transactions: T::Array[Orb::Models::Invoice::CustomerBalanceTransaction], + customer_tax_id: T.nilable(Orb::Models::Invoice::CustomerTaxID), discount: T.anything, discounts: T::Array[T.any(Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount)], due_date: T.nilable(Time), @@ -469,21 +476,21 @@ module Orb invoice_source: Symbol, issue_failed_at: T.nilable(Time), issued_at: T.nilable(Time), - line_items: T::Array[Orb::Models::InvoiceLineItemModel], - maximum: T.nilable(Orb::Models::MaximumModel), + line_items: T::Array[Orb::Models::Invoice::LineItem], + maximum: T.nilable(Orb::Models::Invoice::Maximum), maximum_amount: T.nilable(String), memo: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Invoice::Minimum), minimum_amount: T.nilable(String), paid_at: T.nilable(Time), - payment_attempts: T::Array[Orb::Models::PaymentAttemptModel], + payment_attempts: T::Array[Orb::Models::Invoice::PaymentAttempt], payment_failed_at: T.nilable(Time), payment_started_at: T.nilable(Time), scheduled_issue_at: T.nilable(Time), - shipping_address: T.nilable(Orb::Models::AddressModel), + shipping_address: T.nilable(Orb::Models::Invoice::ShippingAddress), status: Symbol, - subscription: T.nilable(Orb::Models::SubscriptionMinifiedModel), + subscription: T.nilable(Orb::Models::Invoice::Subscription), subtotal: String, sync_failed_at: T.nilable(Time), total: String, @@ -495,6 +502,665 @@ module Orb def to_hash end + class AutoCollection < Orb::BaseModel + sig { returns(T.nilable(T::Boolean)) } + def enabled + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def enabled=(_) + end + + sig { returns(T.nilable(Time)) } + def next_attempt_at + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def next_attempt_at=(_) + end + + sig { returns(T.nilable(Integer)) } + def num_attempts + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def num_attempts=(_) + end + + sig { returns(T.nilable(Time)) } + def previously_attempted_at + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def previously_attempted_at=(_) + end + + sig do + params( + enabled: T.nilable(T::Boolean), + next_attempt_at: T.nilable(Time), + num_attempts: T.nilable(Integer), + previously_attempted_at: T.nilable(Time) + ) + .void + end + def initialize(enabled:, next_attempt_at:, num_attempts:, previously_attempted_at:) + end + + sig do + override + .returns( + { + enabled: T.nilable(T::Boolean), + next_attempt_at: T.nilable(Time), + num_attempts: T.nilable(Integer), + previously_attempted_at: T.nilable(Time) + } + ) + end + def to_hash + end + end + + class BillingAddress < Orb::BaseModel + sig { returns(T.nilable(String)) } + def city + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def city=(_) + end + + sig { returns(T.nilable(String)) } + def country + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def country=(_) + end + + sig { returns(T.nilable(String)) } + def line1 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line1=(_) + end + + sig { returns(T.nilable(String)) } + def line2 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line2=(_) + end + + sig { returns(T.nilable(String)) } + def postal_code + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def postal_code=(_) + end + + sig { returns(T.nilable(String)) } + def state + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def state=(_) + end + + sig do + params( + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + ) + .void + end + def initialize(city:, country:, line1:, line2:, postal_code:, state:) + end + + sig do + override + .returns( + { + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + } + ) + end + def to_hash + end + end + + class CreditNote < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def credit_note_number + end + + sig { params(_: String).returns(String) } + def credit_note_number=(_) + end + + sig { returns(T.nilable(String)) } + def memo + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def memo=(_) + end + + sig { returns(String) } + def reason + end + + sig { params(_: String).returns(String) } + def reason=(_) + end + + sig { returns(String) } + def total + end + + sig { params(_: String).returns(String) } + def total=(_) + end + + sig { returns(String) } + def type + end + + sig { params(_: String).returns(String) } + def type=(_) + end + + sig { returns(T.nilable(Time)) } + def voided_at + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def voided_at=(_) + end + + sig do + params( + id: String, + credit_note_number: String, + memo: T.nilable(String), + reason: String, + total: String, + type: String, + voided_at: T.nilable(Time) + ) + .void + end + def initialize(id:, credit_note_number:, memo:, reason:, total:, type:, voided_at:) + end + + sig do + override + .returns( + { + id: String, + credit_note_number: String, + memo: T.nilable(String), + reason: String, + total: String, + type: String, + voided_at: T.nilable(Time) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class CustomerBalanceTransaction < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def action + end + + sig { params(_: Symbol).returns(Symbol) } + def action=(_) + end + + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(T.nilable(Orb::Models::Invoice::CustomerBalanceTransaction::CreditNote)) } + def credit_note + end + + sig do + params(_: T.nilable(Orb::Models::Invoice::CustomerBalanceTransaction::CreditNote)) + .returns(T.nilable(Orb::Models::Invoice::CustomerBalanceTransaction::CreditNote)) + end + def credit_note=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(String) } + def ending_balance + end + + sig { params(_: String).returns(String) } + def ending_balance=(_) + end + + sig { returns(T.nilable(Orb::Models::Invoice::CustomerBalanceTransaction::Invoice)) } + def invoice + end + + sig do + params(_: T.nilable(Orb::Models::Invoice::CustomerBalanceTransaction::Invoice)) + .returns(T.nilable(Orb::Models::Invoice::CustomerBalanceTransaction::Invoice)) + end + def invoice=(_) + end + + sig { returns(String) } + def starting_balance + end + + sig { params(_: String).returns(String) } + def starting_balance=(_) + end + + sig { returns(Symbol) } + def type + end + + sig { params(_: Symbol).returns(Symbol) } + def type=(_) + end + + sig do + params( + id: String, + action: Symbol, + amount: String, + created_at: Time, + credit_note: T.nilable(Orb::Models::Invoice::CustomerBalanceTransaction::CreditNote), + description: T.nilable(String), + ending_balance: String, + invoice: T.nilable(Orb::Models::Invoice::CustomerBalanceTransaction::Invoice), + starting_balance: String, + type: Symbol + ) + .void + end + def initialize( + id:, + action:, + amount:, + created_at:, + credit_note:, + description:, + ending_balance:, + invoice:, + starting_balance:, + type: + ) + end + + sig do + override + .returns( + { + id: String, + action: Symbol, + amount: String, + created_at: Time, + credit_note: T.nilable(Orb::Models::Invoice::CustomerBalanceTransaction::CreditNote), + description: T.nilable(String), + ending_balance: String, + invoice: T.nilable(Orb::Models::Invoice::CustomerBalanceTransaction::Invoice), + starting_balance: String, + type: Symbol + } + ) + end + def to_hash + end + + class Action < Orb::Enum + abstract! + + APPLIED_TO_INVOICE = :applied_to_invoice + MANUAL_ADJUSTMENT = :manual_adjustment + PRORATED_REFUND = :prorated_refund + REVERT_PRORATED_REFUND = :revert_prorated_refund + RETURN_FROM_VOIDING = :return_from_voiding + CREDIT_NOTE_APPLIED = :credit_note_applied + CREDIT_NOTE_VOIDED = :credit_note_voided + OVERPAYMENT_REFUND = :overpayment_refund + EXTERNAL_PAYMENT = :external_payment + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class CreditNote < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class Invoice < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class Type < Orb::Enum + abstract! + + INCREMENT = :increment + DECREMENT = :decrement + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class CustomerTaxID < Orb::BaseModel + sig { returns(Symbol) } + def country + end + + sig { params(_: Symbol).returns(Symbol) } + def country=(_) + end + + sig { returns(Symbol) } + def type + end + + sig { params(_: Symbol).returns(Symbol) } + def type=(_) + end + + sig { returns(String) } + def value + end + + sig { params(_: String).returns(String) } + def value=(_) + end + + sig { params(country: Symbol, type: Symbol, value: String).void } + def initialize(country:, type:, value:) + end + + sig { override.returns({country: Symbol, type: Symbol, value: String}) } + def to_hash + end + + class Country < Orb::Enum + abstract! + + AD = :AD + AE = :AE + AR = :AR + AT = :AT + AU = :AU + BE = :BE + BG = :BG + BH = :BH + BO = :BO + BR = :BR + CA = :CA + CH = :CH + CL = :CL + CN = :CN + CO = :CO + CR = :CR + CY = :CY + CZ = :CZ + DE = :DE + DK = :DK + EE = :EE + DO = :DO + EC = :EC + EG = :EG + ES = :ES + EU = :EU + FI = :FI + FR = :FR + GB = :GB + GE = :GE + GR = :GR + HK = :HK + HR = :HR + HU = :HU + ID = :ID + IE = :IE + IL = :IL + IN = :IN + IS = :IS + IT = :IT + JP = :JP + KE = :KE + KR = :KR + KZ = :KZ + LI = :LI + LT = :LT + LU = :LU + LV = :LV + MT = :MT + MX = :MX + MY = :MY + NG = :NG + NL = :NL + NO = :NO + NZ = :NZ + OM = :OM + PE = :PE + PH = :PH + PL = :PL + PT = :PT + RO = :RO + RS = :RS + RU = :RU + SA = :SA + SE = :SE + SG = :SG + SI = :SI + SK = :SK + SV = :SV + TH = :TH + TR = :TR + TW = :TW + UA = :UA + US = :US + UY = :UY + VE = :VE + VN = :VN + ZA = :ZA + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class Type < Orb::Enum + abstract! + + AD_NRT = :ad_nrt + AE_TRN = :ae_trn + AR_CUIT = :ar_cuit + EU_VAT = :eu_vat + AU_ABN = :au_abn + AU_ARN = :au_arn + BG_UIC = :bg_uic + BH_VAT = :bh_vat + BO_TIN = :bo_tin + BR_CNPJ = :br_cnpj + BR_CPF = :br_cpf + CA_BN = :ca_bn + CA_GST_HST = :ca_gst_hst + CA_PST_BC = :ca_pst_bc + CA_PST_MB = :ca_pst_mb + CA_PST_SK = :ca_pst_sk + CA_QST = :ca_qst + CH_VAT = :ch_vat + CL_TIN = :cl_tin + CN_TIN = :cn_tin + CO_NIT = :co_nit + CR_TIN = :cr_tin + DO_RCN = :do_rcn + EC_RUC = :ec_ruc + EG_TIN = :eg_tin + ES_CIF = :es_cif + EU_OSS_VAT = :eu_oss_vat + GB_VAT = :gb_vat + GE_VAT = :ge_vat + HK_BR = :hk_br + HU_TIN = :hu_tin + ID_NPWP = :id_npwp + IL_VAT = :il_vat + IN_GST = :in_gst + IS_VAT = :is_vat + JP_CN = :jp_cn + JP_RN = :jp_rn + JP_TRN = :jp_trn + KE_PIN = :ke_pin + KR_BRN = :kr_brn + KZ_BIN = :kz_bin + LI_UID = :li_uid + MX_RFC = :mx_rfc + MY_FRP = :my_frp + MY_ITN = :my_itn + MY_SST = :my_sst + NG_TIN = :ng_tin + NO_VAT = :no_vat + NO_VOEC = :no_voec + NZ_GST = :nz_gst + OM_VAT = :om_vat + PE_RUC = :pe_ruc + PH_TIN = :ph_tin + RO_TIN = :ro_tin + RS_PIB = :rs_pib + RU_INN = :ru_inn + RU_KPP = :ru_kpp + SA_VAT = :sa_vat + SG_GST = :sg_gst + SG_UEN = :sg_uen + SI_TIN = :si_tin + SV_NIT = :sv_nit + TH_VAT = :th_vat + TR_TIN = :tr_tin + TW_VAT = :tw_vat + UA_VAT = :ua_vat + US_EIN = :us_ein + UY_RUC = :uy_ruc + VE_RIF = :ve_rif + VN_TIN = :vn_tin + ZA_VAT = :za_vat + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class InvoiceSource < Orb::Enum abstract! @@ -507,6 +1173,1802 @@ module Orb end end + class LineItem < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def adjusted_subtotal + end + + sig { params(_: String).returns(String) } + def adjusted_subtotal=(_) + end + + sig do + returns( + T::Array[ + T.any( + Orb::Models::Invoice::LineItem::Adjustment::MonetaryUsageDiscountAdjustment, + Orb::Models::Invoice::LineItem::Adjustment::MonetaryAmountDiscountAdjustment, + Orb::Models::Invoice::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment, + Orb::Models::Invoice::LineItem::Adjustment::MonetaryMinimumAdjustment, + Orb::Models::Invoice::LineItem::Adjustment::MonetaryMaximumAdjustment + ) + ] + ) + end + def adjustments + end + + sig do + params( + _: T::Array[ + T.any( + Orb::Models::Invoice::LineItem::Adjustment::MonetaryUsageDiscountAdjustment, + Orb::Models::Invoice::LineItem::Adjustment::MonetaryAmountDiscountAdjustment, + Orb::Models::Invoice::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment, + Orb::Models::Invoice::LineItem::Adjustment::MonetaryMinimumAdjustment, + Orb::Models::Invoice::LineItem::Adjustment::MonetaryMaximumAdjustment + ) + ] + ) + .returns( + T::Array[ + T.any( + Orb::Models::Invoice::LineItem::Adjustment::MonetaryUsageDiscountAdjustment, + Orb::Models::Invoice::LineItem::Adjustment::MonetaryAmountDiscountAdjustment, + Orb::Models::Invoice::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment, + Orb::Models::Invoice::LineItem::Adjustment::MonetaryMinimumAdjustment, + Orb::Models::Invoice::LineItem::Adjustment::MonetaryMaximumAdjustment + ) + ] + ) + end + def adjustments=(_) + end + + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(String) } + def credits_applied + end + + sig { params(_: String).returns(String) } + def credits_applied=(_) + end + + sig do + returns( + T.nilable( + T.any( + Orb::Models::PercentageDiscount, + Orb::Models::TrialDiscount, + Orb::Models::Discount::UsageDiscount, + Orb::Models::AmountDiscount + ) + ) + ) + end + def discount + end + + sig do + params( + _: T.nilable( + T.any( + Orb::Models::PercentageDiscount, + Orb::Models::TrialDiscount, + Orb::Models::Discount::UsageDiscount, + Orb::Models::AmountDiscount + ) + ) + ) + .returns( + T.nilable( + T.any( + Orb::Models::PercentageDiscount, + Orb::Models::TrialDiscount, + Orb::Models::Discount::UsageDiscount, + Orb::Models::AmountDiscount + ) + ) + ) + end + def discount=(_) + end + + sig { returns(Time) } + def end_date + end + + sig { params(_: Time).returns(Time) } + def end_date=(_) + end + + sig { returns(T.nilable(String)) } + def filter + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def filter=(_) + end + + sig { returns(T.nilable(String)) } + def grouping + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def grouping=(_) + end + + sig { returns(T.nilable(Orb::Models::Invoice::LineItem::Maximum)) } + def maximum + end + + sig do + params(_: T.nilable(Orb::Models::Invoice::LineItem::Maximum)) + .returns(T.nilable(Orb::Models::Invoice::LineItem::Maximum)) + end + def maximum=(_) + end + + sig { returns(T.nilable(String)) } + def maximum_amount + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(Orb::Models::Invoice::LineItem::Minimum)) } + def minimum + end + + sig do + params(_: T.nilable(Orb::Models::Invoice::LineItem::Minimum)) + .returns(T.nilable(Orb::Models::Invoice::LineItem::Minimum)) + end + def minimum=(_) + end + + sig { returns(T.nilable(String)) } + def minimum_amount + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def minimum_amount=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(String) } + def partially_invoiced_amount + end + + sig { params(_: String).returns(String) } + def partially_invoiced_amount=(_) + end + + sig do + returns( + T.nilable( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + ) + end + def price + end + + sig do + params( + _: T.nilable( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + ) + .returns( + T.nilable( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + ) + end + def price=(_) + end + + sig { returns(Float) } + def quantity + end + + sig { params(_: Float).returns(Float) } + def quantity=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + returns( + T::Array[ + T.any( + Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem, + Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem, + Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem + ) + ] + ) + end + def sub_line_items + end + + sig do + params( + _: T::Array[ + T.any( + Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem, + Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem, + Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem + ) + ] + ) + .returns( + T::Array[ + T.any( + Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem, + Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem, + Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem + ) + ] + ) + end + def sub_line_items=(_) + end + + sig { returns(String) } + def subtotal + end + + sig { params(_: String).returns(String) } + def subtotal=(_) + end + + sig { returns(T::Array[Orb::Models::Invoice::LineItem::TaxAmount]) } + def tax_amounts + end + + sig do + params(_: T::Array[Orb::Models::Invoice::LineItem::TaxAmount]) + .returns(T::Array[Orb::Models::Invoice::LineItem::TaxAmount]) + end + def tax_amounts=(_) + end + + sig { returns(T.nilable(T::Array[String])) } + def usage_customer_ids + end + + sig { params(_: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def usage_customer_ids=(_) + end + + sig do + params( + id: String, + adjusted_subtotal: String, + adjustments: T::Array[ + T.any( + Orb::Models::Invoice::LineItem::Adjustment::MonetaryUsageDiscountAdjustment, + Orb::Models::Invoice::LineItem::Adjustment::MonetaryAmountDiscountAdjustment, + Orb::Models::Invoice::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment, + Orb::Models::Invoice::LineItem::Adjustment::MonetaryMinimumAdjustment, + Orb::Models::Invoice::LineItem::Adjustment::MonetaryMaximumAdjustment + ) + ], + amount: String, + credits_applied: String, + discount: T.nilable( + T.any( + Orb::Models::PercentageDiscount, + Orb::Models::TrialDiscount, + Orb::Models::Discount::UsageDiscount, + Orb::Models::AmountDiscount + ) + ), + end_date: Time, + filter: T.nilable(String), + grouping: T.nilable(String), + maximum: T.nilable(Orb::Models::Invoice::LineItem::Maximum), + maximum_amount: T.nilable(String), + minimum: T.nilable(Orb::Models::Invoice::LineItem::Minimum), + minimum_amount: T.nilable(String), + name: String, + partially_invoiced_amount: String, + price: T.nilable( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ), + quantity: Float, + start_date: Time, + sub_line_items: T::Array[ + T.any( + Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem, + Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem, + Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem + ) + ], + subtotal: String, + tax_amounts: T::Array[Orb::Models::Invoice::LineItem::TaxAmount], + usage_customer_ids: T.nilable(T::Array[String]) + ) + .void + end + def initialize( + id:, + adjusted_subtotal:, + adjustments:, + amount:, + credits_applied:, + discount:, + end_date:, + filter:, + grouping:, + maximum:, + maximum_amount:, + minimum:, + minimum_amount:, + name:, + partially_invoiced_amount:, + price:, + quantity:, + start_date:, + sub_line_items:, + subtotal:, + tax_amounts:, + usage_customer_ids: + ) + end + + sig do + override + .returns( + { + id: String, + adjusted_subtotal: String, + adjustments: T::Array[ + T.any( + Orb::Models::Invoice::LineItem::Adjustment::MonetaryUsageDiscountAdjustment, + Orb::Models::Invoice::LineItem::Adjustment::MonetaryAmountDiscountAdjustment, + Orb::Models::Invoice::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment, + Orb::Models::Invoice::LineItem::Adjustment::MonetaryMinimumAdjustment, + Orb::Models::Invoice::LineItem::Adjustment::MonetaryMaximumAdjustment + ) + ], + amount: String, + credits_applied: String, + discount: T.nilable( + T.any( + Orb::Models::PercentageDiscount, + Orb::Models::TrialDiscount, + Orb::Models::Discount::UsageDiscount, + Orb::Models::AmountDiscount + ) + ), + end_date: Time, + filter: T.nilable(String), + grouping: T.nilable(String), + maximum: T.nilable(Orb::Models::Invoice::LineItem::Maximum), + maximum_amount: T.nilable(String), + minimum: T.nilable(Orb::Models::Invoice::LineItem::Minimum), + minimum_amount: T.nilable(String), + name: String, + partially_invoiced_amount: String, + price: T.nilable( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ), + quantity: Float, + start_date: Time, + sub_line_items: T::Array[ + T.any( + Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem, + Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem, + Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem + ) + ], + subtotal: String, + tax_amounts: T::Array[Orb::Models::Invoice::LineItem::TaxAmount], + usage_customer_ids: T.nilable(T::Array[String]) + } + ) + end + def to_hash + end + + class Adjustment < Orb::Union + abstract! + + class MonetaryUsageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + id: String, + amount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + reason: T.nilable(String), + usage_discount: Float, + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + applies_to_price_ids:, + is_invoice_level:, + reason:, + usage_discount:, + adjustment_type: :usage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + amount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + reason: T.nilable(String), + usage_discount: Float + } + ) + end + def to_hash + end + end + + class MonetaryAmountDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + amount: String, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + amount_discount:, + applies_to_price_ids:, + is_invoice_level:, + reason:, + adjustment_type: :amount_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + amount: String, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class MonetaryPercentageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + amount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + applies_to_price_ids:, + is_invoice_level:, + percentage_discount:, + reason:, + adjustment_type: :percentage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + amount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class MonetaryMinimumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + amount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + applies_to_price_ids:, + is_invoice_level:, + item_id:, + minimum_amount:, + reason:, + adjustment_type: :minimum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + amount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class MonetaryMaximumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + amount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + applies_to_price_ids:, + is_invoice_level:, + maximum_amount:, + reason:, + adjustment_type: :maximum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + amount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::Invoice::LineItem::Adjustment::MonetaryUsageDiscountAdjustment], [Symbol, Orb::Models::Invoice::LineItem::Adjustment::MonetaryAmountDiscountAdjustment], [Symbol, Orb::Models::Invoice::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment], [Symbol, Orb::Models::Invoice::LineItem::Adjustment::MonetaryMinimumAdjustment], [Symbol, Orb::Models::Invoice::LineItem::Adjustment::MonetaryMaximumAdjustment]] + ) + end + private_class_method def self.variants + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + + class SubLineItem < Orb::Union + abstract! + + class MatrixSubLineItem < Orb::BaseModel + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::Grouping)) } + def grouping + end + + sig do + params(_: T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::Grouping)) + .returns(T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::Grouping)) + end + def grouping=(_) + end + + sig { returns(Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig) } + def matrix_config + end + + sig do + params(_: Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig) + .returns(Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig) + end + def matrix_config=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(Float) } + def quantity + end + + sig { params(_: Float).returns(Float) } + def quantity=(_) + end + + sig { returns(Symbol) } + def type + end + + sig { params(_: Symbol).returns(Symbol) } + def type=(_) + end + + sig do + params( + amount: String, + grouping: T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::Grouping), + matrix_config: Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig, + name: String, + quantity: Float, + type: Symbol + ) + .void + end + def initialize(amount:, grouping:, matrix_config:, name:, quantity:, type: :matrix) + end + + sig do + override + .returns( + { + amount: String, + grouping: T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::Grouping), + matrix_config: Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig, + name: String, + quantity: Float, + type: Symbol + } + ) + end + def to_hash + end + + class Grouping < Orb::BaseModel + sig { returns(String) } + def key + end + + sig { params(_: String).returns(String) } + def key=(_) + end + + sig { returns(T.nilable(String)) } + def value + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def value=(_) + end + + sig { params(key: String, value: T.nilable(String)).void } + def initialize(key:, value:) + end + + sig { override.returns({key: String, value: T.nilable(String)}) } + def to_hash + end + end + + class MatrixConfig < Orb::BaseModel + sig { returns(T::Array[T.nilable(String)]) } + def dimension_values + end + + sig { params(_: T::Array[T.nilable(String)]).returns(T::Array[T.nilable(String)]) } + def dimension_values=(_) + end + + sig { params(dimension_values: T::Array[T.nilable(String)]).void } + def initialize(dimension_values:) + end + + sig { override.returns({dimension_values: T::Array[T.nilable(String)]}) } + def to_hash + end + end + end + + class TierSubLineItem < Orb::BaseModel + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::Grouping)) } + def grouping + end + + sig do + params(_: T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::Grouping)) + .returns(T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::Grouping)) + end + def grouping=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(Float) } + def quantity + end + + sig { params(_: Float).returns(Float) } + def quantity=(_) + end + + sig { returns(Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::TierConfig) } + def tier_config + end + + sig do + params(_: Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::TierConfig) + .returns(Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::TierConfig) + end + def tier_config=(_) + end + + sig { returns(Symbol) } + def type + end + + sig { params(_: Symbol).returns(Symbol) } + def type=(_) + end + + sig do + params( + amount: String, + grouping: T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::Grouping), + name: String, + quantity: Float, + tier_config: Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::TierConfig, + type: Symbol + ) + .void + end + def initialize(amount:, grouping:, name:, quantity:, tier_config:, type: :tier) + end + + sig do + override + .returns( + { + amount: String, + grouping: T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::Grouping), + name: String, + quantity: Float, + tier_config: Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::TierConfig, + type: Symbol + } + ) + end + def to_hash + end + + class Grouping < Orb::BaseModel + sig { returns(String) } + def key + end + + sig { params(_: String).returns(String) } + def key=(_) + end + + sig { returns(T.nilable(String)) } + def value + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def value=(_) + end + + sig { params(key: String, value: T.nilable(String)).void } + def initialize(key:, value:) + end + + sig { override.returns({key: String, value: T.nilable(String)}) } + def to_hash + end + end + + class TierConfig < Orb::BaseModel + sig { returns(Float) } + def first_unit + end + + sig { params(_: Float).returns(Float) } + def first_unit=(_) + end + + sig { returns(T.nilable(Float)) } + def last_unit + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def last_unit=(_) + end + + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { params(first_unit: Float, last_unit: T.nilable(Float), unit_amount: String).void } + def initialize(first_unit:, last_unit:, unit_amount:) + end + + sig { override.returns({first_unit: Float, last_unit: T.nilable(Float), unit_amount: String}) } + def to_hash + end + end + end + + class OtherSubLineItem < Orb::BaseModel + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem::Grouping)) } + def grouping + end + + sig do + params(_: T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem::Grouping)) + .returns(T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem::Grouping)) + end + def grouping=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(Float) } + def quantity + end + + sig { params(_: Float).returns(Float) } + def quantity=(_) + end + + sig { returns(Symbol) } + def type + end + + sig { params(_: Symbol).returns(Symbol) } + def type=(_) + end + + sig do + params( + amount: String, + grouping: T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem::Grouping), + name: String, + quantity: Float, + type: Symbol + ) + .void + end + def initialize(amount:, grouping:, name:, quantity:, type: :"'null'") + end + + sig do + override + .returns( + { + amount: String, + grouping: T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem::Grouping), + name: String, + quantity: Float, + type: Symbol + } + ) + end + def to_hash + end + + class Grouping < Orb::BaseModel + sig { returns(String) } + def key + end + + sig { params(_: String).returns(String) } + def key=(_) + end + + sig { returns(T.nilable(String)) } + def value + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def value=(_) + end + + sig { params(key: String, value: T.nilable(String)).void } + def initialize(key:, value:) + end + + sig { override.returns({key: String, value: T.nilable(String)}) } + def to_hash + end + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem], [Symbol, Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem], [Symbol, Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem]] + ) + end + private_class_method def self.variants + end + end + + class TaxAmount < Orb::BaseModel + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(String) } + def tax_rate_description + end + + sig { params(_: String).returns(String) } + def tax_rate_description=(_) + end + + sig { returns(T.nilable(String)) } + def tax_rate_percentage + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def tax_rate_percentage=(_) + end + + sig do + params(amount: String, tax_rate_description: String, tax_rate_percentage: T.nilable(String)).void + end + def initialize(amount:, tax_rate_description:, tax_rate_percentage:) + end + + sig do + override.returns( + { + amount: String, + tax_rate_description: String, + tax_rate_percentage: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + + class PaymentAttempt < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(T.nilable(Symbol)) } + def payment_provider + end + + sig { params(_: T.nilable(Symbol)).returns(T.nilable(Symbol)) } + def payment_provider=(_) + end + + sig { returns(T.nilable(String)) } + def payment_provider_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def payment_provider_id=(_) + end + + sig { returns(T::Boolean) } + def succeeded + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def succeeded=(_) + end + + sig do + params( + id: String, + amount: String, + created_at: Time, + payment_provider: T.nilable(Symbol), + payment_provider_id: T.nilable(String), + succeeded: T::Boolean + ) + .void + end + def initialize(id:, amount:, created_at:, payment_provider:, payment_provider_id:, succeeded:) + end + + sig do + override + .returns( + { + id: String, + amount: String, + created_at: Time, + payment_provider: T.nilable(Symbol), + payment_provider_id: T.nilable(String), + succeeded: T::Boolean + } + ) + end + def to_hash + end + + class PaymentProvider < Orb::Enum + abstract! + + STRIPE = T.let(:stripe, T.nilable(Symbol)) + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class ShippingAddress < Orb::BaseModel + sig { returns(T.nilable(String)) } + def city + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def city=(_) + end + + sig { returns(T.nilable(String)) } + def country + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def country=(_) + end + + sig { returns(T.nilable(String)) } + def line1 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line1=(_) + end + + sig { returns(T.nilable(String)) } + def line2 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line2=(_) + end + + sig { returns(T.nilable(String)) } + def postal_code + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def postal_code=(_) + end + + sig { returns(T.nilable(String)) } + def state + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def state=(_) + end + + sig do + params( + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + ) + .void + end + def initialize(city:, country:, line1:, line2:, postal_code:, state:) + end + + sig do + override + .returns( + { + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + } + ) + end + def to_hash + end + end + class Status < Orb::Enum abstract! @@ -520,6 +2982,24 @@ module Orb def self.values end end + + class Subscription < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end end end end diff --git a/rbi/lib/orb/models/invoice_create_params.rbi b/rbi/lib/orb/models/invoice_create_params.rbi index a932ca93..2739102c 100644 --- a/rbi/lib/orb/models/invoice_create_params.rbi +++ b/rbi/lib/orb/models/invoice_create_params.rbi @@ -239,11 +239,14 @@ module Orb def start_date=(_) end - sig { returns(Orb::Models::UnitConfigModel) } + sig { returns(Orb::Models::InvoiceCreateParams::LineItem::UnitConfig) } def unit_config end - sig { params(_: Orb::Models::UnitConfigModel).returns(Orb::Models::UnitConfigModel) } + sig do + params(_: Orb::Models::InvoiceCreateParams::LineItem::UnitConfig) + .returns(Orb::Models::InvoiceCreateParams::LineItem::UnitConfig) + end def unit_config=(_) end @@ -255,7 +258,7 @@ module Orb name: String, quantity: Float, start_date: Date, - unit_config: Orb::Models::UnitConfigModel + unit_config: Orb::Models::InvoiceCreateParams::LineItem::UnitConfig ) .void end @@ -272,7 +275,7 @@ module Orb name: String, quantity: Float, start_date: Date, - unit_config: Orb::Models::UnitConfigModel + unit_config: Orb::Models::InvoiceCreateParams::LineItem::UnitConfig } ) end @@ -288,6 +291,24 @@ module Orb def self.values end end + + class UnitConfig < Orb::BaseModel + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { params(unit_amount: String).void } + def initialize(unit_amount:) + end + + sig { override.returns({unit_amount: String}) } + def to_hash + end + end end end end diff --git a/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi b/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi index 8d397eff..625654aa 100644 --- a/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi +++ b/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi @@ -19,19 +19,25 @@ module Orb def amount_due=(_) end - sig { returns(Orb::Models::AutoCollectionModel) } + sig { returns(Orb::Models::InvoiceFetchUpcomingResponse::AutoCollection) } def auto_collection end - sig { params(_: Orb::Models::AutoCollectionModel).returns(Orb::Models::AutoCollectionModel) } + sig do + params(_: Orb::Models::InvoiceFetchUpcomingResponse::AutoCollection) + .returns(Orb::Models::InvoiceFetchUpcomingResponse::AutoCollection) + end def auto_collection=(_) end - sig { returns(T.nilable(Orb::Models::AddressModel)) } + sig { returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::BillingAddress)) } def billing_address end - sig { params(_: T.nilable(Orb::Models::AddressModel)).returns(T.nilable(Orb::Models::AddressModel)) } + sig do + params(_: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::BillingAddress)) + .returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::BillingAddress)) + end def billing_address=(_) end @@ -43,13 +49,13 @@ module Orb def created_at=(_) end - sig { returns(T::Array[Orb::Models::CreditNoteSummaryModel]) } + sig { returns(T::Array[Orb::Models::InvoiceFetchUpcomingResponse::CreditNote]) } def credit_notes end sig do - params(_: T::Array[Orb::Models::CreditNoteSummaryModel]) - .returns(T::Array[Orb::Models::CreditNoteSummaryModel]) + params(_: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::CreditNote]) + .returns(T::Array[Orb::Models::InvoiceFetchUpcomingResponse::CreditNote]) end def credit_notes=(_) end @@ -62,30 +68,36 @@ module Orb def currency=(_) end - sig { returns(Orb::Models::CustomerMinifiedModel) } + sig { returns(Orb::Models::InvoiceFetchUpcomingResponse::Customer) } def customer end - sig { params(_: Orb::Models::CustomerMinifiedModel).returns(Orb::Models::CustomerMinifiedModel) } + sig do + params(_: Orb::Models::InvoiceFetchUpcomingResponse::Customer) + .returns(Orb::Models::InvoiceFetchUpcomingResponse::Customer) + end def customer=(_) end - sig { returns(T::Array[Orb::Models::CustomerBalanceTransactionModel]) } + sig { returns(T::Array[Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction]) } def customer_balance_transactions end sig do - params(_: T::Array[Orb::Models::CustomerBalanceTransactionModel]) - .returns(T::Array[Orb::Models::CustomerBalanceTransactionModel]) + params(_: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction]) + .returns(T::Array[Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction]) end def customer_balance_transactions=(_) end - sig { returns(T.nilable(Orb::Models::CustomerTaxIDModel)) } + sig { returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID)) } def customer_tax_id end - sig { params(_: T.nilable(Orb::Models::CustomerTaxIDModel)).returns(T.nilable(Orb::Models::CustomerTaxIDModel)) } + sig do + params(_: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID)) + .returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID)) + end def customer_tax_id=(_) end @@ -180,21 +192,25 @@ module Orb def issued_at=(_) end - sig { returns(T::Array[Orb::Models::InvoiceLineItemModel]) } + sig { returns(T::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem]) } def line_items end sig do - params(_: T::Array[Orb::Models::InvoiceLineItemModel]).returns(T::Array[Orb::Models::InvoiceLineItemModel]) + params(_: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem]) + .returns(T::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem]) end def line_items=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::Maximum)) + .returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::Maximum)) + end def maximum=(_) end @@ -222,11 +238,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::Minimum)) + .returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::Minimum)) + end def minimum=(_) end @@ -246,11 +265,14 @@ module Orb def paid_at=(_) end - sig { returns(T::Array[Orb::Models::PaymentAttemptModel]) } + sig { returns(T::Array[Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt]) } def payment_attempts end - sig { params(_: T::Array[Orb::Models::PaymentAttemptModel]).returns(T::Array[Orb::Models::PaymentAttemptModel]) } + sig do + params(_: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt]) + .returns(T::Array[Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt]) + end def payment_attempts=(_) end @@ -278,11 +300,14 @@ module Orb def scheduled_issue_at=(_) end - sig { returns(T.nilable(Orb::Models::AddressModel)) } + sig { returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::ShippingAddress)) } def shipping_address end - sig { params(_: T.nilable(Orb::Models::AddressModel)).returns(T.nilable(Orb::Models::AddressModel)) } + sig do + params(_: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::ShippingAddress)) + .returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::ShippingAddress)) + end def shipping_address=(_) end @@ -294,13 +319,13 @@ module Orb def status=(_) end - sig { returns(T.nilable(Orb::Models::SubscriptionMinifiedModel)) } + sig { returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::Subscription)) } def subscription end sig do - params(_: T.nilable(Orb::Models::SubscriptionMinifiedModel)) - .returns(T.nilable(Orb::Models::SubscriptionMinifiedModel)) + params(_: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::Subscription)) + .returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::Subscription)) end def subscription=(_) end @@ -357,14 +382,14 @@ module Orb params( id: String, amount_due: String, - auto_collection: Orb::Models::AutoCollectionModel, - billing_address: T.nilable(Orb::Models::AddressModel), + auto_collection: Orb::Models::InvoiceFetchUpcomingResponse::AutoCollection, + billing_address: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::BillingAddress), created_at: Time, - credit_notes: T::Array[Orb::Models::CreditNoteSummaryModel], + credit_notes: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::CreditNote], currency: String, - customer: Orb::Models::CustomerMinifiedModel, - customer_balance_transactions: T::Array[Orb::Models::CustomerBalanceTransactionModel], - customer_tax_id: T.nilable(Orb::Models::CustomerTaxIDModel), + customer: Orb::Models::InvoiceFetchUpcomingResponse::Customer, + customer_balance_transactions: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction], + customer_tax_id: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID), discount: T.anything, discounts: T::Array[T.any(Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount)], due_date: T.nilable(Time), @@ -375,21 +400,21 @@ module Orb invoice_source: Symbol, issue_failed_at: T.nilable(Time), issued_at: T.nilable(Time), - line_items: T::Array[Orb::Models::InvoiceLineItemModel], - maximum: T.nilable(Orb::Models::MaximumModel), + line_items: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem], + maximum: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::Maximum), maximum_amount: T.nilable(String), memo: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::Minimum), minimum_amount: T.nilable(String), paid_at: T.nilable(Time), - payment_attempts: T::Array[Orb::Models::PaymentAttemptModel], + payment_attempts: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt], payment_failed_at: T.nilable(Time), payment_started_at: T.nilable(Time), scheduled_issue_at: T.nilable(Time), - shipping_address: T.nilable(Orb::Models::AddressModel), + shipping_address: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::ShippingAddress), status: Symbol, - subscription: T.nilable(Orb::Models::SubscriptionMinifiedModel), + subscription: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::Subscription), subtotal: String, sync_failed_at: T.nilable(Time), target_date: Time, @@ -450,14 +475,14 @@ module Orb { id: String, amount_due: String, - auto_collection: Orb::Models::AutoCollectionModel, - billing_address: T.nilable(Orb::Models::AddressModel), + auto_collection: Orb::Models::InvoiceFetchUpcomingResponse::AutoCollection, + billing_address: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::BillingAddress), created_at: Time, - credit_notes: T::Array[Orb::Models::CreditNoteSummaryModel], + credit_notes: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::CreditNote], currency: String, - customer: Orb::Models::CustomerMinifiedModel, - customer_balance_transactions: T::Array[Orb::Models::CustomerBalanceTransactionModel], - customer_tax_id: T.nilable(Orb::Models::CustomerTaxIDModel), + customer: Orb::Models::InvoiceFetchUpcomingResponse::Customer, + customer_balance_transactions: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction], + customer_tax_id: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID), discount: T.anything, discounts: T::Array[T.any(Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount)], due_date: T.nilable(Time), @@ -468,21 +493,21 @@ module Orb invoice_source: Symbol, issue_failed_at: T.nilable(Time), issued_at: T.nilable(Time), - line_items: T::Array[Orb::Models::InvoiceLineItemModel], - maximum: T.nilable(Orb::Models::MaximumModel), + line_items: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem], + maximum: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::Maximum), maximum_amount: T.nilable(String), memo: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::Minimum), minimum_amount: T.nilable(String), paid_at: T.nilable(Time), - payment_attempts: T::Array[Orb::Models::PaymentAttemptModel], + payment_attempts: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt], payment_failed_at: T.nilable(Time), payment_started_at: T.nilable(Time), scheduled_issue_at: T.nilable(Time), - shipping_address: T.nilable(Orb::Models::AddressModel), + shipping_address: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::ShippingAddress), status: Symbol, - subscription: T.nilable(Orb::Models::SubscriptionMinifiedModel), + subscription: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::Subscription), subtotal: String, sync_failed_at: T.nilable(Time), target_date: Time, @@ -495,6 +520,665 @@ module Orb def to_hash end + class AutoCollection < Orb::BaseModel + sig { returns(T.nilable(T::Boolean)) } + def enabled + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def enabled=(_) + end + + sig { returns(T.nilable(Time)) } + def next_attempt_at + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def next_attempt_at=(_) + end + + sig { returns(T.nilable(Integer)) } + def num_attempts + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def num_attempts=(_) + end + + sig { returns(T.nilable(Time)) } + def previously_attempted_at + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def previously_attempted_at=(_) + end + + sig do + params( + enabled: T.nilable(T::Boolean), + next_attempt_at: T.nilable(Time), + num_attempts: T.nilable(Integer), + previously_attempted_at: T.nilable(Time) + ) + .void + end + def initialize(enabled:, next_attempt_at:, num_attempts:, previously_attempted_at:) + end + + sig do + override + .returns( + { + enabled: T.nilable(T::Boolean), + next_attempt_at: T.nilable(Time), + num_attempts: T.nilable(Integer), + previously_attempted_at: T.nilable(Time) + } + ) + end + def to_hash + end + end + + class BillingAddress < Orb::BaseModel + sig { returns(T.nilable(String)) } + def city + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def city=(_) + end + + sig { returns(T.nilable(String)) } + def country + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def country=(_) + end + + sig { returns(T.nilable(String)) } + def line1 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line1=(_) + end + + sig { returns(T.nilable(String)) } + def line2 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line2=(_) + end + + sig { returns(T.nilable(String)) } + def postal_code + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def postal_code=(_) + end + + sig { returns(T.nilable(String)) } + def state + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def state=(_) + end + + sig do + params( + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + ) + .void + end + def initialize(city:, country:, line1:, line2:, postal_code:, state:) + end + + sig do + override + .returns( + { + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + } + ) + end + def to_hash + end + end + + class CreditNote < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def credit_note_number + end + + sig { params(_: String).returns(String) } + def credit_note_number=(_) + end + + sig { returns(T.nilable(String)) } + def memo + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def memo=(_) + end + + sig { returns(String) } + def reason + end + + sig { params(_: String).returns(String) } + def reason=(_) + end + + sig { returns(String) } + def total + end + + sig { params(_: String).returns(String) } + def total=(_) + end + + sig { returns(String) } + def type + end + + sig { params(_: String).returns(String) } + def type=(_) + end + + sig { returns(T.nilable(Time)) } + def voided_at + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def voided_at=(_) + end + + sig do + params( + id: String, + credit_note_number: String, + memo: T.nilable(String), + reason: String, + total: String, + type: String, + voided_at: T.nilable(Time) + ) + .void + end + def initialize(id:, credit_note_number:, memo:, reason:, total:, type:, voided_at:) + end + + sig do + override + .returns( + { + id: String, + credit_note_number: String, + memo: T.nilable(String), + reason: String, + total: String, + type: String, + voided_at: T.nilable(Time) + } + ) + end + def to_hash + end + end + + class Customer < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_customer_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_customer_id=(_) + end + + sig { params(id: String, external_customer_id: T.nilable(String)).void } + def initialize(id:, external_customer_id:) + end + + sig { override.returns({id: String, external_customer_id: T.nilable(String)}) } + def to_hash + end + end + + class CustomerBalanceTransaction < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def action + end + + sig { params(_: Symbol).returns(Symbol) } + def action=(_) + end + + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::CreditNote)) } + def credit_note + end + + sig do + params(_: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::CreditNote)) + .returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::CreditNote)) + end + def credit_note=(_) + end + + sig { returns(T.nilable(String)) } + def description + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def description=(_) + end + + sig { returns(String) } + def ending_balance + end + + sig { params(_: String).returns(String) } + def ending_balance=(_) + end + + sig { returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Invoice)) } + def invoice + end + + sig do + params(_: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Invoice)) + .returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Invoice)) + end + def invoice=(_) + end + + sig { returns(String) } + def starting_balance + end + + sig { params(_: String).returns(String) } + def starting_balance=(_) + end + + sig { returns(Symbol) } + def type + end + + sig { params(_: Symbol).returns(Symbol) } + def type=(_) + end + + sig do + params( + id: String, + action: Symbol, + amount: String, + created_at: Time, + credit_note: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::CreditNote), + description: T.nilable(String), + ending_balance: String, + invoice: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Invoice), + starting_balance: String, + type: Symbol + ) + .void + end + def initialize( + id:, + action:, + amount:, + created_at:, + credit_note:, + description:, + ending_balance:, + invoice:, + starting_balance:, + type: + ) + end + + sig do + override + .returns( + { + id: String, + action: Symbol, + amount: String, + created_at: Time, + credit_note: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::CreditNote), + description: T.nilable(String), + ending_balance: String, + invoice: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Invoice), + starting_balance: String, + type: Symbol + } + ) + end + def to_hash + end + + class Action < Orb::Enum + abstract! + + APPLIED_TO_INVOICE = :applied_to_invoice + MANUAL_ADJUSTMENT = :manual_adjustment + PRORATED_REFUND = :prorated_refund + REVERT_PRORATED_REFUND = :revert_prorated_refund + RETURN_FROM_VOIDING = :return_from_voiding + CREDIT_NOTE_APPLIED = :credit_note_applied + CREDIT_NOTE_VOIDED = :credit_note_voided + OVERPAYMENT_REFUND = :overpayment_refund + EXTERNAL_PAYMENT = :external_payment + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class CreditNote < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class Invoice < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class Type < Orb::Enum + abstract! + + INCREMENT = :increment + DECREMENT = :decrement + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class CustomerTaxID < Orb::BaseModel + sig { returns(Symbol) } + def country + end + + sig { params(_: Symbol).returns(Symbol) } + def country=(_) + end + + sig { returns(Symbol) } + def type + end + + sig { params(_: Symbol).returns(Symbol) } + def type=(_) + end + + sig { returns(String) } + def value + end + + sig { params(_: String).returns(String) } + def value=(_) + end + + sig { params(country: Symbol, type: Symbol, value: String).void } + def initialize(country:, type:, value:) + end + + sig { override.returns({country: Symbol, type: Symbol, value: String}) } + def to_hash + end + + class Country < Orb::Enum + abstract! + + AD = :AD + AE = :AE + AR = :AR + AT = :AT + AU = :AU + BE = :BE + BG = :BG + BH = :BH + BO = :BO + BR = :BR + CA = :CA + CH = :CH + CL = :CL + CN = :CN + CO = :CO + CR = :CR + CY = :CY + CZ = :CZ + DE = :DE + DK = :DK + EE = :EE + DO = :DO + EC = :EC + EG = :EG + ES = :ES + EU = :EU + FI = :FI + FR = :FR + GB = :GB + GE = :GE + GR = :GR + HK = :HK + HR = :HR + HU = :HU + ID = :ID + IE = :IE + IL = :IL + IN = :IN + IS = :IS + IT = :IT + JP = :JP + KE = :KE + KR = :KR + KZ = :KZ + LI = :LI + LT = :LT + LU = :LU + LV = :LV + MT = :MT + MX = :MX + MY = :MY + NG = :NG + NL = :NL + NO = :NO + NZ = :NZ + OM = :OM + PE = :PE + PH = :PH + PL = :PL + PT = :PT + RO = :RO + RS = :RS + RU = :RU + SA = :SA + SE = :SE + SG = :SG + SI = :SI + SK = :SK + SV = :SV + TH = :TH + TR = :TR + TW = :TW + UA = :UA + US = :US + UY = :UY + VE = :VE + VN = :VN + ZA = :ZA + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class Type < Orb::Enum + abstract! + + AD_NRT = :ad_nrt + AE_TRN = :ae_trn + AR_CUIT = :ar_cuit + EU_VAT = :eu_vat + AU_ABN = :au_abn + AU_ARN = :au_arn + BG_UIC = :bg_uic + BH_VAT = :bh_vat + BO_TIN = :bo_tin + BR_CNPJ = :br_cnpj + BR_CPF = :br_cpf + CA_BN = :ca_bn + CA_GST_HST = :ca_gst_hst + CA_PST_BC = :ca_pst_bc + CA_PST_MB = :ca_pst_mb + CA_PST_SK = :ca_pst_sk + CA_QST = :ca_qst + CH_VAT = :ch_vat + CL_TIN = :cl_tin + CN_TIN = :cn_tin + CO_NIT = :co_nit + CR_TIN = :cr_tin + DO_RCN = :do_rcn + EC_RUC = :ec_ruc + EG_TIN = :eg_tin + ES_CIF = :es_cif + EU_OSS_VAT = :eu_oss_vat + GB_VAT = :gb_vat + GE_VAT = :ge_vat + HK_BR = :hk_br + HU_TIN = :hu_tin + ID_NPWP = :id_npwp + IL_VAT = :il_vat + IN_GST = :in_gst + IS_VAT = :is_vat + JP_CN = :jp_cn + JP_RN = :jp_rn + JP_TRN = :jp_trn + KE_PIN = :ke_pin + KR_BRN = :kr_brn + KZ_BIN = :kz_bin + LI_UID = :li_uid + MX_RFC = :mx_rfc + MY_FRP = :my_frp + MY_ITN = :my_itn + MY_SST = :my_sst + NG_TIN = :ng_tin + NO_VAT = :no_vat + NO_VOEC = :no_voec + NZ_GST = :nz_gst + OM_VAT = :om_vat + PE_RUC = :pe_ruc + PH_TIN = :ph_tin + RO_TIN = :ro_tin + RS_PIB = :rs_pib + RU_INN = :ru_inn + RU_KPP = :ru_kpp + SA_VAT = :sa_vat + SG_GST = :sg_gst + SG_UEN = :sg_uen + SI_TIN = :si_tin + SV_NIT = :sv_nit + TH_VAT = :th_vat + TR_TIN = :tr_tin + TW_VAT = :tw_vat + UA_VAT = :ua_vat + US_EIN = :us_ein + UY_RUC = :uy_ruc + VE_RIF = :ve_rif + VN_TIN = :vn_tin + ZA_VAT = :za_vat + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class InvoiceSource < Orb::Enum abstract! @@ -507,6 +1191,1828 @@ module Orb end end + class LineItem < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def adjusted_subtotal + end + + sig { params(_: String).returns(String) } + def adjusted_subtotal=(_) + end + + sig do + returns( + T::Array[ + T.any( + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryUsageDiscountAdjustment, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryAmountDiscountAdjustment, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMinimumAdjustment, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMaximumAdjustment + ) + ] + ) + end + def adjustments + end + + sig do + params( + _: T::Array[ + T.any( + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryUsageDiscountAdjustment, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryAmountDiscountAdjustment, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMinimumAdjustment, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMaximumAdjustment + ) + ] + ) + .returns( + T::Array[ + T.any( + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryUsageDiscountAdjustment, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryAmountDiscountAdjustment, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMinimumAdjustment, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMaximumAdjustment + ) + ] + ) + end + def adjustments=(_) + end + + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(String) } + def credits_applied + end + + sig { params(_: String).returns(String) } + def credits_applied=(_) + end + + sig do + returns( + T.nilable( + T.any( + Orb::Models::PercentageDiscount, + Orb::Models::TrialDiscount, + Orb::Models::Discount::UsageDiscount, + Orb::Models::AmountDiscount + ) + ) + ) + end + def discount + end + + sig do + params( + _: T.nilable( + T.any( + Orb::Models::PercentageDiscount, + Orb::Models::TrialDiscount, + Orb::Models::Discount::UsageDiscount, + Orb::Models::AmountDiscount + ) + ) + ) + .returns( + T.nilable( + T.any( + Orb::Models::PercentageDiscount, + Orb::Models::TrialDiscount, + Orb::Models::Discount::UsageDiscount, + Orb::Models::AmountDiscount + ) + ) + ) + end + def discount=(_) + end + + sig { returns(Time) } + def end_date + end + + sig { params(_: Time).returns(Time) } + def end_date=(_) + end + + sig { returns(T.nilable(String)) } + def filter + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def filter=(_) + end + + sig { returns(T.nilable(String)) } + def grouping + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def grouping=(_) + end + + sig { returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Maximum)) } + def maximum + end + + sig do + params(_: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Maximum)) + .returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Maximum)) + end + def maximum=(_) + end + + sig { returns(T.nilable(String)) } + def maximum_amount + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Minimum)) } + def minimum + end + + sig do + params(_: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Minimum)) + .returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Minimum)) + end + def minimum=(_) + end + + sig { returns(T.nilable(String)) } + def minimum_amount + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def minimum_amount=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(String) } + def partially_invoiced_amount + end + + sig { params(_: String).returns(String) } + def partially_invoiced_amount=(_) + end + + sig do + returns( + T.nilable( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + ) + end + def price + end + + sig do + params( + _: T.nilable( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + ) + .returns( + T.nilable( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + ) + end + def price=(_) + end + + sig { returns(Float) } + def quantity + end + + sig { params(_: Float).returns(Float) } + def quantity=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + returns( + T::Array[ + T.any( + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem + ) + ] + ) + end + def sub_line_items + end + + sig do + params( + _: T::Array[ + T.any( + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem + ) + ] + ) + .returns( + T::Array[ + T.any( + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem + ) + ] + ) + end + def sub_line_items=(_) + end + + sig { returns(String) } + def subtotal + end + + sig { params(_: String).returns(String) } + def subtotal=(_) + end + + sig { returns(T::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::TaxAmount]) } + def tax_amounts + end + + sig do + params(_: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::TaxAmount]) + .returns(T::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::TaxAmount]) + end + def tax_amounts=(_) + end + + sig { returns(T.nilable(T::Array[String])) } + def usage_customer_ids + end + + sig { params(_: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def usage_customer_ids=(_) + end + + sig do + params( + id: String, + adjusted_subtotal: String, + adjustments: T::Array[ + T.any( + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryUsageDiscountAdjustment, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryAmountDiscountAdjustment, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMinimumAdjustment, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMaximumAdjustment + ) + ], + amount: String, + credits_applied: String, + discount: T.nilable( + T.any( + Orb::Models::PercentageDiscount, + Orb::Models::TrialDiscount, + Orb::Models::Discount::UsageDiscount, + Orb::Models::AmountDiscount + ) + ), + end_date: Time, + filter: T.nilable(String), + grouping: T.nilable(String), + maximum: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Maximum), + maximum_amount: T.nilable(String), + minimum: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Minimum), + minimum_amount: T.nilable(String), + name: String, + partially_invoiced_amount: String, + price: T.nilable( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ), + quantity: Float, + start_date: Time, + sub_line_items: T::Array[ + T.any( + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem + ) + ], + subtotal: String, + tax_amounts: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::TaxAmount], + usage_customer_ids: T.nilable(T::Array[String]) + ) + .void + end + def initialize( + id:, + adjusted_subtotal:, + adjustments:, + amount:, + credits_applied:, + discount:, + end_date:, + filter:, + grouping:, + maximum:, + maximum_amount:, + minimum:, + minimum_amount:, + name:, + partially_invoiced_amount:, + price:, + quantity:, + start_date:, + sub_line_items:, + subtotal:, + tax_amounts:, + usage_customer_ids: + ) + end + + sig do + override + .returns( + { + id: String, + adjusted_subtotal: String, + adjustments: T::Array[ + T.any( + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryUsageDiscountAdjustment, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryAmountDiscountAdjustment, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMinimumAdjustment, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMaximumAdjustment + ) + ], + amount: String, + credits_applied: String, + discount: T.nilable( + T.any( + Orb::Models::PercentageDiscount, + Orb::Models::TrialDiscount, + Orb::Models::Discount::UsageDiscount, + Orb::Models::AmountDiscount + ) + ), + end_date: Time, + filter: T.nilable(String), + grouping: T.nilable(String), + maximum: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Maximum), + maximum_amount: T.nilable(String), + minimum: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Minimum), + minimum_amount: T.nilable(String), + name: String, + partially_invoiced_amount: String, + price: T.nilable( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ), + quantity: Float, + start_date: Time, + sub_line_items: T::Array[ + T.any( + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem, + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem + ) + ], + subtotal: String, + tax_amounts: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::TaxAmount], + usage_customer_ids: T.nilable(T::Array[String]) + } + ) + end + def to_hash + end + + class Adjustment < Orb::Union + abstract! + + class MonetaryUsageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + id: String, + amount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + reason: T.nilable(String), + usage_discount: Float, + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + applies_to_price_ids:, + is_invoice_level:, + reason:, + usage_discount:, + adjustment_type: :usage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + amount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + reason: T.nilable(String), + usage_discount: Float + } + ) + end + def to_hash + end + end + + class MonetaryAmountDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + amount: String, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + amount_discount:, + applies_to_price_ids:, + is_invoice_level:, + reason:, + adjustment_type: :amount_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + amount: String, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class MonetaryPercentageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + amount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + applies_to_price_ids:, + is_invoice_level:, + percentage_discount:, + reason:, + adjustment_type: :percentage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + amount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class MonetaryMinimumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + amount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + applies_to_price_ids:, + is_invoice_level:, + item_id:, + minimum_amount:, + reason:, + adjustment_type: :minimum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + amount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class MonetaryMaximumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + amount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + amount:, + applies_to_price_ids:, + is_invoice_level:, + maximum_amount:, + reason:, + adjustment_type: :maximum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + amount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryUsageDiscountAdjustment], [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryAmountDiscountAdjustment], [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment], [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMinimumAdjustment], [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMaximumAdjustment]] + ) + end + private_class_method def self.variants + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + + class SubLineItem < Orb::Union + abstract! + + class MatrixSubLineItem < Orb::BaseModel + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig do + returns( + T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::Grouping) + ) + end + def grouping + end + + sig do + params( + _: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::Grouping) + ) + .returns( + T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::Grouping) + ) + end + def grouping=(_) + end + + sig { returns(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig) } + def matrix_config + end + + sig do + params( + _: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig + ) + .returns(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig) + end + def matrix_config=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(Float) } + def quantity + end + + sig { params(_: Float).returns(Float) } + def quantity=(_) + end + + sig { returns(Symbol) } + def type + end + + sig { params(_: Symbol).returns(Symbol) } + def type=(_) + end + + sig do + params( + amount: String, + grouping: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::Grouping), + matrix_config: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig, + name: String, + quantity: Float, + type: Symbol + ) + .void + end + def initialize(amount:, grouping:, matrix_config:, name:, quantity:, type: :matrix) + end + + sig do + override + .returns( + { + amount: String, + grouping: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::Grouping), + matrix_config: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig, + name: String, + quantity: Float, + type: Symbol + } + ) + end + def to_hash + end + + class Grouping < Orb::BaseModel + sig { returns(String) } + def key + end + + sig { params(_: String).returns(String) } + def key=(_) + end + + sig { returns(T.nilable(String)) } + def value + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def value=(_) + end + + sig { params(key: String, value: T.nilable(String)).void } + def initialize(key:, value:) + end + + sig { override.returns({key: String, value: T.nilable(String)}) } + def to_hash + end + end + + class MatrixConfig < Orb::BaseModel + sig { returns(T::Array[T.nilable(String)]) } + def dimension_values + end + + sig { params(_: T::Array[T.nilable(String)]).returns(T::Array[T.nilable(String)]) } + def dimension_values=(_) + end + + sig { params(dimension_values: T::Array[T.nilable(String)]).void } + def initialize(dimension_values:) + end + + sig { override.returns({dimension_values: T::Array[T.nilable(String)]}) } + def to_hash + end + end + end + + class TierSubLineItem < Orb::BaseModel + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig do + returns( + T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::Grouping) + ) + end + def grouping + end + + sig do + params( + _: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::Grouping) + ) + .returns( + T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::Grouping) + ) + end + def grouping=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(Float) } + def quantity + end + + sig { params(_: Float).returns(Float) } + def quantity=(_) + end + + sig { returns(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::TierConfig) } + def tier_config + end + + sig do + params(_: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::TierConfig) + .returns(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::TierConfig) + end + def tier_config=(_) + end + + sig { returns(Symbol) } + def type + end + + sig { params(_: Symbol).returns(Symbol) } + def type=(_) + end + + sig do + params( + amount: String, + grouping: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::Grouping), + name: String, + quantity: Float, + tier_config: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::TierConfig, + type: Symbol + ) + .void + end + def initialize(amount:, grouping:, name:, quantity:, tier_config:, type: :tier) + end + + sig do + override + .returns( + { + amount: String, + grouping: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::Grouping), + name: String, + quantity: Float, + tier_config: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::TierConfig, + type: Symbol + } + ) + end + def to_hash + end + + class Grouping < Orb::BaseModel + sig { returns(String) } + def key + end + + sig { params(_: String).returns(String) } + def key=(_) + end + + sig { returns(T.nilable(String)) } + def value + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def value=(_) + end + + sig { params(key: String, value: T.nilable(String)).void } + def initialize(key:, value:) + end + + sig { override.returns({key: String, value: T.nilable(String)}) } + def to_hash + end + end + + class TierConfig < Orb::BaseModel + sig { returns(Float) } + def first_unit + end + + sig { params(_: Float).returns(Float) } + def first_unit=(_) + end + + sig { returns(T.nilable(Float)) } + def last_unit + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def last_unit=(_) + end + + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { params(first_unit: Float, last_unit: T.nilable(Float), unit_amount: String).void } + def initialize(first_unit:, last_unit:, unit_amount:) + end + + sig { override.returns({first_unit: Float, last_unit: T.nilable(Float), unit_amount: String}) } + def to_hash + end + end + end + + class OtherSubLineItem < Orb::BaseModel + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig do + returns( + T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem::Grouping) + ) + end + def grouping + end + + sig do + params( + _: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem::Grouping) + ) + .returns( + T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem::Grouping) + ) + end + def grouping=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(Float) } + def quantity + end + + sig { params(_: Float).returns(Float) } + def quantity=(_) + end + + sig { returns(Symbol) } + def type + end + + sig { params(_: Symbol).returns(Symbol) } + def type=(_) + end + + sig do + params( + amount: String, + grouping: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem::Grouping), + name: String, + quantity: Float, + type: Symbol + ) + .void + end + def initialize(amount:, grouping:, name:, quantity:, type: :"'null'") + end + + sig do + override + .returns( + { + amount: String, + grouping: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem::Grouping), + name: String, + quantity: Float, + type: Symbol + } + ) + end + def to_hash + end + + class Grouping < Orb::BaseModel + sig { returns(String) } + def key + end + + sig { params(_: String).returns(String) } + def key=(_) + end + + sig { returns(T.nilable(String)) } + def value + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def value=(_) + end + + sig { params(key: String, value: T.nilable(String)).void } + def initialize(key:, value:) + end + + sig { override.returns({key: String, value: T.nilable(String)}) } + def to_hash + end + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem], [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem], [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem]] + ) + end + private_class_method def self.variants + end + end + + class TaxAmount < Orb::BaseModel + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(String) } + def tax_rate_description + end + + sig { params(_: String).returns(String) } + def tax_rate_description=(_) + end + + sig { returns(T.nilable(String)) } + def tax_rate_percentage + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def tax_rate_percentage=(_) + end + + sig do + params(amount: String, tax_rate_description: String, tax_rate_percentage: T.nilable(String)).void + end + def initialize(amount:, tax_rate_description:, tax_rate_percentage:) + end + + sig do + override.returns( + { + amount: String, + tax_rate_description: String, + tax_rate_percentage: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + + class PaymentAttempt < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(T.nilable(Symbol)) } + def payment_provider + end + + sig { params(_: T.nilable(Symbol)).returns(T.nilable(Symbol)) } + def payment_provider=(_) + end + + sig { returns(T.nilable(String)) } + def payment_provider_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def payment_provider_id=(_) + end + + sig { returns(T::Boolean) } + def succeeded + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def succeeded=(_) + end + + sig do + params( + id: String, + amount: String, + created_at: Time, + payment_provider: T.nilable(Symbol), + payment_provider_id: T.nilable(String), + succeeded: T::Boolean + ) + .void + end + def initialize(id:, amount:, created_at:, payment_provider:, payment_provider_id:, succeeded:) + end + + sig do + override + .returns( + { + id: String, + amount: String, + created_at: Time, + payment_provider: T.nilable(Symbol), + payment_provider_id: T.nilable(String), + succeeded: T::Boolean + } + ) + end + def to_hash + end + + class PaymentProvider < Orb::Enum + abstract! + + STRIPE = T.let(:stripe, T.nilable(Symbol)) + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class ShippingAddress < Orb::BaseModel + sig { returns(T.nilable(String)) } + def city + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def city=(_) + end + + sig { returns(T.nilable(String)) } + def country + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def country=(_) + end + + sig { returns(T.nilable(String)) } + def line1 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line1=(_) + end + + sig { returns(T.nilable(String)) } + def line2 + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def line2=(_) + end + + sig { returns(T.nilable(String)) } + def postal_code + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def postal_code=(_) + end + + sig { returns(T.nilable(String)) } + def state + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def state=(_) + end + + sig do + params( + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + ) + .void + end + def initialize(city:, country:, line1:, line2:, postal_code:, state:) + end + + sig do + override + .returns( + { + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + } + ) + end + def to_hash + end + end + class Status < Orb::Enum abstract! @@ -520,6 +3026,24 @@ module Orb def self.values end end + + class Subscription < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end end end end diff --git a/rbi/lib/orb/models/invoice_level_discount_model.rbi b/rbi/lib/orb/models/invoice_level_discount_model.rbi deleted file mode 100644 index 65f3ac0a..00000000 --- a/rbi/lib/orb/models/invoice_level_discount_model.rbi +++ /dev/null @@ -1,18 +0,0 @@ -# typed: strong - -module Orb - module Models - class InvoiceLevelDiscountModel < Orb::Union - abstract! - - sig do - override - .returns( - [[Symbol, Orb::Models::PercentageDiscount], [Symbol, Orb::Models::AmountDiscount], [Symbol, Orb::Models::TrialDiscount]] - ) - end - private_class_method def self.variants - end - end - end -end diff --git a/rbi/lib/orb/models/invoice_line_item_model.rbi b/rbi/lib/orb/models/invoice_line_item_create_response.rbi similarity index 55% rename from rbi/lib/orb/models/invoice_line_item_model.rbi rename to rbi/lib/orb/models/invoice_line_item_create_response.rbi index 9d0ada78..11fdabdf 100644 --- a/rbi/lib/orb/models/invoice_line_item_model.rbi +++ b/rbi/lib/orb/models/invoice_line_item_create_response.rbi @@ -2,7 +2,7 @@ module Orb module Models - class InvoiceLineItemModel < Orb::BaseModel + class InvoiceLineItemCreateResponse < Orb::BaseModel sig { returns(String) } def id end @@ -23,11 +23,11 @@ module Orb returns( T::Array[ T.any( - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryUsageDiscountAdjustment, - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryAmountDiscountAdjustment, - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryPercentageDiscountAdjustment, - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryMinimumAdjustment, - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryMaximumAdjustment + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryUsageDiscountAdjustment, + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryAmountDiscountAdjustment, + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryPercentageDiscountAdjustment, + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMinimumAdjustment, + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMaximumAdjustment ) ] ) @@ -39,22 +39,22 @@ module Orb params( _: T::Array[ T.any( - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryUsageDiscountAdjustment, - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryAmountDiscountAdjustment, - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryPercentageDiscountAdjustment, - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryMinimumAdjustment, - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryMaximumAdjustment + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryUsageDiscountAdjustment, + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryAmountDiscountAdjustment, + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryPercentageDiscountAdjustment, + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMinimumAdjustment, + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMaximumAdjustment ) ] ) .returns( T::Array[ T.any( - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryUsageDiscountAdjustment, - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryAmountDiscountAdjustment, - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryPercentageDiscountAdjustment, - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryMinimumAdjustment, - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryMaximumAdjustment + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryUsageDiscountAdjustment, + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryAmountDiscountAdjustment, + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryPercentageDiscountAdjustment, + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMinimumAdjustment, + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMaximumAdjustment ) ] ) @@ -142,11 +142,14 @@ module Orb def grouping=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::InvoiceLineItemCreateResponse::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::InvoiceLineItemCreateResponse::Maximum)) + .returns(T.nilable(Orb::Models::InvoiceLineItemCreateResponse::Maximum)) + end def maximum=(_) end @@ -158,11 +161,14 @@ module Orb def maximum_amount=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::InvoiceLineItemCreateResponse::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::InvoiceLineItemCreateResponse::Minimum)) + .returns(T.nilable(Orb::Models::InvoiceLineItemCreateResponse::Minimum)) + end def minimum=(_) end @@ -194,34 +200,34 @@ module Orb returns( T.nilable( T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice ) ) ) @@ -233,68 +239,68 @@ module Orb params( _: T.nilable( T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice ) ) ) .returns( T.nilable( T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice ) ) ) @@ -322,9 +328,9 @@ module Orb returns( T::Array[ T.any( - Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem, - Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem, - Orb::Models::InvoiceLineItemModel::SubLineItem::OtherSubLineItem + Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem, + Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem, + Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem ) ] ) @@ -336,18 +342,18 @@ module Orb params( _: T::Array[ T.any( - Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem, - Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem, - Orb::Models::InvoiceLineItemModel::SubLineItem::OtherSubLineItem + Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem, + Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem, + Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem ) ] ) .returns( T::Array[ T.any( - Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem, - Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem, - Orb::Models::InvoiceLineItemModel::SubLineItem::OtherSubLineItem + Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem, + Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem, + Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem ) ] ) @@ -363,11 +369,14 @@ module Orb def subtotal=(_) end - sig { returns(T::Array[Orb::Models::TaxAmountModel]) } + sig { returns(T::Array[Orb::Models::InvoiceLineItemCreateResponse::TaxAmount]) } def tax_amounts end - sig { params(_: T::Array[Orb::Models::TaxAmountModel]).returns(T::Array[Orb::Models::TaxAmountModel]) } + sig do + params(_: T::Array[Orb::Models::InvoiceLineItemCreateResponse::TaxAmount]) + .returns(T::Array[Orb::Models::InvoiceLineItemCreateResponse::TaxAmount]) + end def tax_amounts=(_) end @@ -385,11 +394,11 @@ module Orb adjusted_subtotal: String, adjustments: T::Array[ T.any( - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryUsageDiscountAdjustment, - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryAmountDiscountAdjustment, - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryPercentageDiscountAdjustment, - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryMinimumAdjustment, - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryMaximumAdjustment + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryUsageDiscountAdjustment, + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryAmountDiscountAdjustment, + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryPercentageDiscountAdjustment, + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMinimumAdjustment, + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMaximumAdjustment ) ], amount: String, @@ -405,55 +414,55 @@ module Orb end_date: Time, filter: T.nilable(String), grouping: T.nilable(String), - maximum: T.nilable(Orb::Models::MaximumModel), + maximum: T.nilable(Orb::Models::InvoiceLineItemCreateResponse::Maximum), maximum_amount: T.nilable(String), - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::InvoiceLineItemCreateResponse::Minimum), minimum_amount: T.nilable(String), name: String, partially_invoiced_amount: String, price: T.nilable( T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice ) ), quantity: Float, start_date: Time, sub_line_items: T::Array[ T.any( - Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem, - Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem, - Orb::Models::InvoiceLineItemModel::SubLineItem::OtherSubLineItem + Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem, + Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem, + Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem ) ], subtotal: String, - tax_amounts: T::Array[Orb::Models::TaxAmountModel], + tax_amounts: T::Array[Orb::Models::InvoiceLineItemCreateResponse::TaxAmount], usage_customer_ids: T.nilable(T::Array[String]) ) .void @@ -492,11 +501,11 @@ module Orb adjusted_subtotal: String, adjustments: T::Array[ T.any( - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryUsageDiscountAdjustment, - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryAmountDiscountAdjustment, - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryPercentageDiscountAdjustment, - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryMinimumAdjustment, - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryMaximumAdjustment + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryUsageDiscountAdjustment, + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryAmountDiscountAdjustment, + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryPercentageDiscountAdjustment, + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMinimumAdjustment, + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMaximumAdjustment ) ], amount: String, @@ -512,55 +521,55 @@ module Orb end_date: Time, filter: T.nilable(String), grouping: T.nilable(String), - maximum: T.nilable(Orb::Models::MaximumModel), + maximum: T.nilable(Orb::Models::InvoiceLineItemCreateResponse::Maximum), maximum_amount: T.nilable(String), - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::InvoiceLineItemCreateResponse::Minimum), minimum_amount: T.nilable(String), name: String, partially_invoiced_amount: String, price: T.nilable( T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice ) ), quantity: Float, start_date: Time, sub_line_items: T::Array[ T.any( - Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem, - Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem, - Orb::Models::InvoiceLineItemModel::SubLineItem::OtherSubLineItem + Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem, + Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem, + Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem ) ], subtotal: String, - tax_amounts: T::Array[Orb::Models::TaxAmountModel], + tax_amounts: T::Array[Orb::Models::InvoiceLineItemCreateResponse::TaxAmount], usage_customer_ids: T.nilable(T::Array[String]) } ) @@ -1075,13 +1084,65 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryUsageDiscountAdjustment], [Symbol, Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryAmountDiscountAdjustment], [Symbol, Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryPercentageDiscountAdjustment], [Symbol, Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryMinimumAdjustment], [Symbol, Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryMaximumAdjustment]] + [[Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryUsageDiscountAdjustment], [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryAmountDiscountAdjustment], [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryPercentageDiscountAdjustment], [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMinimumAdjustment], [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMaximumAdjustment]] ) end private_class_method def self.variants end end + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + class SubLineItem < Orb::Union abstract! @@ -1094,24 +1155,24 @@ module Orb def amount=(_) end - sig { returns(T.nilable(Orb::Models::SubLineItemGroupingModel)) } + sig { returns(T.nilable(Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::Grouping)) } def grouping end sig do - params(_: T.nilable(Orb::Models::SubLineItemGroupingModel)) - .returns(T.nilable(Orb::Models::SubLineItemGroupingModel)) + params(_: T.nilable(Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::Grouping)) + .returns(T.nilable(Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::Grouping)) end def grouping=(_) end - sig { returns(Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem::MatrixConfig) } + sig { returns(Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::MatrixConfig) } def matrix_config end sig do - params(_: Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem::MatrixConfig) - .returns(Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem::MatrixConfig) + params(_: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::MatrixConfig) + .returns(Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::MatrixConfig) end def matrix_config=(_) end @@ -1143,8 +1204,8 @@ module Orb sig do params( amount: String, - grouping: T.nilable(Orb::Models::SubLineItemGroupingModel), - matrix_config: Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem::MatrixConfig, + grouping: T.nilable(Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::Grouping), + matrix_config: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::MatrixConfig, name: String, quantity: Float, type: Symbol @@ -1159,8 +1220,8 @@ module Orb .returns( { amount: String, - grouping: T.nilable(Orb::Models::SubLineItemGroupingModel), - matrix_config: Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem::MatrixConfig, + grouping: T.nilable(Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::Grouping), + matrix_config: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::MatrixConfig, name: String, quantity: Float, type: Symbol @@ -1170,6 +1231,32 @@ module Orb def to_hash end + class Grouping < Orb::BaseModel + sig { returns(String) } + def key + end + + sig { params(_: String).returns(String) } + def key=(_) + end + + sig { returns(T.nilable(String)) } + def value + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def value=(_) + end + + sig { params(key: String, value: T.nilable(String)).void } + def initialize(key:, value:) + end + + sig { override.returns({key: String, value: T.nilable(String)}) } + def to_hash + end + end + class MatrixConfig < Orb::BaseModel sig { returns(T::Array[T.nilable(String)]) } def dimension_values @@ -1198,13 +1285,13 @@ module Orb def amount=(_) end - sig { returns(T.nilable(Orb::Models::SubLineItemGroupingModel)) } + sig { returns(T.nilable(Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::Grouping)) } def grouping end sig do - params(_: T.nilable(Orb::Models::SubLineItemGroupingModel)) - .returns(T.nilable(Orb::Models::SubLineItemGroupingModel)) + params(_: T.nilable(Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::Grouping)) + .returns(T.nilable(Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::Grouping)) end def grouping=(_) end @@ -1225,13 +1312,13 @@ module Orb def quantity=(_) end - sig { returns(Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem::TierConfig) } + sig { returns(Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::TierConfig) } def tier_config end sig do - params(_: Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem::TierConfig) - .returns(Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem::TierConfig) + params(_: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::TierConfig) + .returns(Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::TierConfig) end def tier_config=(_) end @@ -1247,10 +1334,10 @@ module Orb sig do params( amount: String, - grouping: T.nilable(Orb::Models::SubLineItemGroupingModel), + grouping: T.nilable(Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::Grouping), name: String, quantity: Float, - tier_config: Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem::TierConfig, + tier_config: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::TierConfig, type: Symbol ) .void @@ -1263,10 +1350,10 @@ module Orb .returns( { amount: String, - grouping: T.nilable(Orb::Models::SubLineItemGroupingModel), + grouping: T.nilable(Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::Grouping), name: String, quantity: Float, - tier_config: Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem::TierConfig, + tier_config: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::TierConfig, type: Symbol } ) @@ -1274,6 +1361,32 @@ module Orb def to_hash end + class Grouping < Orb::BaseModel + sig { returns(String) } + def key + end + + sig { params(_: String).returns(String) } + def key=(_) + end + + sig { returns(T.nilable(String)) } + def value + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def value=(_) + end + + sig { params(key: String, value: T.nilable(String)).void } + def initialize(key:, value:) + end + + sig { override.returns({key: String, value: T.nilable(String)}) } + def to_hash + end + end + class TierConfig < Orb::BaseModel sig { returns(Float) } def first_unit @@ -1318,13 +1431,13 @@ module Orb def amount=(_) end - sig { returns(T.nilable(Orb::Models::SubLineItemGroupingModel)) } + sig { returns(T.nilable(Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem::Grouping)) } def grouping end sig do - params(_: T.nilable(Orb::Models::SubLineItemGroupingModel)) - .returns(T.nilable(Orb::Models::SubLineItemGroupingModel)) + params(_: T.nilable(Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem::Grouping)) + .returns(T.nilable(Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem::Grouping)) end def grouping=(_) end @@ -1356,7 +1469,7 @@ module Orb sig do params( amount: String, - grouping: T.nilable(Orb::Models::SubLineItemGroupingModel), + grouping: T.nilable(Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem::Grouping), name: String, quantity: Float, type: Symbol @@ -1371,7 +1484,7 @@ module Orb .returns( { amount: String, - grouping: T.nilable(Orb::Models::SubLineItemGroupingModel), + grouping: T.nilable(Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem::Grouping), name: String, quantity: Float, type: Symbol @@ -1380,17 +1493,87 @@ module Orb end def to_hash end + + class Grouping < Orb::BaseModel + sig { returns(String) } + def key + end + + sig { params(_: String).returns(String) } + def key=(_) + end + + sig { returns(T.nilable(String)) } + def value + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def value=(_) + end + + sig { params(key: String, value: T.nilable(String)).void } + def initialize(key:, value:) + end + + sig { override.returns({key: String, value: T.nilable(String)}) } + def to_hash + end + end end sig do override .returns( - [[Symbol, Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem], [Symbol, Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem], [Symbol, Orb::Models::InvoiceLineItemModel::SubLineItem::OtherSubLineItem]] + [[Symbol, Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem], [Symbol, Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem], [Symbol, Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem]] ) end private_class_method def self.variants end end + + class TaxAmount < Orb::BaseModel + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(String) } + def tax_rate_description + end + + sig { params(_: String).returns(String) } + def tax_rate_description=(_) + end + + sig { returns(T.nilable(String)) } + def tax_rate_percentage + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def tax_rate_percentage=(_) + end + + sig do + params(amount: String, tax_rate_description: String, tax_rate_percentage: T.nilable(String)).void + end + def initialize(amount:, tax_rate_description:, tax_rate_percentage:) + end + + sig do + override.returns( + { + amount: String, + tax_rate_description: String, + tax_rate_percentage: T.nilable(String) + } + ) + end + def to_hash + end + end end end end diff --git a/rbi/lib/orb/models/invoice_model.rbi b/rbi/lib/orb/models/invoice_model.rbi deleted file mode 100644 index fc4e25ff..00000000 --- a/rbi/lib/orb/models/invoice_model.rbi +++ /dev/null @@ -1,525 +0,0 @@ -# typed: strong - -module Orb - module Models - class InvoiceModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(String) } - def amount_due - end - - sig { params(_: String).returns(String) } - def amount_due=(_) - end - - sig { returns(Orb::Models::AutoCollectionModel) } - def auto_collection - end - - sig { params(_: Orb::Models::AutoCollectionModel).returns(Orb::Models::AutoCollectionModel) } - def auto_collection=(_) - end - - sig { returns(T.nilable(Orb::Models::AddressModel)) } - def billing_address - end - - sig { params(_: T.nilable(Orb::Models::AddressModel)).returns(T.nilable(Orb::Models::AddressModel)) } - def billing_address=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T::Array[Orb::Models::CreditNoteSummaryModel]) } - def credit_notes - end - - sig do - params(_: T::Array[Orb::Models::CreditNoteSummaryModel]) - .returns(T::Array[Orb::Models::CreditNoteSummaryModel]) - end - def credit_notes=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(Orb::Models::CustomerMinifiedModel) } - def customer - end - - sig { params(_: Orb::Models::CustomerMinifiedModel).returns(Orb::Models::CustomerMinifiedModel) } - def customer=(_) - end - - sig { returns(T::Array[Orb::Models::CustomerBalanceTransactionModel]) } - def customer_balance_transactions - end - - sig do - params(_: T::Array[Orb::Models::CustomerBalanceTransactionModel]) - .returns(T::Array[Orb::Models::CustomerBalanceTransactionModel]) - end - def customer_balance_transactions=(_) - end - - sig { returns(T.nilable(Orb::Models::CustomerTaxIDModel)) } - def customer_tax_id - end - - sig { params(_: T.nilable(Orb::Models::CustomerTaxIDModel)).returns(T.nilable(Orb::Models::CustomerTaxIDModel)) } - def customer_tax_id=(_) - end - - sig { returns(T.anything) } - def discount - end - - sig { params(_: T.anything).returns(T.anything) } - def discount=(_) - end - - sig do - returns( - T::Array[T.any(Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount)] - ) - end - def discounts - end - - sig do - params( - _: T::Array[T.any(Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount)] - ) - .returns( - T::Array[T.any(Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount)] - ) - end - def discounts=(_) - end - - sig { returns(T.nilable(Time)) } - def due_date - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def due_date=(_) - end - - sig { returns(T.nilable(Time)) } - def eligible_to_issue_at - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def eligible_to_issue_at=(_) - end - - sig { returns(T.nilable(String)) } - def hosted_invoice_url - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def hosted_invoice_url=(_) - end - - sig { returns(Time) } - def invoice_date - end - - sig { params(_: Time).returns(Time) } - def invoice_date=(_) - end - - sig { returns(String) } - def invoice_number - end - - sig { params(_: String).returns(String) } - def invoice_number=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_pdf - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_pdf=(_) - end - - sig { returns(Symbol) } - def invoice_source - end - - sig { params(_: Symbol).returns(Symbol) } - def invoice_source=(_) - end - - sig { returns(T.nilable(Time)) } - def issue_failed_at - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def issue_failed_at=(_) - end - - sig { returns(T.nilable(Time)) } - def issued_at - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def issued_at=(_) - end - - sig { returns(T::Array[Orb::Models::InvoiceLineItemModel]) } - def line_items - end - - sig do - params(_: T::Array[Orb::Models::InvoiceLineItemModel]).returns(T::Array[Orb::Models::InvoiceLineItemModel]) - end - def line_items=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T.nilable(String)) } - def memo - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def memo=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(T.nilable(Time)) } - def paid_at - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def paid_at=(_) - end - - sig { returns(T::Array[Orb::Models::PaymentAttemptModel]) } - def payment_attempts - end - - sig { params(_: T::Array[Orb::Models::PaymentAttemptModel]).returns(T::Array[Orb::Models::PaymentAttemptModel]) } - def payment_attempts=(_) - end - - sig { returns(T.nilable(Time)) } - def payment_failed_at - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def payment_failed_at=(_) - end - - sig { returns(T.nilable(Time)) } - def payment_started_at - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def payment_started_at=(_) - end - - sig { returns(T.nilable(Time)) } - def scheduled_issue_at - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def scheduled_issue_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AddressModel)) } - def shipping_address - end - - sig { params(_: T.nilable(Orb::Models::AddressModel)).returns(T.nilable(Orb::Models::AddressModel)) } - def shipping_address=(_) - end - - sig { returns(Symbol) } - def status - end - - sig { params(_: Symbol).returns(Symbol) } - def status=(_) - end - - sig { returns(T.nilable(Orb::Models::SubscriptionMinifiedModel)) } - def subscription - end - - sig do - params(_: T.nilable(Orb::Models::SubscriptionMinifiedModel)) - .returns(T.nilable(Orb::Models::SubscriptionMinifiedModel)) - end - def subscription=(_) - end - - sig { returns(String) } - def subtotal - end - - sig { params(_: String).returns(String) } - def subtotal=(_) - end - - sig { returns(T.nilable(Time)) } - def sync_failed_at - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def sync_failed_at=(_) - end - - sig { returns(String) } - def total - end - - sig { params(_: String).returns(String) } - def total=(_) - end - - sig { returns(T.nilable(Time)) } - def voided_at - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def voided_at=(_) - end - - sig { returns(T::Boolean) } - def will_auto_issue - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def will_auto_issue=(_) - end - - sig do - params( - id: String, - amount_due: String, - auto_collection: Orb::Models::AutoCollectionModel, - billing_address: T.nilable(Orb::Models::AddressModel), - created_at: Time, - credit_notes: T::Array[Orb::Models::CreditNoteSummaryModel], - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - customer_balance_transactions: T::Array[Orb::Models::CustomerBalanceTransactionModel], - customer_tax_id: T.nilable(Orb::Models::CustomerTaxIDModel), - discount: T.anything, - discounts: T::Array[T.any(Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount)], - due_date: T.nilable(Time), - eligible_to_issue_at: T.nilable(Time), - hosted_invoice_url: T.nilable(String), - invoice_date: Time, - invoice_number: String, - invoice_pdf: T.nilable(String), - invoice_source: Symbol, - issue_failed_at: T.nilable(Time), - issued_at: T.nilable(Time), - line_items: T::Array[Orb::Models::InvoiceLineItemModel], - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - memo: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - paid_at: T.nilable(Time), - payment_attempts: T::Array[Orb::Models::PaymentAttemptModel], - payment_failed_at: T.nilable(Time), - payment_started_at: T.nilable(Time), - scheduled_issue_at: T.nilable(Time), - shipping_address: T.nilable(Orb::Models::AddressModel), - status: Symbol, - subscription: T.nilable(Orb::Models::SubscriptionMinifiedModel), - subtotal: String, - sync_failed_at: T.nilable(Time), - total: String, - voided_at: T.nilable(Time), - will_auto_issue: T::Boolean - ) - .void - end - def initialize( - id:, - amount_due:, - auto_collection:, - billing_address:, - created_at:, - credit_notes:, - currency:, - customer:, - customer_balance_transactions:, - customer_tax_id:, - discount:, - discounts:, - due_date:, - eligible_to_issue_at:, - hosted_invoice_url:, - invoice_date:, - invoice_number:, - invoice_pdf:, - invoice_source:, - issue_failed_at:, - issued_at:, - line_items:, - maximum:, - maximum_amount:, - memo:, - metadata:, - minimum:, - minimum_amount:, - paid_at:, - payment_attempts:, - payment_failed_at:, - payment_started_at:, - scheduled_issue_at:, - shipping_address:, - status:, - subscription:, - subtotal:, - sync_failed_at:, - total:, - voided_at:, - will_auto_issue: - ) - end - - sig do - override - .returns( - { - id: String, - amount_due: String, - auto_collection: Orb::Models::AutoCollectionModel, - billing_address: T.nilable(Orb::Models::AddressModel), - created_at: Time, - credit_notes: T::Array[Orb::Models::CreditNoteSummaryModel], - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - customer_balance_transactions: T::Array[Orb::Models::CustomerBalanceTransactionModel], - customer_tax_id: T.nilable(Orb::Models::CustomerTaxIDModel), - discount: T.anything, - discounts: T::Array[T.any(Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount)], - due_date: T.nilable(Time), - eligible_to_issue_at: T.nilable(Time), - hosted_invoice_url: T.nilable(String), - invoice_date: Time, - invoice_number: String, - invoice_pdf: T.nilable(String), - invoice_source: Symbol, - issue_failed_at: T.nilable(Time), - issued_at: T.nilable(Time), - line_items: T::Array[Orb::Models::InvoiceLineItemModel], - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - memo: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - paid_at: T.nilable(Time), - payment_attempts: T::Array[Orb::Models::PaymentAttemptModel], - payment_failed_at: T.nilable(Time), - payment_started_at: T.nilable(Time), - scheduled_issue_at: T.nilable(Time), - shipping_address: T.nilable(Orb::Models::AddressModel), - status: Symbol, - subscription: T.nilable(Orb::Models::SubscriptionMinifiedModel), - subtotal: String, - sync_failed_at: T.nilable(Time), - total: String, - voided_at: T.nilable(Time), - will_auto_issue: T::Boolean - } - ) - end - def to_hash - end - - class InvoiceSource < Orb::Enum - abstract! - - SUBSCRIPTION = :subscription - PARTIAL = :partial - ONE_OFF = :one_off - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class Status < Orb::Enum - abstract! - - ISSUED = :issued - PAID = :paid - SYNCED = :synced - VOID = :void - DRAFT = :draft - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end -end diff --git a/rbi/lib/orb/models/item.rbi b/rbi/lib/orb/models/item.rbi index b3dff6bf..a3d350d6 100644 --- a/rbi/lib/orb/models/item.rbi +++ b/rbi/lib/orb/models/item.rbi @@ -19,13 +19,13 @@ module Orb def created_at=(_) end - sig { returns(T::Array[Orb::Models::ItemExternalConnectionModel]) } + sig { returns(T::Array[Orb::Models::Item::ExternalConnection]) } def external_connections end sig do - params(_: T::Array[Orb::Models::ItemExternalConnectionModel]) - .returns(T::Array[Orb::Models::ItemExternalConnectionModel]) + params(_: T::Array[Orb::Models::Item::ExternalConnection]) + .returns(T::Array[Orb::Models::Item::ExternalConnection]) end def external_connections=(_) end @@ -42,7 +42,7 @@ module Orb params( id: String, created_at: Time, - external_connections: T::Array[Orb::Models::ItemExternalConnectionModel], + external_connections: T::Array[Orb::Models::Item::ExternalConnection], name: String ) .void @@ -56,13 +56,55 @@ module Orb { id: String, created_at: Time, - external_connections: T::Array[Orb::Models::ItemExternalConnectionModel], + external_connections: T::Array[Orb::Models::Item::ExternalConnection], name: String } ) end def to_hash end + + class ExternalConnection < Orb::BaseModel + sig { returns(Symbol) } + def external_connection_name + end + + sig { params(_: Symbol).returns(Symbol) } + def external_connection_name=(_) + end + + sig { returns(String) } + def external_entity_id + end + + sig { params(_: String).returns(String) } + def external_entity_id=(_) + end + + sig { params(external_connection_name: Symbol, external_entity_id: String).void } + def initialize(external_connection_name:, external_entity_id:) + end + + sig { override.returns({external_connection_name: Symbol, external_entity_id: String}) } + def to_hash + end + + class ExternalConnectionName < Orb::Enum + abstract! + + STRIPE = :stripe + QUICKBOOKS = :quickbooks + BILL_COM = :"bill.com" + NETSUITE = :netsuite + TAXJAR = :taxjar + AVALARA = :avalara + ANROK = :anrok + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end end end diff --git a/rbi/lib/orb/models/item_external_connection_model.rbi b/rbi/lib/orb/models/item_external_connection_model.rbi deleted file mode 100644 index b665208f..00000000 --- a/rbi/lib/orb/models/item_external_connection_model.rbi +++ /dev/null @@ -1,47 +0,0 @@ -# typed: strong - -module Orb - module Models - class ItemExternalConnectionModel < Orb::BaseModel - sig { returns(Symbol) } - def external_connection_name - end - - sig { params(_: Symbol).returns(Symbol) } - def external_connection_name=(_) - end - - sig { returns(String) } - def external_entity_id - end - - sig { params(_: String).returns(String) } - def external_entity_id=(_) - end - - sig { params(external_connection_name: Symbol, external_entity_id: String).void } - def initialize(external_connection_name:, external_entity_id:) - end - - sig { override.returns({external_connection_name: Symbol, external_entity_id: String}) } - def to_hash - end - - class ExternalConnectionName < Orb::Enum - abstract! - - STRIPE = :stripe - QUICKBOOKS = :quickbooks - BILL_COM = :"bill.com" - NETSUITE = :netsuite - TAXJAR = :taxjar - AVALARA = :avalara - ANROK = :anrok - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end -end diff --git a/rbi/lib/orb/models/item_model.rbi b/rbi/lib/orb/models/item_model.rbi deleted file mode 100644 index 92d25a1d..00000000 --- a/rbi/lib/orb/models/item_model.rbi +++ /dev/null @@ -1,68 +0,0 @@ -# typed: strong - -module Orb - module Models - class ItemModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T::Array[Orb::Models::ItemExternalConnectionModel]) } - def external_connections - end - - sig do - params(_: T::Array[Orb::Models::ItemExternalConnectionModel]) - .returns(T::Array[Orb::Models::ItemExternalConnectionModel]) - end - def external_connections=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig do - params( - id: String, - created_at: Time, - external_connections: T::Array[Orb::Models::ItemExternalConnectionModel], - name: String - ) - .void - end - def initialize(id:, created_at:, external_connections:, name:) - end - - sig do - override - .returns( - { - id: String, - created_at: Time, - external_connections: T::Array[Orb::Models::ItemExternalConnectionModel], - name: String - } - ) - end - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/item_slim_model.rbi b/rbi/lib/orb/models/item_slim_model.rbi deleted file mode 100644 index a0e824dd..00000000 --- a/rbi/lib/orb/models/item_slim_model.rbi +++ /dev/null @@ -1,31 +0,0 @@ -# typed: strong - -module Orb - module Models - class ItemSlimModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { params(id: String, name: String).void } - def initialize(id:, name:) - end - - sig { override.returns({id: String, name: String}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/item_update_params.rbi b/rbi/lib/orb/models/item_update_params.rbi index 53c52b9f..85faffd7 100644 --- a/rbi/lib/orb/models/item_update_params.rbi +++ b/rbi/lib/orb/models/item_update_params.rbi @@ -6,13 +6,13 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters - sig { returns(T.nilable(T::Array[Orb::Models::ItemExternalConnectionModel])) } + sig { returns(T.nilable(T::Array[Orb::Models::ItemUpdateParams::ExternalConnection])) } def external_connections end sig do - params(_: T.nilable(T::Array[Orb::Models::ItemExternalConnectionModel])) - .returns(T.nilable(T::Array[Orb::Models::ItemExternalConnectionModel])) + params(_: T.nilable(T::Array[Orb::Models::ItemUpdateParams::ExternalConnection])) + .returns(T.nilable(T::Array[Orb::Models::ItemUpdateParams::ExternalConnection])) end def external_connections=(_) end @@ -27,7 +27,7 @@ module Orb sig do params( - external_connections: T.nilable(T::Array[Orb::Models::ItemExternalConnectionModel]), + external_connections: T.nilable(T::Array[Orb::Models::ItemUpdateParams::ExternalConnection]), name: T.nilable(String), request_options: T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything]) ) @@ -40,7 +40,7 @@ module Orb override .returns( { - external_connections: T.nilable(T::Array[Orb::Models::ItemExternalConnectionModel]), + external_connections: T.nilable(T::Array[Orb::Models::ItemUpdateParams::ExternalConnection]), name: T.nilable(String), request_options: Orb::RequestOptions } @@ -48,6 +48,48 @@ module Orb end def to_hash end + + class ExternalConnection < Orb::BaseModel + sig { returns(Symbol) } + def external_connection_name + end + + sig { params(_: Symbol).returns(Symbol) } + def external_connection_name=(_) + end + + sig { returns(String) } + def external_entity_id + end + + sig { params(_: String).returns(String) } + def external_entity_id=(_) + end + + sig { params(external_connection_name: Symbol, external_entity_id: String).void } + def initialize(external_connection_name:, external_entity_id:) + end + + sig { override.returns({external_connection_name: Symbol, external_entity_id: String}) } + def to_hash + end + + class ExternalConnectionName < Orb::Enum + abstract! + + STRIPE = :stripe + QUICKBOOKS = :quickbooks + BILL_COM = :"bill.com" + NETSUITE = :netsuite + TAXJAR = :taxjar + AVALARA = :avalara + ANROK = :anrok + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end end end diff --git a/rbi/lib/orb/models/matrix_config_model.rbi b/rbi/lib/orb/models/matrix_config_model.rbi deleted file mode 100644 index e36454ef..00000000 --- a/rbi/lib/orb/models/matrix_config_model.rbi +++ /dev/null @@ -1,55 +0,0 @@ -# typed: strong - -module Orb - module Models - class MatrixConfigModel < Orb::BaseModel - sig { returns(String) } - def default_unit_amount - end - - sig { params(_: String).returns(String) } - def default_unit_amount=(_) - end - - sig { returns(T::Array[T.nilable(String)]) } - def dimensions - end - - sig { params(_: T::Array[T.nilable(String)]).returns(T::Array[T.nilable(String)]) } - def dimensions=(_) - end - - sig { returns(T::Array[Orb::Models::MatrixValueModel]) } - def matrix_values - end - - sig { params(_: T::Array[Orb::Models::MatrixValueModel]).returns(T::Array[Orb::Models::MatrixValueModel]) } - def matrix_values=(_) - end - - sig do - params( - default_unit_amount: String, - dimensions: T::Array[T.nilable(String)], - matrix_values: T::Array[Orb::Models::MatrixValueModel] - ) - .void - end - def initialize(default_unit_amount:, dimensions:, matrix_values:) - end - - sig do - override - .returns( - { - default_unit_amount: String, - dimensions: T::Array[T.nilable(String)], - matrix_values: T::Array[Orb::Models::MatrixValueModel] - } - ) - end - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/matrix_value_model.rbi b/rbi/lib/orb/models/matrix_value_model.rbi deleted file mode 100644 index b2a31f86..00000000 --- a/rbi/lib/orb/models/matrix_value_model.rbi +++ /dev/null @@ -1,31 +0,0 @@ -# typed: strong - -module Orb - module Models - class MatrixValueModel < Orb::BaseModel - sig { returns(T::Array[T.nilable(String)]) } - def dimension_values - end - - sig { params(_: T::Array[T.nilable(String)]).returns(T::Array[T.nilable(String)]) } - def dimension_values=(_) - end - - sig { returns(String) } - def unit_amount - end - - sig { params(_: String).returns(String) } - def unit_amount=(_) - end - - sig { params(dimension_values: T::Array[T.nilable(String)], unit_amount: String).void } - def initialize(dimension_values:, unit_amount:) - end - - sig { override.returns({dimension_values: T::Array[T.nilable(String)], unit_amount: String}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/matrix_with_allocation_config_model.rbi b/rbi/lib/orb/models/matrix_with_allocation_config_model.rbi deleted file mode 100644 index 5c418efd..00000000 --- a/rbi/lib/orb/models/matrix_with_allocation_config_model.rbi +++ /dev/null @@ -1,65 +0,0 @@ -# typed: strong - -module Orb - module Models - class MatrixWithAllocationConfigModel < Orb::BaseModel - sig { returns(Float) } - def allocation - end - - sig { params(_: Float).returns(Float) } - def allocation=(_) - end - - sig { returns(String) } - def default_unit_amount - end - - sig { params(_: String).returns(String) } - def default_unit_amount=(_) - end - - sig { returns(T::Array[T.nilable(String)]) } - def dimensions - end - - sig { params(_: T::Array[T.nilable(String)]).returns(T::Array[T.nilable(String)]) } - def dimensions=(_) - end - - sig { returns(T::Array[Orb::Models::MatrixValueModel]) } - def matrix_values - end - - sig { params(_: T::Array[Orb::Models::MatrixValueModel]).returns(T::Array[Orb::Models::MatrixValueModel]) } - def matrix_values=(_) - end - - sig do - params( - allocation: Float, - default_unit_amount: String, - dimensions: T::Array[T.nilable(String)], - matrix_values: T::Array[Orb::Models::MatrixValueModel] - ) - .void - end - def initialize(allocation:, default_unit_amount:, dimensions:, matrix_values:) - end - - sig do - override - .returns( - { - allocation: Float, - default_unit_amount: String, - dimensions: T::Array[T.nilable(String)], - matrix_values: T::Array[Orb::Models::MatrixValueModel] - } - ) - end - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/maximum_interval_model.rbi b/rbi/lib/orb/models/maximum_interval_model.rbi deleted file mode 100644 index c28d0ea7..00000000 --- a/rbi/lib/orb/models/maximum_interval_model.rbi +++ /dev/null @@ -1,81 +0,0 @@ -# typed: strong - -module Orb - module Models - class MaximumIntervalModel < Orb::BaseModel - sig { returns(T::Array[String]) } - def applies_to_price_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_ids=(_) - end - - sig { returns(T::Array[String]) } - def applies_to_price_interval_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_interval_ids=(_) - end - - sig { returns(T.nilable(Time)) } - def end_date - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def end_date=(_) - end - - sig { returns(String) } - def maximum_amount - end - - sig { params(_: String).returns(String) } - def maximum_amount=(_) - end - - sig { returns(Time) } - def start_date - end - - sig { params(_: Time).returns(Time) } - def start_date=(_) - end - - sig do - params( - applies_to_price_ids: T::Array[String], - applies_to_price_interval_ids: T::Array[String], - end_date: T.nilable(Time), - maximum_amount: String, - start_date: Time - ) - .void - end - def initialize( - applies_to_price_ids:, - applies_to_price_interval_ids:, - end_date:, - maximum_amount:, - start_date: - ) - end - - sig do - override - .returns( - { - applies_to_price_ids: T::Array[String], - applies_to_price_interval_ids: T::Array[String], - end_date: T.nilable(Time), - maximum_amount: String, - start_date: Time - } - ) - end - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/maximum_model.rbi b/rbi/lib/orb/models/maximum_model.rbi deleted file mode 100644 index 729c2b18..00000000 --- a/rbi/lib/orb/models/maximum_model.rbi +++ /dev/null @@ -1,31 +0,0 @@ -# typed: strong - -module Orb - module Models - class MaximumModel < Orb::BaseModel - sig { returns(T::Array[String]) } - def applies_to_price_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_ids=(_) - end - - sig { returns(String) } - def maximum_amount - end - - sig { params(_: String).returns(String) } - def maximum_amount=(_) - end - - sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } - def initialize(applies_to_price_ids:, maximum_amount:) - end - - sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/minimum_interval_model.rbi b/rbi/lib/orb/models/minimum_interval_model.rbi deleted file mode 100644 index 097c2498..00000000 --- a/rbi/lib/orb/models/minimum_interval_model.rbi +++ /dev/null @@ -1,81 +0,0 @@ -# typed: strong - -module Orb - module Models - class MinimumIntervalModel < Orb::BaseModel - sig { returns(T::Array[String]) } - def applies_to_price_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_ids=(_) - end - - sig { returns(T::Array[String]) } - def applies_to_price_interval_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_interval_ids=(_) - end - - sig { returns(T.nilable(Time)) } - def end_date - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def end_date=(_) - end - - sig { returns(String) } - def minimum_amount - end - - sig { params(_: String).returns(String) } - def minimum_amount=(_) - end - - sig { returns(Time) } - def start_date - end - - sig { params(_: Time).returns(Time) } - def start_date=(_) - end - - sig do - params( - applies_to_price_ids: T::Array[String], - applies_to_price_interval_ids: T::Array[String], - end_date: T.nilable(Time), - minimum_amount: String, - start_date: Time - ) - .void - end - def initialize( - applies_to_price_ids:, - applies_to_price_interval_ids:, - end_date:, - minimum_amount:, - start_date: - ) - end - - sig do - override - .returns( - { - applies_to_price_ids: T::Array[String], - applies_to_price_interval_ids: T::Array[String], - end_date: T.nilable(Time), - minimum_amount: String, - start_date: Time - } - ) - end - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/minimum_model.rbi b/rbi/lib/orb/models/minimum_model.rbi deleted file mode 100644 index 05ed0cef..00000000 --- a/rbi/lib/orb/models/minimum_model.rbi +++ /dev/null @@ -1,31 +0,0 @@ -# typed: strong - -module Orb - module Models - class MinimumModel < Orb::BaseModel - sig { returns(T::Array[String]) } - def applies_to_price_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_ids=(_) - end - - sig { returns(String) } - def minimum_amount - end - - sig { params(_: String).returns(String) } - def minimum_amount=(_) - end - - sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } - def initialize(applies_to_price_ids:, minimum_amount:) - end - - sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/mutated_subscription_model.rbi b/rbi/lib/orb/models/mutated_subscription_model.rbi deleted file mode 100644 index 11b1030b..00000000 --- a/rbi/lib/orb/models/mutated_subscription_model.rbi +++ /dev/null @@ -1,383 +0,0 @@ -# typed: strong - -module Orb - module Models - class MutatedSubscriptionModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Integer)) } - def active_plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def active_plan_phase_order=(_) - end - - sig { returns(T::Array[Orb::Models::AdjustmentIntervalModel]) } - def adjustment_intervals - end - - sig do - params(_: T::Array[Orb::Models::AdjustmentIntervalModel]) - .returns(T::Array[Orb::Models::AdjustmentIntervalModel]) - end - def adjustment_intervals=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def auto_collection - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def auto_collection=(_) - end - - sig { returns(Orb::Models::BillingCycleAnchorConfigurationModel) } - def billing_cycle_anchor_configuration - end - - sig do - params(_: Orb::Models::BillingCycleAnchorConfigurationModel) - .returns(Orb::Models::BillingCycleAnchorConfigurationModel) - end - def billing_cycle_anchor_configuration=(_) - end - - sig { returns(Integer) } - def billing_cycle_day - end - - sig { params(_: Integer).returns(Integer) } - def billing_cycle_day=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Time)) } - def current_billing_period_end_date - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def current_billing_period_end_date=(_) - end - - sig { returns(T.nilable(Time)) } - def current_billing_period_start_date - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def current_billing_period_start_date=(_) - end - - sig { returns(Orb::Models::CustomerModel) } - def customer - end - - sig { params(_: Orb::Models::CustomerModel).returns(Orb::Models::CustomerModel) } - def customer=(_) - end - - sig { returns(T.nilable(String)) } - def default_invoice_memo - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def default_invoice_memo=(_) - end - - sig do - returns( - T::Array[ - T.any( - Orb::Models::AmountDiscountIntervalModel, - Orb::Models::PercentageDiscountIntervalModel, - Orb::Models::UsageDiscountIntervalModel - ) - ] - ) - end - def discount_intervals - end - - sig do - params( - _: T::Array[ - T.any( - Orb::Models::AmountDiscountIntervalModel, - Orb::Models::PercentageDiscountIntervalModel, - Orb::Models::UsageDiscountIntervalModel - ) - ] - ) - .returns( - T::Array[ - T.any( - Orb::Models::AmountDiscountIntervalModel, - Orb::Models::PercentageDiscountIntervalModel, - Orb::Models::UsageDiscountIntervalModel - ) - ] - ) - end - def discount_intervals=(_) - end - - sig { returns(T.nilable(Time)) } - def end_date - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def end_date=(_) - end - - sig { returns(T::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel]) } - def fixed_fee_quantity_schedule - end - - sig do - params(_: T::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel]) - .returns(T::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel]) - end - def fixed_fee_quantity_schedule=(_) - end - - sig { returns(T.nilable(String)) } - def invoicing_threshold - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoicing_threshold=(_) - end - - sig { returns(T::Array[Orb::Models::MaximumIntervalModel]) } - def maximum_intervals - end - - sig do - params(_: T::Array[Orb::Models::MaximumIntervalModel]).returns(T::Array[Orb::Models::MaximumIntervalModel]) - end - def maximum_intervals=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T::Array[Orb::Models::MinimumIntervalModel]) } - def minimum_intervals - end - - sig do - params(_: T::Array[Orb::Models::MinimumIntervalModel]).returns(T::Array[Orb::Models::MinimumIntervalModel]) - end - def minimum_intervals=(_) - end - - sig { returns(Integer) } - def net_terms - end - - sig { params(_: Integer).returns(Integer) } - def net_terms=(_) - end - - sig { returns(Orb::Models::PlanModel) } - def plan - end - - sig { params(_: Orb::Models::PlanModel).returns(Orb::Models::PlanModel) } - def plan=(_) - end - - sig { returns(T::Array[Orb::Models::PriceIntervalModel]) } - def price_intervals - end - - sig { params(_: T::Array[Orb::Models::PriceIntervalModel]).returns(T::Array[Orb::Models::PriceIntervalModel]) } - def price_intervals=(_) - end - - sig { returns(T.nilable(Orb::Models::CouponRedemptionModel)) } - def redeemed_coupon - end - - sig do - params(_: T.nilable(Orb::Models::CouponRedemptionModel)) - .returns(T.nilable(Orb::Models::CouponRedemptionModel)) - end - def redeemed_coupon=(_) - end - - sig { returns(Time) } - def start_date - end - - sig { params(_: Time).returns(Time) } - def start_date=(_) - end - - sig { returns(Symbol) } - def status - end - - sig { params(_: Symbol).returns(Symbol) } - def status=(_) - end - - sig { returns(Orb::Models::SubscriptionTrialInfoModel) } - def trial_info - end - - sig { params(_: Orb::Models::SubscriptionTrialInfoModel).returns(Orb::Models::SubscriptionTrialInfoModel) } - def trial_info=(_) - end - - sig do - params( - id: String, - active_plan_phase_order: T.nilable(Integer), - adjustment_intervals: T::Array[Orb::Models::AdjustmentIntervalModel], - auto_collection: T.nilable(T::Boolean), - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, - billing_cycle_day: Integer, - created_at: Time, - current_billing_period_end_date: T.nilable(Time), - current_billing_period_start_date: T.nilable(Time), - customer: Orb::Models::CustomerModel, - default_invoice_memo: T.nilable(String), - discount_intervals: T::Array[ - T.any( - Orb::Models::AmountDiscountIntervalModel, - Orb::Models::PercentageDiscountIntervalModel, - Orb::Models::UsageDiscountIntervalModel - ) - ], - end_date: T.nilable(Time), - fixed_fee_quantity_schedule: T::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel], - invoicing_threshold: T.nilable(String), - maximum_intervals: T::Array[Orb::Models::MaximumIntervalModel], - metadata: T::Hash[Symbol, String], - minimum_intervals: T::Array[Orb::Models::MinimumIntervalModel], - net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: T::Array[Orb::Models::PriceIntervalModel], - redeemed_coupon: T.nilable(Orb::Models::CouponRedemptionModel), - start_date: Time, - status: Symbol, - trial_info: Orb::Models::SubscriptionTrialInfoModel - ) - .void - end - def initialize( - id:, - active_plan_phase_order:, - adjustment_intervals:, - auto_collection:, - billing_cycle_anchor_configuration:, - billing_cycle_day:, - created_at:, - current_billing_period_end_date:, - current_billing_period_start_date:, - customer:, - default_invoice_memo:, - discount_intervals:, - end_date:, - fixed_fee_quantity_schedule:, - invoicing_threshold:, - maximum_intervals:, - metadata:, - minimum_intervals:, - net_terms:, - plan:, - price_intervals:, - redeemed_coupon:, - start_date:, - status:, - trial_info: - ) - end - - sig do - override - .returns( - { - id: String, - active_plan_phase_order: T.nilable(Integer), - adjustment_intervals: T::Array[Orb::Models::AdjustmentIntervalModel], - auto_collection: T.nilable(T::Boolean), - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, - billing_cycle_day: Integer, - created_at: Time, - current_billing_period_end_date: T.nilable(Time), - current_billing_period_start_date: T.nilable(Time), - customer: Orb::Models::CustomerModel, - default_invoice_memo: T.nilable(String), - discount_intervals: T::Array[ - T.any( - Orb::Models::AmountDiscountIntervalModel, - Orb::Models::PercentageDiscountIntervalModel, - Orb::Models::UsageDiscountIntervalModel - ) - ], - end_date: T.nilable(Time), - fixed_fee_quantity_schedule: T::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel], - invoicing_threshold: T.nilable(String), - maximum_intervals: T::Array[Orb::Models::MaximumIntervalModel], - metadata: T::Hash[Symbol, String], - minimum_intervals: T::Array[Orb::Models::MinimumIntervalModel], - net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: T::Array[Orb::Models::PriceIntervalModel], - redeemed_coupon: T.nilable(Orb::Models::CouponRedemptionModel), - start_date: Time, - status: Symbol, - trial_info: Orb::Models::SubscriptionTrialInfoModel - } - ) - end - def to_hash - end - - class DiscountInterval < Orb::Union - abstract! - - sig do - override - .returns( - [[Symbol, Orb::Models::AmountDiscountIntervalModel], [Symbol, Orb::Models::PercentageDiscountIntervalModel], [Symbol, Orb::Models::UsageDiscountIntervalModel]] - ) - end - private_class_method def self.variants - end - end - - class Status < Orb::Enum - abstract! - - ACTIVE = :active - ENDED = :ended - UPCOMING = :upcoming - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end -end diff --git a/rbi/lib/orb/models/new_accounting_sync_configuration_model.rbi b/rbi/lib/orb/models/new_accounting_sync_configuration_model.rbi deleted file mode 100644 index 1b82c4e9..00000000 --- a/rbi/lib/orb/models/new_accounting_sync_configuration_model.rbi +++ /dev/null @@ -1,74 +0,0 @@ -# typed: strong - -module Orb - module Models - class NewAccountingSyncConfigurationModel < Orb::BaseModel - sig { returns(T.nilable(T::Array[Orb::Models::NewAccountingSyncConfigurationModel::AccountingProvider])) } - def accounting_providers - end - - sig do - params(_: T.nilable(T::Array[Orb::Models::NewAccountingSyncConfigurationModel::AccountingProvider])) - .returns(T.nilable(T::Array[Orb::Models::NewAccountingSyncConfigurationModel::AccountingProvider])) - end - def accounting_providers=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def excluded - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def excluded=(_) - end - - sig do - params( - accounting_providers: T.nilable(T::Array[Orb::Models::NewAccountingSyncConfigurationModel::AccountingProvider]), - excluded: T.nilable(T::Boolean) - ) - .void - end - def initialize(accounting_providers: nil, excluded: nil) - end - - sig do - override - .returns( - { - accounting_providers: T.nilable(T::Array[Orb::Models::NewAccountingSyncConfigurationModel::AccountingProvider]), - excluded: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - - class AccountingProvider < Orb::BaseModel - sig { returns(String) } - def external_provider_id - end - - sig { params(_: String).returns(String) } - def external_provider_id=(_) - end - - sig { returns(String) } - def provider_type - end - - sig { params(_: String).returns(String) } - def provider_type=(_) - end - - sig { params(external_provider_id: String, provider_type: String).void } - def initialize(external_provider_id:, provider_type:) - end - - sig { override.returns({external_provider_id: String, provider_type: String}) } - def to_hash - end - end - end - end -end diff --git a/rbi/lib/orb/models/new_adjustment_model.rbi b/rbi/lib/orb/models/new_adjustment_model.rbi deleted file mode 100644 index b591c97c..00000000 --- a/rbi/lib/orb/models/new_adjustment_model.rbi +++ /dev/null @@ -1,354 +0,0 @@ -# typed: strong - -module Orb - module Models - class NewAdjustmentModel < Orb::Union - abstract! - - class NewPercentageDiscount < Orb::BaseModel - sig { returns(Symbol) } - def adjustment_type - end - - sig { params(_: Symbol).returns(Symbol) } - def adjustment_type=(_) - end - - sig { returns(T::Array[String]) } - def applies_to_price_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_ids=(_) - end - - sig { returns(Float) } - def percentage_discount - end - - sig { params(_: Float).returns(Float) } - def percentage_discount=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def is_invoice_level - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def is_invoice_level=(_) - end - - sig do - params( - applies_to_price_ids: T::Array[String], - percentage_discount: Float, - is_invoice_level: T::Boolean, - adjustment_type: Symbol - ) - .void - end - def initialize( - applies_to_price_ids:, - percentage_discount:, - is_invoice_level: nil, - adjustment_type: :percentage_discount - ) - end - - sig do - override - .returns( - { - adjustment_type: Symbol, - applies_to_price_ids: T::Array[String], - percentage_discount: Float, - is_invoice_level: T::Boolean - } - ) - end - def to_hash - end - end - - class NewUsageDiscount < Orb::BaseModel - sig { returns(Symbol) } - def adjustment_type - end - - sig { params(_: Symbol).returns(Symbol) } - def adjustment_type=(_) - end - - sig { returns(T::Array[String]) } - def applies_to_price_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_ids=(_) - end - - sig { returns(Float) } - def usage_discount - end - - sig { params(_: Float).returns(Float) } - def usage_discount=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def is_invoice_level - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def is_invoice_level=(_) - end - - sig do - params( - applies_to_price_ids: T::Array[String], - usage_discount: Float, - is_invoice_level: T::Boolean, - adjustment_type: Symbol - ) - .void - end - def initialize( - applies_to_price_ids:, - usage_discount:, - is_invoice_level: nil, - adjustment_type: :usage_discount - ) - end - - sig do - override - .returns( - { - adjustment_type: Symbol, - applies_to_price_ids: T::Array[String], - usage_discount: Float, - is_invoice_level: T::Boolean - } - ) - end - def to_hash - end - end - - class NewAmountDiscount < Orb::BaseModel - sig { returns(Symbol) } - def adjustment_type - end - - sig { params(_: Symbol).returns(Symbol) } - def adjustment_type=(_) - end - - sig { returns(String) } - def amount_discount - end - - sig { params(_: String).returns(String) } - def amount_discount=(_) - end - - sig { returns(T::Array[String]) } - def applies_to_price_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_ids=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def is_invoice_level - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def is_invoice_level=(_) - end - - sig do - params( - amount_discount: String, - applies_to_price_ids: T::Array[String], - is_invoice_level: T::Boolean, - adjustment_type: Symbol - ) - .void - end - def initialize( - amount_discount:, - applies_to_price_ids:, - is_invoice_level: nil, - adjustment_type: :amount_discount - ) - end - - sig do - override - .returns( - { - adjustment_type: Symbol, - amount_discount: String, - applies_to_price_ids: T::Array[String], - is_invoice_level: T::Boolean - } - ) - end - def to_hash - end - end - - class NewMinimum < Orb::BaseModel - sig { returns(Symbol) } - def adjustment_type - end - - sig { params(_: Symbol).returns(Symbol) } - def adjustment_type=(_) - end - - sig { returns(T::Array[String]) } - def applies_to_price_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_ids=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(String) } - def minimum_amount - end - - sig { params(_: String).returns(String) } - def minimum_amount=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def is_invoice_level - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def is_invoice_level=(_) - end - - sig do - params( - applies_to_price_ids: T::Array[String], - item_id: String, - minimum_amount: String, - is_invoice_level: T::Boolean, - adjustment_type: Symbol - ) - .void - end - def initialize( - applies_to_price_ids:, - item_id:, - minimum_amount:, - is_invoice_level: nil, - adjustment_type: :minimum - ) - end - - sig do - override - .returns( - { - adjustment_type: Symbol, - applies_to_price_ids: T::Array[String], - item_id: String, - minimum_amount: String, - is_invoice_level: T::Boolean - } - ) - end - def to_hash - end - end - - class NewMaximum < Orb::BaseModel - sig { returns(Symbol) } - def adjustment_type - end - - sig { params(_: Symbol).returns(Symbol) } - def adjustment_type=(_) - end - - sig { returns(T::Array[String]) } - def applies_to_price_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_ids=(_) - end - - sig { returns(String) } - def maximum_amount - end - - sig { params(_: String).returns(String) } - def maximum_amount=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def is_invoice_level - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def is_invoice_level=(_) - end - - sig do - params( - applies_to_price_ids: T::Array[String], - maximum_amount: String, - is_invoice_level: T::Boolean, - adjustment_type: Symbol - ) - .void - end - def initialize( - applies_to_price_ids:, - maximum_amount:, - is_invoice_level: nil, - adjustment_type: :maximum - ) - end - - sig do - override - .returns( - { - adjustment_type: Symbol, - applies_to_price_ids: T::Array[String], - maximum_amount: String, - is_invoice_level: T::Boolean - } - ) - end - def to_hash - end - end - - sig do - override - .returns( - [[Symbol, Orb::Models::NewAdjustmentModel::NewPercentageDiscount], [Symbol, Orb::Models::NewAdjustmentModel::NewUsageDiscount], [Symbol, Orb::Models::NewAdjustmentModel::NewAmountDiscount], [Symbol, Orb::Models::NewAdjustmentModel::NewMinimum], [Symbol, Orb::Models::NewAdjustmentModel::NewMaximum]] - ) - end - private_class_method def self.variants - end - end - end -end diff --git a/rbi/lib/orb/models/new_allocation_price_model.rbi b/rbi/lib/orb/models/new_allocation_price_model.rbi deleted file mode 100644 index ef5a4afa..00000000 --- a/rbi/lib/orb/models/new_allocation_price_model.rbi +++ /dev/null @@ -1,67 +0,0 @@ -# typed: strong - -module Orb - module Models - class NewAllocationPriceModel < Orb::BaseModel - sig { returns(String) } - def amount - end - - sig { params(_: String).returns(String) } - def amount=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(T::Boolean) } - def expires_at_end_of_cadence - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def expires_at_end_of_cadence=(_) - end - - sig do - params(amount: String, cadence: Symbol, currency: String, expires_at_end_of_cadence: T::Boolean).void - end - def initialize(amount:, cadence:, currency:, expires_at_end_of_cadence:) - end - - sig do - override - .returns({amount: String, cadence: Symbol, currency: String, expires_at_end_of_cadence: T::Boolean}) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end -end diff --git a/rbi/lib/orb/models/new_billing_cycle_configuration_model.rbi b/rbi/lib/orb/models/new_billing_cycle_configuration_model.rbi deleted file mode 100644 index ff060697..00000000 --- a/rbi/lib/orb/models/new_billing_cycle_configuration_model.rbi +++ /dev/null @@ -1,42 +0,0 @@ -# typed: strong - -module Orb - module Models - class NewBillingCycleConfigurationModel < Orb::BaseModel - sig { returns(Integer) } - def duration - end - - sig { params(_: Integer).returns(Integer) } - def duration=(_) - end - - sig { returns(Symbol) } - def duration_unit - end - - sig { params(_: Symbol).returns(Symbol) } - def duration_unit=(_) - end - - sig { params(duration: Integer, duration_unit: Symbol).void } - def initialize(duration:, duration_unit:) - end - - sig { override.returns({duration: Integer, duration_unit: Symbol}) } - def to_hash - end - - class DurationUnit < Orb::Enum - abstract! - - DAY = :day - MONTH = :month - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end -end diff --git a/rbi/lib/orb/models/new_floating_price_model.rbi b/rbi/lib/orb/models/new_floating_price_model.rbi deleted file mode 100644 index ea488439..00000000 --- a/rbi/lib/orb/models/new_floating_price_model.rbi +++ /dev/null @@ -1,5958 +0,0 @@ -# typed: strong - -module Orb - module Models - class NewFloatingPriceModel < Orb::Union - abstract! - - class NewFloatingUnitPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::UnitConfigModel) } - def unit_config - end - - sig { params(_: Orb::Models::UnitConfigModel).returns(Orb::Models::UnitConfigModel) } - def unit_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - currency: String, - item_id: String, - name: String, - unit_config: Orb::Models::UnitConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - currency:, - item_id:, - name:, - unit_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :unit - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - currency: String, - item_id: String, - model_type: Symbol, - name: String, - unit_config: Orb::Models::UnitConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingPackagePrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::PackageConfigModel) } - def package_config - end - - sig { params(_: Orb::Models::PackageConfigModel).returns(Orb::Models::PackageConfigModel) } - def package_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - currency: String, - item_id: String, - name: String, - package_config: Orb::Models::PackageConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - currency:, - item_id:, - name:, - package_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :package - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - currency: String, - item_id: String, - model_type: Symbol, - name: String, - package_config: Orb::Models::PackageConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingMatrixPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Orb::Models::MatrixConfigModel) } - def matrix_config - end - - sig { params(_: Orb::Models::MatrixConfigModel).returns(Orb::Models::MatrixConfigModel) } - def matrix_config=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - currency: String, - item_id: String, - matrix_config: Orb::Models::MatrixConfigModel, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - currency:, - item_id:, - matrix_config:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :matrix - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - currency: String, - item_id: String, - matrix_config: Orb::Models::MatrixConfigModel, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingMatrixWithAllocationPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Orb::Models::MatrixWithAllocationConfigModel) } - def matrix_with_allocation_config - end - - sig do - params(_: Orb::Models::MatrixWithAllocationConfigModel) - .returns(Orb::Models::MatrixWithAllocationConfigModel) - end - def matrix_with_allocation_config=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - currency: String, - item_id: String, - matrix_with_allocation_config: Orb::Models::MatrixWithAllocationConfigModel, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - currency:, - item_id:, - matrix_with_allocation_config:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :matrix_with_allocation - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - currency: String, - item_id: String, - matrix_with_allocation_config: Orb::Models::MatrixWithAllocationConfigModel, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingTieredPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::TieredConfigModel) } - def tiered_config - end - - sig { params(_: Orb::Models::TieredConfigModel).returns(Orb::Models::TieredConfigModel) } - def tiered_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - currency: String, - item_id: String, - name: String, - tiered_config: Orb::Models::TieredConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - currency:, - item_id:, - name:, - tiered_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :tiered - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - currency: String, - item_id: String, - model_type: Symbol, - name: String, - tiered_config: Orb::Models::TieredConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingTieredBpsPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::TieredBpsConfigModel) } - def tiered_bps_config - end - - sig { params(_: Orb::Models::TieredBpsConfigModel).returns(Orb::Models::TieredBpsConfigModel) } - def tiered_bps_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - currency: String, - item_id: String, - name: String, - tiered_bps_config: Orb::Models::TieredBpsConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - currency:, - item_id:, - name:, - tiered_bps_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :tiered_bps - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - currency: String, - item_id: String, - model_type: Symbol, - name: String, - tiered_bps_config: Orb::Models::TieredBpsConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingBpsPrice < Orb::BaseModel - sig { returns(Orb::Models::BpsConfigModel) } - def bps_config - end - - sig { params(_: Orb::Models::BpsConfigModel).returns(Orb::Models::BpsConfigModel) } - def bps_config=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - bps_config: Orb::Models::BpsConfigModel, - cadence: Symbol, - currency: String, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - bps_config:, - cadence:, - currency:, - item_id:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :bps - ) - end - - sig do - override - .returns( - { - bps_config: Orb::Models::BpsConfigModel, - cadence: Symbol, - currency: String, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingBulkBpsPrice < Orb::BaseModel - sig { returns(Orb::Models::BulkBpsConfigModel) } - def bulk_bps_config - end - - sig { params(_: Orb::Models::BulkBpsConfigModel).returns(Orb::Models::BulkBpsConfigModel) } - def bulk_bps_config=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - bulk_bps_config: Orb::Models::BulkBpsConfigModel, - cadence: Symbol, - currency: String, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - bulk_bps_config:, - cadence:, - currency:, - item_id:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :bulk_bps - ) - end - - sig do - override - .returns( - { - bulk_bps_config: Orb::Models::BulkBpsConfigModel, - cadence: Symbol, - currency: String, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingBulkPrice < Orb::BaseModel - sig { returns(Orb::Models::BulkConfigModel) } - def bulk_config - end - - sig { params(_: Orb::Models::BulkConfigModel).returns(Orb::Models::BulkConfigModel) } - def bulk_config=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - bulk_config: Orb::Models::BulkConfigModel, - cadence: Symbol, - currency: String, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - bulk_config:, - cadence:, - currency:, - item_id:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :bulk - ) - end - - sig do - override - .returns( - { - bulk_config: Orb::Models::BulkConfigModel, - cadence: Symbol, - currency: String, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingThresholdTotalAmountPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def threshold_total_amount_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def threshold_total_amount_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - currency: String, - item_id: String, - name: String, - threshold_total_amount_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - currency:, - item_id:, - name:, - threshold_total_amount_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :threshold_total_amount - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - currency: String, - item_id: String, - model_type: Symbol, - name: String, - threshold_total_amount_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingTieredPackagePrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def tiered_package_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def tiered_package_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - currency: String, - item_id: String, - name: String, - tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - currency:, - item_id:, - name:, - tiered_package_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :tiered_package - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - currency: String, - item_id: String, - model_type: Symbol, - name: String, - tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingGroupedTieredPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def grouped_tiered_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def grouped_tiered_config=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - currency: String, - grouped_tiered_config: Orb::Models::CustomRatingFunctionConfigModel, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - currency:, - grouped_tiered_config:, - item_id:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :grouped_tiered - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - currency: String, - grouped_tiered_config: Orb::Models::CustomRatingFunctionConfigModel, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingMaxGroupTieredPackagePrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def max_group_tiered_package_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def max_group_tiered_package_config=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - currency: String, - item_id: String, - max_group_tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - currency:, - item_id:, - max_group_tiered_package_config:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :max_group_tiered_package - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - currency: String, - item_id: String, - max_group_tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingTieredWithMinimumPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def tiered_with_minimum_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def tiered_with_minimum_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - currency: String, - item_id: String, - name: String, - tiered_with_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - currency:, - item_id:, - name:, - tiered_with_minimum_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :tiered_with_minimum - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - currency: String, - item_id: String, - model_type: Symbol, - name: String, - tiered_with_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingPackageWithAllocationPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def package_with_allocation_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def package_with_allocation_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - currency: String, - item_id: String, - name: String, - package_with_allocation_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - currency:, - item_id:, - name:, - package_with_allocation_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :package_with_allocation - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - currency: String, - item_id: String, - model_type: Symbol, - name: String, - package_with_allocation_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingTieredPackageWithMinimumPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def tiered_package_with_minimum_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def tiered_package_with_minimum_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - currency: String, - item_id: String, - name: String, - tiered_package_with_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - currency:, - item_id:, - name:, - tiered_package_with_minimum_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :tiered_package_with_minimum - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - currency: String, - item_id: String, - model_type: Symbol, - name: String, - tiered_package_with_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingUnitWithPercentPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def unit_with_percent_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def unit_with_percent_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - currency: String, - item_id: String, - name: String, - unit_with_percent_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - currency:, - item_id:, - name:, - unit_with_percent_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :unit_with_percent - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - currency: String, - item_id: String, - model_type: Symbol, - name: String, - unit_with_percent_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingTieredWithProrationPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def tiered_with_proration_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def tiered_with_proration_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - currency: String, - item_id: String, - name: String, - tiered_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - currency:, - item_id:, - name:, - tiered_with_proration_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :tiered_with_proration - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - currency: String, - item_id: String, - model_type: Symbol, - name: String, - tiered_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingUnitWithProrationPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def unit_with_proration_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def unit_with_proration_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - currency: String, - item_id: String, - name: String, - unit_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - currency:, - item_id:, - name:, - unit_with_proration_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :unit_with_proration - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - currency: String, - item_id: String, - model_type: Symbol, - name: String, - unit_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingGroupedAllocationPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def grouped_allocation_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def grouped_allocation_config=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - currency: String, - grouped_allocation_config: Orb::Models::CustomRatingFunctionConfigModel, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - currency:, - grouped_allocation_config:, - item_id:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :grouped_allocation - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - currency: String, - grouped_allocation_config: Orb::Models::CustomRatingFunctionConfigModel, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingGroupedWithProratedMinimumPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def grouped_with_prorated_minimum_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def grouped_with_prorated_minimum_config=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - currency: String, - grouped_with_prorated_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - currency:, - grouped_with_prorated_minimum_config:, - item_id:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :grouped_with_prorated_minimum - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - currency: String, - grouped_with_prorated_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingGroupedWithMeteredMinimumPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def grouped_with_metered_minimum_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def grouped_with_metered_minimum_config=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - currency: String, - grouped_with_metered_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - currency:, - grouped_with_metered_minimum_config:, - item_id:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :grouped_with_metered_minimum - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - currency: String, - grouped_with_metered_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingMatrixWithDisplayNamePrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def matrix_with_display_name_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def matrix_with_display_name_config=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - currency: String, - item_id: String, - matrix_with_display_name_config: Orb::Models::CustomRatingFunctionConfigModel, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - currency:, - item_id:, - matrix_with_display_name_config:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :matrix_with_display_name - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - currency: String, - item_id: String, - matrix_with_display_name_config: Orb::Models::CustomRatingFunctionConfigModel, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingBulkWithProrationPrice < Orb::BaseModel - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def bulk_with_proration_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def bulk_with_proration_config=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - bulk_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, - cadence: Symbol, - currency: String, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - bulk_with_proration_config:, - cadence:, - currency:, - item_id:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :bulk_with_proration - ) - end - - sig do - override - .returns( - { - bulk_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, - cadence: Symbol, - currency: String, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingGroupedTieredPackagePrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def grouped_tiered_package_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def grouped_tiered_package_config=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - currency: String, - grouped_tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - currency:, - grouped_tiered_package_config:, - item_id:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :grouped_tiered_package - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - currency: String, - grouped_tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingScalableMatrixWithUnitPricingPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def scalable_matrix_with_unit_pricing_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def scalable_matrix_with_unit_pricing_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - currency: String, - item_id: String, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - currency:, - item_id:, - name:, - scalable_matrix_with_unit_pricing_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :scalable_matrix_with_unit_pricing - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - currency: String, - item_id: String, - model_type: Symbol, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingScalableMatrixWithTieredPricingPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def scalable_matrix_with_tiered_pricing_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def scalable_matrix_with_tiered_pricing_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - currency: String, - item_id: String, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - currency:, - item_id:, - name:, - scalable_matrix_with_tiered_pricing_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :scalable_matrix_with_tiered_pricing - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - currency: String, - item_id: String, - model_type: Symbol, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewFloatingCumulativeGroupedBulkPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def cumulative_grouped_bulk_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def cumulative_grouped_bulk_config=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig do - params( - cadence: Symbol, - cumulative_grouped_bulk_config: Orb::Models::CustomRatingFunctionConfigModel, - currency: String, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - cumulative_grouped_bulk_config:, - currency:, - item_id:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - model_type: :cumulative_grouped_bulk - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - cumulative_grouped_bulk_config: Orb::Models::CustomRatingFunctionConfigModel, - currency: String, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - sig do - override - .returns( - [[Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice], [Symbol, Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice]] - ) - end - private_class_method def self.variants - end - end - end -end diff --git a/rbi/lib/orb/models/new_reporting_configuration_model.rbi b/rbi/lib/orb/models/new_reporting_configuration_model.rbi deleted file mode 100644 index bdf29821..00000000 --- a/rbi/lib/orb/models/new_reporting_configuration_model.rbi +++ /dev/null @@ -1,23 +0,0 @@ -# typed: strong - -module Orb - module Models - class NewReportingConfigurationModel < Orb::BaseModel - sig { returns(T::Boolean) } - def exempt - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def exempt=(_) - end - - sig { params(exempt: T::Boolean).void } - def initialize(exempt:) - end - - sig { override.returns({exempt: T::Boolean}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/new_subscription_price_model.rbi b/rbi/lib/orb/models/new_subscription_price_model.rbi deleted file mode 100644 index 7ff51cd2..00000000 --- a/rbi/lib/orb/models/new_subscription_price_model.rbi +++ /dev/null @@ -1,5594 +0,0 @@ -# typed: strong - -module Orb - module Models - class NewSubscriptionPriceModel < Orb::Union - abstract! - - class NewSubscriptionUnitPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::UnitConfigModel) } - def unit_config - end - - sig { params(_: Orb::Models::UnitConfigModel).returns(Orb::Models::UnitConfigModel) } - def unit_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - cadence: Symbol, - item_id: String, - name: String, - unit_config: Orb::Models::UnitConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - item_id:, - name:, - unit_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :unit - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - item_id: String, - model_type: Symbol, - name: String, - unit_config: Orb::Models::UnitConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionPackagePrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::PackageConfigModel) } - def package_config - end - - sig { params(_: Orb::Models::PackageConfigModel).returns(Orb::Models::PackageConfigModel) } - def package_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - cadence: Symbol, - item_id: String, - name: String, - package_config: Orb::Models::PackageConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - item_id:, - name:, - package_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :package - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - item_id: String, - model_type: Symbol, - name: String, - package_config: Orb::Models::PackageConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionMatrixPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Orb::Models::MatrixConfigModel) } - def matrix_config - end - - sig { params(_: Orb::Models::MatrixConfigModel).returns(Orb::Models::MatrixConfigModel) } - def matrix_config=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - cadence: Symbol, - item_id: String, - matrix_config: Orb::Models::MatrixConfigModel, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - item_id:, - matrix_config:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :matrix - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - item_id: String, - matrix_config: Orb::Models::MatrixConfigModel, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionTieredPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::TieredConfigModel) } - def tiered_config - end - - sig { params(_: Orb::Models::TieredConfigModel).returns(Orb::Models::TieredConfigModel) } - def tiered_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - cadence: Symbol, - item_id: String, - name: String, - tiered_config: Orb::Models::TieredConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - item_id:, - name:, - tiered_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :tiered - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - item_id: String, - model_type: Symbol, - name: String, - tiered_config: Orb::Models::TieredConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionTieredBpsPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::TieredBpsConfigModel) } - def tiered_bps_config - end - - sig { params(_: Orb::Models::TieredBpsConfigModel).returns(Orb::Models::TieredBpsConfigModel) } - def tiered_bps_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - cadence: Symbol, - item_id: String, - name: String, - tiered_bps_config: Orb::Models::TieredBpsConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - item_id:, - name:, - tiered_bps_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :tiered_bps - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - item_id: String, - model_type: Symbol, - name: String, - tiered_bps_config: Orb::Models::TieredBpsConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionBpsPrice < Orb::BaseModel - sig { returns(Orb::Models::BpsConfigModel) } - def bps_config - end - - sig { params(_: Orb::Models::BpsConfigModel).returns(Orb::Models::BpsConfigModel) } - def bps_config=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - bps_config: Orb::Models::BpsConfigModel, - cadence: Symbol, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - bps_config:, - cadence:, - item_id:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :bps - ) - end - - sig do - override - .returns( - { - bps_config: Orb::Models::BpsConfigModel, - cadence: Symbol, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionBulkBpsPrice < Orb::BaseModel - sig { returns(Orb::Models::BulkBpsConfigModel) } - def bulk_bps_config - end - - sig { params(_: Orb::Models::BulkBpsConfigModel).returns(Orb::Models::BulkBpsConfigModel) } - def bulk_bps_config=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - bulk_bps_config: Orb::Models::BulkBpsConfigModel, - cadence: Symbol, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - bulk_bps_config:, - cadence:, - item_id:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :bulk_bps - ) - end - - sig do - override - .returns( - { - bulk_bps_config: Orb::Models::BulkBpsConfigModel, - cadence: Symbol, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionBulkPrice < Orb::BaseModel - sig { returns(Orb::Models::BulkConfigModel) } - def bulk_config - end - - sig { params(_: Orb::Models::BulkConfigModel).returns(Orb::Models::BulkConfigModel) } - def bulk_config=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - bulk_config: Orb::Models::BulkConfigModel, - cadence: Symbol, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - bulk_config:, - cadence:, - item_id:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :bulk - ) - end - - sig do - override - .returns( - { - bulk_config: Orb::Models::BulkConfigModel, - cadence: Symbol, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionThresholdTotalAmountPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def threshold_total_amount_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def threshold_total_amount_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - cadence: Symbol, - item_id: String, - name: String, - threshold_total_amount_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - item_id:, - name:, - threshold_total_amount_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :threshold_total_amount - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - item_id: String, - model_type: Symbol, - name: String, - threshold_total_amount_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionTieredPackagePrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def tiered_package_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def tiered_package_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - cadence: Symbol, - item_id: String, - name: String, - tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - item_id:, - name:, - tiered_package_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :tiered_package - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - item_id: String, - model_type: Symbol, - name: String, - tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionTieredWithMinimumPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def tiered_with_minimum_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def tiered_with_minimum_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - cadence: Symbol, - item_id: String, - name: String, - tiered_with_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - item_id:, - name:, - tiered_with_minimum_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :tiered_with_minimum - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - item_id: String, - model_type: Symbol, - name: String, - tiered_with_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionUnitWithPercentPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def unit_with_percent_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def unit_with_percent_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - cadence: Symbol, - item_id: String, - name: String, - unit_with_percent_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - item_id:, - name:, - unit_with_percent_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :unit_with_percent - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - item_id: String, - model_type: Symbol, - name: String, - unit_with_percent_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionPackageWithAllocationPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def package_with_allocation_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def package_with_allocation_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - cadence: Symbol, - item_id: String, - name: String, - package_with_allocation_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - item_id:, - name:, - package_with_allocation_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :package_with_allocation - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - item_id: String, - model_type: Symbol, - name: String, - package_with_allocation_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionTierWithProrationPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def tiered_with_proration_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def tiered_with_proration_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - cadence: Symbol, - item_id: String, - name: String, - tiered_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - item_id:, - name:, - tiered_with_proration_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :tiered_with_proration - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - item_id: String, - model_type: Symbol, - name: String, - tiered_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionUnitWithProrationPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def unit_with_proration_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def unit_with_proration_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - cadence: Symbol, - item_id: String, - name: String, - unit_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - item_id:, - name:, - unit_with_proration_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :unit_with_proration - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - item_id: String, - model_type: Symbol, - name: String, - unit_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionGroupedAllocationPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def grouped_allocation_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def grouped_allocation_config=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - cadence: Symbol, - grouped_allocation_config: Orb::Models::CustomRatingFunctionConfigModel, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - grouped_allocation_config:, - item_id:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :grouped_allocation - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - grouped_allocation_config: Orb::Models::CustomRatingFunctionConfigModel, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionGroupedWithProratedMinimumPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def grouped_with_prorated_minimum_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def grouped_with_prorated_minimum_config=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - cadence: Symbol, - grouped_with_prorated_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - grouped_with_prorated_minimum_config:, - item_id:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :grouped_with_prorated_minimum - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - grouped_with_prorated_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionBulkWithProrationPrice < Orb::BaseModel - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def bulk_with_proration_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def bulk_with_proration_config=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - bulk_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, - cadence: Symbol, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - bulk_with_proration_config:, - cadence:, - item_id:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :bulk_with_proration - ) - end - - sig do - override - .returns( - { - bulk_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, - cadence: Symbol, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionScalableMatrixWithUnitPricingPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def scalable_matrix_with_unit_pricing_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def scalable_matrix_with_unit_pricing_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - cadence: Symbol, - item_id: String, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - item_id:, - name:, - scalable_matrix_with_unit_pricing_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :scalable_matrix_with_unit_pricing - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - item_id: String, - model_type: Symbol, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionScalableMatrixWithTieredPricingPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def scalable_matrix_with_tiered_pricing_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def scalable_matrix_with_tiered_pricing_config=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - cadence: Symbol, - item_id: String, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - item_id:, - name:, - scalable_matrix_with_tiered_pricing_config:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :scalable_matrix_with_tiered_pricing - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - item_id: String, - model_type: Symbol, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Models::CustomRatingFunctionConfigModel, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionCumulativeGroupedBulkPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def cumulative_grouped_bulk_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def cumulative_grouped_bulk_config=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - cadence: Symbol, - cumulative_grouped_bulk_config: Orb::Models::CustomRatingFunctionConfigModel, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - cumulative_grouped_bulk_config:, - item_id:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :cumulative_grouped_bulk - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - cumulative_grouped_bulk_config: Orb::Models::CustomRatingFunctionConfigModel, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionMaxGroupTieredPackagePrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def max_group_tiered_package_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def max_group_tiered_package_config=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - cadence: Symbol, - item_id: String, - max_group_tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - item_id:, - max_group_tiered_package_config:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :max_group_tiered_package - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - item_id: String, - max_group_tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionGroupedWithMeteredMinimumPrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def grouped_with_metered_minimum_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def grouped_with_metered_minimum_config=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - cadence: Symbol, - grouped_with_metered_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - grouped_with_metered_minimum_config:, - item_id:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :grouped_with_metered_minimum - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - grouped_with_metered_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionMatrixWithDisplayNamePrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def matrix_with_display_name_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def matrix_with_display_name_config=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - cadence: Symbol, - item_id: String, - matrix_with_display_name_config: Orb::Models::CustomRatingFunctionConfigModel, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - item_id:, - matrix_with_display_name_config:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :matrix_with_display_name - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - item_id: String, - matrix_with_display_name_config: Orb::Models::CustomRatingFunctionConfigModel, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class NewSubscriptionGroupedTieredPackagePrice < Orb::BaseModel - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def grouped_tiered_package_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def grouped_tiered_package_config=(_) - end - - sig { returns(String) } - def item_id - end - - sig { params(_: String).returns(String) } - def item_id=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(String)) } - def billable_metric_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def billable_metric_id=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def billed_in_advance - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def billed_in_advance=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def billing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def billing_cycle_configuration=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(T.nilable(String)) } - def currency - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(String)) } - def invoice_grouping_key - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoice_grouping_key=(_) - end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - def metadata - end - - sig do - params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) - .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) - end - def metadata=(_) - end - - sig { returns(T.nilable(String)) } - def reference_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reference_id=(_) - end - - sig do - params( - cadence: Symbol, - grouped_tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ) - .void - end - def initialize( - cadence:, - grouped_tiered_package_config:, - item_id:, - name:, - billable_metric_id: nil, - billed_in_advance: nil, - billing_cycle_configuration: nil, - conversion_rate: nil, - currency: nil, - external_price_id: nil, - fixed_price_quantity: nil, - invoice_grouping_key: nil, - invoicing_cycle_configuration: nil, - metadata: nil, - reference_id: nil, - model_type: :grouped_tiered_package - ) - end - - sig do - override - .returns( - { - cadence: Symbol, - grouped_tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - conversion_rate: T.nilable(Float), - currency: T.nilable(String), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - sig do - override - .returns( - [[Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice], [Symbol, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice]] - ) - end - private_class_method def self.variants - end - end - end -end diff --git a/rbi/lib/orb/models/new_tax_configuration_model.rbi b/rbi/lib/orb/models/new_tax_configuration_model.rbi deleted file mode 100644 index 0a28bfdf..00000000 --- a/rbi/lib/orb/models/new_tax_configuration_model.rbi +++ /dev/null @@ -1,88 +0,0 @@ -# typed: strong - -module Orb - module Models - class NewTaxConfigurationModel < Orb::Union - abstract! - - class NewAvalaraTaxConfiguration < Orb::BaseModel - sig { returns(T::Boolean) } - def tax_exempt - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def tax_exempt=(_) - end - - sig { returns(Symbol) } - def tax_provider - end - - sig { params(_: Symbol).returns(Symbol) } - def tax_provider=(_) - end - - sig { returns(T.nilable(String)) } - def tax_exemption_code - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def tax_exemption_code=(_) - end - - sig do - params(tax_exempt: T::Boolean, tax_exemption_code: T.nilable(String), tax_provider: Symbol).void - end - def initialize(tax_exempt:, tax_exemption_code: nil, tax_provider: :avalara) - end - - sig do - override.returns( - { - tax_exempt: T::Boolean, - tax_provider: Symbol, - tax_exemption_code: T.nilable(String) - } - ) - end - def to_hash - end - end - - class NewTaxJarConfiguration < Orb::BaseModel - sig { returns(T::Boolean) } - def tax_exempt - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def tax_exempt=(_) - end - - sig { returns(Symbol) } - def tax_provider - end - - sig { params(_: Symbol).returns(Symbol) } - def tax_provider=(_) - end - - sig { params(tax_exempt: T::Boolean, tax_provider: Symbol).void } - def initialize(tax_exempt:, tax_provider: :taxjar) - end - - sig { override.returns({tax_exempt: T::Boolean, tax_provider: Symbol}) } - def to_hash - end - end - - sig do - override - .returns( - [[Symbol, Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration], [Symbol, Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration]] - ) - end - private_class_method def self.variants - end - end - end -end diff --git a/rbi/lib/orb/models/package_config_model.rbi b/rbi/lib/orb/models/package_config_model.rbi deleted file mode 100644 index b76cf879..00000000 --- a/rbi/lib/orb/models/package_config_model.rbi +++ /dev/null @@ -1,31 +0,0 @@ -# typed: strong - -module Orb - module Models - class PackageConfigModel < Orb::BaseModel - sig { returns(String) } - def package_amount - end - - sig { params(_: String).returns(String) } - def package_amount=(_) - end - - sig { returns(Integer) } - def package_size - end - - sig { params(_: Integer).returns(Integer) } - def package_size=(_) - end - - sig { params(package_amount: String, package_size: Integer).void } - def initialize(package_amount:, package_size:) - end - - sig { override.returns({package_amount: String, package_size: Integer}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/pagination_metadata_model.rbi b/rbi/lib/orb/models/pagination_metadata_model.rbi deleted file mode 100644 index 9c2ecc76..00000000 --- a/rbi/lib/orb/models/pagination_metadata_model.rbi +++ /dev/null @@ -1,31 +0,0 @@ -# typed: strong - -module Orb - module Models - class PaginationMetadataModel < Orb::BaseModel - sig { returns(T::Boolean) } - def has_more - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def has_more=(_) - end - - sig { returns(T.nilable(String)) } - def next_cursor - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def next_cursor=(_) - end - - sig { params(has_more: T::Boolean, next_cursor: T.nilable(String)).void } - def initialize(has_more:, next_cursor:) - end - - sig { override.returns({has_more: T::Boolean, next_cursor: T.nilable(String)}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/payment_attempt_model.rbi b/rbi/lib/orb/models/payment_attempt_model.rbi deleted file mode 100644 index b923faa1..00000000 --- a/rbi/lib/orb/models/payment_attempt_model.rbi +++ /dev/null @@ -1,95 +0,0 @@ -# typed: strong - -module Orb - module Models - class PaymentAttemptModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(String) } - def amount - end - - sig { params(_: String).returns(String) } - def amount=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Symbol)) } - def payment_provider - end - - sig { params(_: T.nilable(Symbol)).returns(T.nilable(Symbol)) } - def payment_provider=(_) - end - - sig { returns(T.nilable(String)) } - def payment_provider_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def payment_provider_id=(_) - end - - sig { returns(T::Boolean) } - def succeeded - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def succeeded=(_) - end - - sig do - params( - id: String, - amount: String, - created_at: Time, - payment_provider: T.nilable(Symbol), - payment_provider_id: T.nilable(String), - succeeded: T::Boolean - ) - .void - end - def initialize(id:, amount:, created_at:, payment_provider:, payment_provider_id:, succeeded:) - end - - sig do - override - .returns( - { - id: String, - amount: String, - created_at: Time, - payment_provider: T.nilable(Symbol), - payment_provider_id: T.nilable(String), - succeeded: T::Boolean - } - ) - end - def to_hash - end - - class PaymentProvider < Orb::Enum - abstract! - - STRIPE = T.let(:stripe, T.nilable(Symbol)) - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end -end diff --git a/rbi/lib/orb/models/percentage_discount_interval_model.rbi b/rbi/lib/orb/models/percentage_discount_interval_model.rbi deleted file mode 100644 index d7cad62f..00000000 --- a/rbi/lib/orb/models/percentage_discount_interval_model.rbi +++ /dev/null @@ -1,102 +0,0 @@ -# typed: strong - -module Orb - module Models - class PercentageDiscountIntervalModel < Orb::BaseModel - sig { returns(T::Array[String]) } - def applies_to_price_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_ids=(_) - end - - sig { returns(T::Array[String]) } - def applies_to_price_interval_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_interval_ids=(_) - end - - sig { returns(Symbol) } - def discount_type - end - - sig { params(_: Symbol).returns(Symbol) } - def discount_type=(_) - end - - sig { returns(T.nilable(Time)) } - def end_date - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def end_date=(_) - end - - sig { returns(Float) } - def percentage_discount - end - - sig { params(_: Float).returns(Float) } - def percentage_discount=(_) - end - - sig { returns(Time) } - def start_date - end - - sig { params(_: Time).returns(Time) } - def start_date=(_) - end - - sig do - params( - applies_to_price_ids: T::Array[String], - applies_to_price_interval_ids: T::Array[String], - discount_type: Symbol, - end_date: T.nilable(Time), - percentage_discount: Float, - start_date: Time - ) - .void - end - def initialize( - applies_to_price_ids:, - applies_to_price_interval_ids:, - discount_type:, - end_date:, - percentage_discount:, - start_date: - ) - end - - sig do - override - .returns( - { - applies_to_price_ids: T::Array[String], - applies_to_price_interval_ids: T::Array[String], - discount_type: Symbol, - end_date: T.nilable(Time), - percentage_discount: Float, - start_date: Time - } - ) - end - def to_hash - end - - class DiscountType < Orb::Enum - abstract! - - PERCENTAGE = :percentage - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end -end diff --git a/rbi/lib/orb/models/percentage_discount_model.rbi b/rbi/lib/orb/models/percentage_discount_model.rbi deleted file mode 100644 index afa8d571..00000000 --- a/rbi/lib/orb/models/percentage_discount_model.rbi +++ /dev/null @@ -1,75 +0,0 @@ -# typed: strong - -module Orb - module Models - class PercentageDiscountModel < Orb::BaseModel - sig { returns(T::Array[String]) } - def applies_to_price_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_ids=(_) - end - - sig { returns(Symbol) } - def discount_type - end - - sig { params(_: Symbol).returns(Symbol) } - def discount_type=(_) - end - - sig { returns(Float) } - def percentage_discount - end - - sig { params(_: Float).returns(Float) } - def percentage_discount=(_) - end - - sig { returns(T.nilable(String)) } - def reason - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reason=(_) - end - - sig do - params( - applies_to_price_ids: T::Array[String], - discount_type: Symbol, - percentage_discount: Float, - reason: T.nilable(String) - ) - .void - end - def initialize(applies_to_price_ids:, discount_type:, percentage_discount:, reason: nil) - end - - sig do - override - .returns( - { - applies_to_price_ids: T::Array[String], - discount_type: Symbol, - percentage_discount: Float, - reason: T.nilable(String) - } - ) - end - def to_hash - end - - class DiscountType < Orb::Enum - abstract! - - PERCENTAGE = :percentage - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end -end diff --git a/rbi/lib/orb/models/plan.rbi b/rbi/lib/orb/models/plan.rbi index 4d278774..ce92affb 100644 --- a/rbi/lib/orb/models/plan.rbi +++ b/rbi/lib/orb/models/plan.rbi @@ -15,11 +15,11 @@ module Orb returns( T::Array[ T.any( - Orb::Models::AdjustmentModel::PlanPhaseUsageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseAmountDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhasePercentageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMinimumAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMaximumAdjustment + Orb::Models::Plan::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::Plan::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::Plan::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::Plan::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::Plan::Adjustment::PlanPhaseMaximumAdjustment ) ] ) @@ -31,22 +31,22 @@ module Orb params( _: T::Array[ T.any( - Orb::Models::AdjustmentModel::PlanPhaseUsageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseAmountDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhasePercentageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMinimumAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMaximumAdjustment + Orb::Models::Plan::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::Plan::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::Plan::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::Plan::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::Plan::Adjustment::PlanPhaseMaximumAdjustment ) ] ) .returns( T::Array[ T.any( - Orb::Models::AdjustmentModel::PlanPhaseUsageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseAmountDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhasePercentageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMinimumAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMaximumAdjustment + Orb::Models::Plan::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::Plan::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::Plan::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::Plan::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::Plan::Adjustment::PlanPhaseMaximumAdjustment ) ] ) @@ -54,11 +54,11 @@ module Orb def adjustments=(_) end - sig { returns(T.nilable(Orb::Models::PlanMinifiedModel)) } + sig { returns(T.nilable(Orb::Models::Plan::BasePlan)) } def base_plan end - sig { params(_: T.nilable(Orb::Models::PlanMinifiedModel)).returns(T.nilable(Orb::Models::PlanMinifiedModel)) } + sig { params(_: T.nilable(Orb::Models::Plan::BasePlan)).returns(T.nilable(Orb::Models::Plan::BasePlan)) } def base_plan=(_) end @@ -158,11 +158,11 @@ module Orb def invoicing_currency=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Plan::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig { params(_: T.nilable(Orb::Models::Plan::Maximum)).returns(T.nilable(Orb::Models::Plan::Maximum)) } def maximum=(_) end @@ -182,11 +182,11 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Plan::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig { params(_: T.nilable(Orb::Models::Plan::Minimum)).returns(T.nilable(Orb::Models::Plan::Minimum)) } def minimum=(_) end @@ -229,34 +229,34 @@ module Orb returns( T::Array[ T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice ) ] ) @@ -268,68 +268,68 @@ module Orb params( _: T::Array[ T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice ) ] ) .returns( T::Array[ T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice ) ] ) @@ -374,14 +374,14 @@ module Orb id: String, adjustments: T::Array[ T.any( - Orb::Models::AdjustmentModel::PlanPhaseUsageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseAmountDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhasePercentageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMinimumAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMaximumAdjustment + Orb::Models::Plan::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::Plan::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::Plan::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::Plan::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::Plan::Adjustment::PlanPhaseMaximumAdjustment ) ], - base_plan: T.nilable(Orb::Models::PlanMinifiedModel), + base_plan: T.nilable(Orb::Models::Plan::BasePlan), base_plan_id: T.nilable(String), created_at: Time, currency: String, @@ -397,44 +397,44 @@ module Orb ), external_plan_id: T.nilable(String), invoicing_currency: String, - maximum: T.nilable(Orb::Models::MaximumModel), + maximum: T.nilable(Orb::Models::Plan::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Plan::Minimum), minimum_amount: T.nilable(String), name: String, net_terms: T.nilable(Integer), plan_phases: T.nilable(T::Array[Orb::Models::Plan::PlanPhase]), prices: T::Array[ T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice ) ], product: Orb::Models::Plan::Product, @@ -479,14 +479,14 @@ module Orb id: String, adjustments: T::Array[ T.any( - Orb::Models::AdjustmentModel::PlanPhaseUsageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseAmountDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhasePercentageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMinimumAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMaximumAdjustment + Orb::Models::Plan::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::Plan::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::Plan::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::Plan::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::Plan::Adjustment::PlanPhaseMaximumAdjustment ) ], - base_plan: T.nilable(Orb::Models::PlanMinifiedModel), + base_plan: T.nilable(Orb::Models::Plan::BasePlan), base_plan_id: T.nilable(String), created_at: Time, currency: String, @@ -502,44 +502,44 @@ module Orb ), external_plan_id: T.nilable(String), invoicing_currency: String, - maximum: T.nilable(Orb::Models::MaximumModel), + maximum: T.nilable(Orb::Models::Plan::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Plan::Minimum), minimum_amount: T.nilable(String), name: String, net_terms: T.nilable(Integer), plan_phases: T.nilable(T::Array[Orb::Models::Plan::PlanPhase]), prices: T::Array[ T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice ) ], product: Orb::Models::Plan::Product, @@ -552,6 +552,616 @@ module Orb def to_hash end + class Adjustment < Orb::Union + abstract! + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float, + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + usage_discount:, + adjustment_type: :usage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float + } + ) + end + def to_hash + end + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + amount_discount:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + adjustment_type: :amount_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + percentage_discount:, + plan_phase_order:, + reason:, + adjustment_type: :percentage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + item_id:, + minimum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :minimum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + maximum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :maximum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::Plan::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::Plan::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::Plan::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::Plan::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::Plan::Adjustment::PlanPhaseMaximumAdjustment]] + ) + end + private_class_method def self.variants + end + end + + class BasePlan < Orb::BaseModel + sig { returns(T.nilable(String)) } + def id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_plan_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_plan_id=(_) + end + + sig { returns(T.nilable(String)) } + def name + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def name=(_) + end + + sig do + params(id: T.nilable(String), external_plan_id: T.nilable(String), name: T.nilable(String)).void + end + def initialize(id:, external_plan_id:, name:) + end + + sig do + override.returns( + { + id: T.nilable(String), + external_plan_id: T.nilable(String), + name: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + class PlanPhase < Orb::BaseModel sig { returns(String) } def id @@ -625,11 +1235,14 @@ module Orb def duration_unit=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Plan::PlanPhase::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Plan::PlanPhase::Maximum)) + .returns(T.nilable(Orb::Models::Plan::PlanPhase::Maximum)) + end def maximum=(_) end @@ -641,11 +1254,14 @@ module Orb def maximum_amount=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Plan::PlanPhase::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Plan::PlanPhase::Minimum)) + .returns(T.nilable(Orb::Models::Plan::PlanPhase::Minimum)) + end def minimum=(_) end @@ -687,9 +1303,9 @@ module Orb ), duration: T.nilable(Integer), duration_unit: T.nilable(Symbol), - maximum: T.nilable(Orb::Models::MaximumModel), + maximum: T.nilable(Orb::Models::Plan::PlanPhase::Maximum), maximum_amount: T.nilable(String), - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Plan::PlanPhase::Minimum), minimum_amount: T.nilable(String), name: String, order: Integer @@ -727,9 +1343,9 @@ module Orb ), duration: T.nilable(Integer), duration_unit: T.nilable(Symbol), - maximum: T.nilable(Orb::Models::MaximumModel), + maximum: T.nilable(Orb::Models::Plan::PlanPhase::Maximum), maximum_amount: T.nilable(String), - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Plan::PlanPhase::Minimum), minimum_amount: T.nilable(String), name: String, order: Integer @@ -752,6 +1368,58 @@ module Orb def self.values end end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end end class Product < Orb::BaseModel diff --git a/rbi/lib/orb/models/plan_create_params.rbi b/rbi/lib/orb/models/plan_create_params.rbi index b9177ce8..fee6b228 100644 --- a/rbi/lib/orb/models/plan_create_params.rbi +++ b/rbi/lib/orb/models/plan_create_params.rbi @@ -306,11 +306,14 @@ module Orb def name=(_) end - sig { returns(Orb::Models::UnitConfigModel) } + sig { returns(Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::UnitConfig) } def unit_config end - sig { params(_: Orb::Models::UnitConfigModel).returns(Orb::Models::UnitConfigModel) } + sig do + params(_: Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::UnitConfig) + .returns(Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::UnitConfig) + end def unit_config=(_) end @@ -330,13 +333,13 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::BillingCycleConfiguration)) } def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::BillingCycleConfiguration)) + .returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::BillingCycleConfiguration)) end def billing_cycle_configuration=(_) end @@ -381,13 +384,13 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end @@ -408,16 +411,16 @@ module Orb cadence: Symbol, item_id: String, name: String, - unit_config: Orb::Models::UnitConfigModel, + unit_config: Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::UnitConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::InvoicingCycleConfiguration), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -450,16 +453,16 @@ module Orb item_id: String, model_type: Symbol, name: String, - unit_config: Orb::Models::UnitConfigModel, + unit_config: Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::UnitConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::InvoicingCycleConfiguration), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -481,6 +484,98 @@ module Orb def self.values end end + + class UnitConfig < Orb::BaseModel + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { params(unit_amount: String).void } + def initialize(unit_amount:) + end + + sig { override.returns({unit_amount: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end class NewPlanPackagePrice < Orb::BaseModel @@ -516,11 +611,14 @@ module Orb def name=(_) end - sig { returns(Orb::Models::PackageConfigModel) } + sig { returns(Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::PackageConfig) } def package_config end - sig { params(_: Orb::Models::PackageConfigModel).returns(Orb::Models::PackageConfigModel) } + sig do + params(_: Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::PackageConfig) + .returns(Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::PackageConfig) + end def package_config=(_) end @@ -540,13 +638,13 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::BillingCycleConfiguration)) } def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::BillingCycleConfiguration)) + .returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::BillingCycleConfiguration)) end def billing_cycle_configuration=(_) end @@ -591,13 +689,15 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::InvoicingCycleConfiguration) + ) + .returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end @@ -618,16 +718,16 @@ module Orb cadence: Symbol, item_id: String, name: String, - package_config: Orb::Models::PackageConfigModel, + package_config: Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::PackageConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::InvoicingCycleConfiguration), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -660,16 +760,16 @@ module Orb item_id: String, model_type: Symbol, name: String, - package_config: Orb::Models::PackageConfigModel, + package_config: Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::PackageConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::InvoicingCycleConfiguration), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -691,6 +791,106 @@ module Orb def self.values end end + + class PackageConfig < Orb::BaseModel + sig { returns(String) } + def package_amount + end + + sig { params(_: String).returns(String) } + def package_amount=(_) + end + + sig { returns(Integer) } + def package_size + end + + sig { params(_: Integer).returns(Integer) } + def package_size=(_) + end + + sig { params(package_amount: String, package_size: Integer).void } + def initialize(package_amount:, package_size:) + end + + sig { override.returns({package_amount: String, package_size: Integer}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end class NewPlanMatrixPrice < Orb::BaseModel @@ -710,11 +910,14 @@ module Orb def item_id=(_) end - sig { returns(Orb::Models::MatrixConfigModel) } + sig { returns(Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig) } def matrix_config end - sig { params(_: Orb::Models::MatrixConfigModel).returns(Orb::Models::MatrixConfigModel) } + sig do + params(_: Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig) + .returns(Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig) + end def matrix_config=(_) end @@ -750,13 +953,13 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::BillingCycleConfiguration)) } def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::BillingCycleConfiguration)) + .returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::BillingCycleConfiguration)) end def billing_cycle_configuration=(_) end @@ -801,13 +1004,15 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::InvoicingCycleConfiguration) + ) + .returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end @@ -827,17 +1032,17 @@ module Orb params( cadence: Symbol, item_id: String, - matrix_config: Orb::Models::MatrixConfigModel, + matrix_config: Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::InvoicingCycleConfiguration), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -868,18 +1073,18 @@ module Orb { cadence: Symbol, item_id: String, - matrix_config: Orb::Models::MatrixConfigModel, + matrix_config: Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::InvoicingCycleConfiguration), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -901,6 +1106,159 @@ module Orb def self.values end end + + class MatrixConfig < Orb::BaseModel + sig { returns(String) } + def default_unit_amount + end + + sig { params(_: String).returns(String) } + def default_unit_amount=(_) + end + + sig { returns(T::Array[T.nilable(String)]) } + def dimensions + end + + sig { params(_: T::Array[T.nilable(String)]).returns(T::Array[T.nilable(String)]) } + def dimensions=(_) + end + + sig { returns(T::Array[Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig::MatrixValue]) } + def matrix_values + end + + sig do + params(_: T::Array[Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig::MatrixValue]) + .returns(T::Array[Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig::MatrixValue]) + end + def matrix_values=(_) + end + + sig do + params( + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + matrix_values: T::Array[Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig::MatrixValue] + ) + .void + end + def initialize(default_unit_amount:, dimensions:, matrix_values:) + end + + sig do + override + .returns( + { + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + matrix_values: T::Array[Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig::MatrixValue] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::BaseModel + sig { returns(T::Array[T.nilable(String)]) } + def dimension_values + end + + sig { params(_: T::Array[T.nilable(String)]).returns(T::Array[T.nilable(String)]) } + def dimension_values=(_) + end + + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { params(dimension_values: T::Array[T.nilable(String)], unit_amount: String).void } + def initialize(dimension_values:, unit_amount:) + end + + sig { override.returns({dimension_values: T::Array[T.nilable(String)], unit_amount: String}) } + def to_hash + end + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end class NewPlanTieredPrice < Orb::BaseModel @@ -936,11 +1294,14 @@ module Orb def name=(_) end - sig { returns(Orb::Models::TieredConfigModel) } + sig { returns(Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::TieredConfig) } def tiered_config end - sig { params(_: Orb::Models::TieredConfigModel).returns(Orb::Models::TieredConfigModel) } + sig do + params(_: Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::TieredConfig) + .returns(Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::TieredConfig) + end def tiered_config=(_) end @@ -960,13 +1321,13 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::BillingCycleConfiguration)) } def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::BillingCycleConfiguration)) + .returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::BillingCycleConfiguration)) end def billing_cycle_configuration=(_) end @@ -1011,13 +1372,15 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::InvoicingCycleConfiguration) + ) + .returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end @@ -1038,16 +1401,16 @@ module Orb cadence: Symbol, item_id: String, name: String, - tiered_config: Orb::Models::TieredConfigModel, + tiered_config: Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::TieredConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::InvoicingCycleConfiguration), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -1080,16 +1443,16 @@ module Orb item_id: String, model_type: Symbol, name: String, - tiered_config: Orb::Models::TieredConfigModel, + tiered_config: Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::TieredConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::InvoicingCycleConfiguration), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -1111,6 +1474,138 @@ module Orb def self.values end end + + class TieredConfig < Orb::BaseModel + sig { returns(T::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::TieredConfig::Tier]) } + def tiers + end + + sig do + params(_: T::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::TieredConfig::Tier]) + .returns(T::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::TieredConfig::Tier]) + end + def tiers=(_) + end + + sig { params(tiers: T::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::TieredConfig::Tier]).void } + def initialize(tiers:) + end + + sig do + override + .returns({tiers: T::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::TieredConfig::Tier]}) + end + def to_hash + end + + class Tier < Orb::BaseModel + sig { returns(Float) } + def first_unit + end + + sig { params(_: Float).returns(Float) } + def first_unit=(_) + end + + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { returns(T.nilable(Float)) } + def last_unit + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def last_unit=(_) + end + + sig { params(first_unit: Float, unit_amount: String, last_unit: T.nilable(Float)).void } + def initialize(first_unit:, unit_amount:, last_unit: nil) + end + + sig { override.returns({first_unit: Float, unit_amount: String, last_unit: T.nilable(Float)}) } + def to_hash + end + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end class NewPlanTieredBpsPrice < Orb::BaseModel @@ -1146,11 +1641,14 @@ module Orb def name=(_) end - sig { returns(Orb::Models::TieredBpsConfigModel) } + sig { returns(Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::TieredBpsConfig) } def tiered_bps_config end - sig { params(_: Orb::Models::TieredBpsConfigModel).returns(Orb::Models::TieredBpsConfigModel) } + sig do + params(_: Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::TieredBpsConfig) + .returns(Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::TieredBpsConfig) + end def tiered_bps_config=(_) end @@ -1170,13 +1668,15 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::BillingCycleConfiguration)) } def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::BillingCycleConfiguration) + ) + .returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::BillingCycleConfiguration)) end def billing_cycle_configuration=(_) end @@ -1221,13 +1721,21 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::InvoicingCycleConfiguration) + ) + end def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::InvoicingCycleConfiguration) + ) + .returns( + T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::InvoicingCycleConfiguration) + ) end def invoicing_cycle_configuration=(_) end @@ -1248,16 +1756,16 @@ module Orb cadence: Symbol, item_id: String, name: String, - tiered_bps_config: Orb::Models::TieredBpsConfigModel, + tiered_bps_config: Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::TieredBpsConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::InvoicingCycleConfiguration), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -1290,16 +1798,16 @@ module Orb item_id: String, model_type: Symbol, name: String, - tiered_bps_config: Orb::Models::TieredBpsConfigModel, + tiered_bps_config: Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::TieredBpsConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::InvoicingCycleConfiguration), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -1321,31 +1829,199 @@ module Orb def self.values end end - end - class NewPlanBpsPrice < Orb::BaseModel - sig { returns(Orb::Models::BpsConfigModel) } - def bps_config - end + class TieredBpsConfig < Orb::BaseModel + sig { returns(T::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::TieredBpsConfig::Tier]) } + def tiers + end - sig { params(_: Orb::Models::BpsConfigModel).returns(Orb::Models::BpsConfigModel) } - def bps_config=(_) - end + sig do + params(_: T::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::TieredBpsConfig::Tier]) + .returns(T::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::TieredBpsConfig::Tier]) + end + def tiers=(_) + end - sig { returns(Symbol) } - def cadence - end + sig do + params( + tiers: T::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::TieredBpsConfig::Tier] + ) + .void + end + def initialize(tiers:) + end - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end + sig do + override + .returns( + {tiers: T::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::TieredBpsConfig::Tier]} + ) + end + def to_hash + end - sig { returns(String) } - def item_id + class Tier < Orb::BaseModel + sig { returns(Float) } + def bps + end + + sig { params(_: Float).returns(Float) } + def bps=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(T.nilable(String)) } + def maximum_amount + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_maximum + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_maximum=(_) + end + + sig do + params( + bps: Float, + minimum_amount: String, + maximum_amount: T.nilable(String), + per_unit_maximum: T.nilable(String) + ) + .void + end + def initialize(bps:, minimum_amount:, maximum_amount: nil, per_unit_maximum: nil) + end + + sig do + override + .returns( + { + bps: Float, + minimum_amount: String, + maximum_amount: T.nilable(String), + per_unit_maximum: T.nilable(String) + } + ) + end + def to_hash + end + end end - sig { params(_: String).returns(String) } - def item_id=(_) + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewPlanBpsPrice < Orb::BaseModel + sig { returns(Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BpsConfig) } + def bps_config + end + + sig do + params(_: Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BpsConfig) + .returns(Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BpsConfig) + end + def bps_config=(_) + end + + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) end sig { returns(Symbol) } @@ -1380,13 +2056,13 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BillingCycleConfiguration)) } def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BillingCycleConfiguration)) + .returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BillingCycleConfiguration)) end def billing_cycle_configuration=(_) end @@ -1431,13 +2107,13 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end @@ -1455,19 +2131,19 @@ module Orb sig do params( - bps_config: Orb::Models::BpsConfigModel, + bps_config: Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BpsConfig, cadence: Symbol, item_id: String, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::InvoicingCycleConfiguration), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -1496,20 +2172,20 @@ module Orb override .returns( { - bps_config: Orb::Models::BpsConfigModel, + bps_config: Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BpsConfig, cadence: Symbol, item_id: String, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::InvoicingCycleConfiguration), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -1517,6 +2193,32 @@ module Orb def to_hash end + class BpsConfig < Orb::BaseModel + sig { returns(Float) } + def bps + end + + sig { params(_: Float).returns(Float) } + def bps=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_maximum + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_maximum=(_) + end + + sig { params(bps: Float, per_unit_maximum: T.nilable(String)).void } + def initialize(bps:, per_unit_maximum: nil) + end + + sig { override.returns({bps: Float, per_unit_maximum: T.nilable(String)}) } + def to_hash + end + end + class Cadence < Orb::Enum abstract! @@ -1531,14 +2233,91 @@ module Orb def self.values end end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end class NewPlanBulkBpsPrice < Orb::BaseModel - sig { returns(Orb::Models::BulkBpsConfigModel) } + sig { returns(Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig) } def bulk_bps_config end - sig { params(_: Orb::Models::BulkBpsConfigModel).returns(Orb::Models::BulkBpsConfigModel) } + sig do + params(_: Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig) + .returns(Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig) + end def bulk_bps_config=(_) end @@ -1590,13 +2369,13 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BillingCycleConfiguration)) } def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BillingCycleConfiguration)) + .returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BillingCycleConfiguration)) end def billing_cycle_configuration=(_) end @@ -1641,13 +2420,15 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::InvoicingCycleConfiguration) + ) + .returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end @@ -1665,19 +2446,19 @@ module Orb sig do params( - bulk_bps_config: Orb::Models::BulkBpsConfigModel, + bulk_bps_config: Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig, cadence: Symbol, item_id: String, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::InvoicingCycleConfiguration), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -1706,20 +2487,20 @@ module Orb override .returns( { - bulk_bps_config: Orb::Models::BulkBpsConfigModel, + bulk_bps_config: Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig, cadence: Symbol, item_id: String, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::InvoicingCycleConfiguration), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -1727,6 +2508,81 @@ module Orb def to_hash end + class BulkBpsConfig < Orb::BaseModel + sig { returns(T::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig::Tier]) } + def tiers + end + + sig do + params(_: T::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig::Tier]) + .returns(T::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig::Tier]) + end + def tiers=(_) + end + + sig do + params(tiers: T::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig::Tier]) + .void + end + def initialize(tiers:) + end + + sig do + override + .returns({tiers: T::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig::Tier]}) + end + def to_hash + end + + class Tier < Orb::BaseModel + sig { returns(Float) } + def bps + end + + sig { params(_: Float).returns(Float) } + def bps=(_) + end + + sig { returns(T.nilable(String)) } + def maximum_amount + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_maximum + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_maximum=(_) + end + + sig do + params( + bps: Float, + maximum_amount: T.nilable(String), + per_unit_maximum: T.nilable(String) + ).void + end + def initialize(bps:, maximum_amount: nil, per_unit_maximum: nil) + end + + sig do + override.returns( + { + bps: Float, + maximum_amount: T.nilable(String), + per_unit_maximum: T.nilable(String) + } + ) + end + def to_hash + end + end + end + class Cadence < Orb::Enum abstract! @@ -1741,14 +2597,91 @@ module Orb def self.values end end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end class NewPlanBulkPrice < Orb::BaseModel - sig { returns(Orb::Models::BulkConfigModel) } + sig { returns(Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig) } def bulk_config end - sig { params(_: Orb::Models::BulkConfigModel).returns(Orb::Models::BulkConfigModel) } + sig do + params(_: Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig) + .returns(Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig) + end def bulk_config=(_) end @@ -1800,13 +2733,13 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BillingCycleConfiguration)) } def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BillingCycleConfiguration)) + .returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BillingCycleConfiguration)) end def billing_cycle_configuration=(_) end @@ -1851,13 +2784,13 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end @@ -1875,19 +2808,19 @@ module Orb sig do params( - bulk_config: Orb::Models::BulkConfigModel, + bulk_config: Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig, cadence: Symbol, item_id: String, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::InvoicingCycleConfiguration), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -1916,20 +2849,20 @@ module Orb override .returns( { - bulk_config: Orb::Models::BulkConfigModel, + bulk_config: Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig, cadence: Symbol, item_id: String, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::InvoicingCycleConfiguration), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -1937,6 +2870,56 @@ module Orb def to_hash end + class BulkConfig < Orb::BaseModel + sig { returns(T::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig::Tier]) } + def tiers + end + + sig do + params(_: T::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig::Tier]) + .returns(T::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig::Tier]) + end + def tiers=(_) + end + + sig { params(tiers: T::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig::Tier]).void } + def initialize(tiers:) + end + + sig do + override + .returns({tiers: T::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig::Tier]}) + end + def to_hash + end + + class Tier < Orb::BaseModel + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { returns(T.nilable(Float)) } + def maximum_units + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def maximum_units=(_) + end + + sig { params(unit_amount: String, maximum_units: T.nilable(Float)).void } + def initialize(unit_amount:, maximum_units: nil) + end + + sig { override.returns({unit_amount: String, maximum_units: T.nilable(Float)}) } + def to_hash + end + end + end + class Cadence < Orb::Enum abstract! @@ -1951,6 +2934,80 @@ module Orb def self.values end end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end class NewPlanThresholdTotalAmountPrice < Orb::BaseModel @@ -1986,14 +3043,11 @@ module Orb def name=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def threshold_total_amount_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def threshold_total_amount_config=(_) end @@ -2013,13 +3067,27 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::BillingCycleConfiguration + ) + ) + end def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::BillingCycleConfiguration + ) + ) end def billing_cycle_configuration=(_) end @@ -2064,13 +3132,27 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::InvoicingCycleConfiguration + ) + ) + end def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::InvoicingCycleConfiguration + ) + ) end def invoicing_cycle_configuration=(_) end @@ -2091,16 +3173,20 @@ module Orb cadence: Symbol, item_id: String, name: String, - threshold_total_amount_config: Orb::Models::CustomRatingFunctionConfigModel, + threshold_total_amount_config: T::Hash[Symbol, T.anything], billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::BillingCycleConfiguration + ), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -2133,16 +3219,20 @@ module Orb item_id: String, model_type: Symbol, name: String, - threshold_total_amount_config: Orb::Models::CustomRatingFunctionConfigModel, + threshold_total_amount_config: T::Hash[Symbol, T.anything], billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::BillingCycleConfiguration + ), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -2164,6 +3254,80 @@ module Orb def self.values end end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end class NewPlanTieredPackagePrice < Orb::BaseModel @@ -2199,14 +3363,11 @@ module Orb def name=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def tiered_package_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def tiered_package_config=(_) end @@ -2226,13 +3387,21 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::BillingCycleConfiguration) + ) + end def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::BillingCycleConfiguration) + ) + .returns( + T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::BillingCycleConfiguration) + ) end def billing_cycle_configuration=(_) end @@ -2277,13 +3446,21 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::InvoicingCycleConfiguration) + ) + end def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::InvoicingCycleConfiguration) + ) + .returns( + T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::InvoicingCycleConfiguration) + ) end def invoicing_cycle_configuration=(_) end @@ -2304,16 +3481,16 @@ module Orb cadence: Symbol, item_id: String, name: String, - tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, + tiered_package_config: T::Hash[Symbol, T.anything], billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::InvoicingCycleConfiguration), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -2346,16 +3523,16 @@ module Orb item_id: String, model_type: Symbol, name: String, - tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, + tiered_package_config: T::Hash[Symbol, T.anything], billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::InvoicingCycleConfiguration), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -2377,6 +3554,80 @@ module Orb def self.values end end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end class NewPlanTieredWithMinimumPrice < Orb::BaseModel @@ -2412,14 +3663,11 @@ module Orb def name=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def tiered_with_minimum_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def tiered_with_minimum_config=(_) end @@ -2439,13 +3687,21 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::BillingCycleConfiguration) + ) + end def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::BillingCycleConfiguration) + ) + .returns( + T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::BillingCycleConfiguration) + ) end def billing_cycle_configuration=(_) end @@ -2490,13 +3746,27 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::InvoicingCycleConfiguration + ) + ) + end def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::InvoicingCycleConfiguration + ) + ) end def invoicing_cycle_configuration=(_) end @@ -2517,16 +3787,18 @@ module Orb cadence: Symbol, item_id: String, name: String, - tiered_with_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, + tiered_with_minimum_config: T::Hash[Symbol, T.anything], billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -2559,16 +3831,18 @@ module Orb item_id: String, model_type: Symbol, name: String, - tiered_with_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, + tiered_with_minimum_config: T::Hash[Symbol, T.anything], billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -2586,8 +3860,82 @@ module Orb ONE_TIME = :one_time CUSTOM = :custom - sig { override.returns(T::Array[Symbol]) } - def self.values + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end end end end @@ -2625,14 +3973,11 @@ module Orb def name=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def unit_with_percent_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def unit_with_percent_config=(_) end @@ -2652,13 +3997,21 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::BillingCycleConfiguration) + ) + end def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::BillingCycleConfiguration) + ) + .returns( + T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::BillingCycleConfiguration) + ) end def billing_cycle_configuration=(_) end @@ -2703,13 +4056,21 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::InvoicingCycleConfiguration) + ) + end def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::InvoicingCycleConfiguration) + ) + .returns( + T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::InvoicingCycleConfiguration) + ) end def invoicing_cycle_configuration=(_) end @@ -2730,16 +4091,16 @@ module Orb cadence: Symbol, item_id: String, name: String, - unit_with_percent_config: Orb::Models::CustomRatingFunctionConfigModel, + unit_with_percent_config: T::Hash[Symbol, T.anything], billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::InvoicingCycleConfiguration), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -2772,16 +4133,16 @@ module Orb item_id: String, model_type: Symbol, name: String, - unit_with_percent_config: Orb::Models::CustomRatingFunctionConfigModel, + unit_with_percent_config: T::Hash[Symbol, T.anything], billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::InvoicingCycleConfiguration), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -2803,6 +4164,80 @@ module Orb def self.values end end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end class NewPlanPackageWithAllocationPrice < Orb::BaseModel @@ -2838,14 +4273,11 @@ module Orb def name=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def package_with_allocation_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def package_with_allocation_config=(_) end @@ -2865,13 +4297,27 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::BillingCycleConfiguration + ) + ) + end def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::BillingCycleConfiguration + ) + ) end def billing_cycle_configuration=(_) end @@ -2916,13 +4362,27 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::InvoicingCycleConfiguration + ) + ) + end def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::InvoicingCycleConfiguration + ) + ) end def invoicing_cycle_configuration=(_) end @@ -2943,16 +4403,20 @@ module Orb cadence: Symbol, item_id: String, name: String, - package_with_allocation_config: Orb::Models::CustomRatingFunctionConfigModel, + package_with_allocation_config: T::Hash[Symbol, T.anything], billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::BillingCycleConfiguration + ), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -2985,16 +4449,20 @@ module Orb item_id: String, model_type: Symbol, name: String, - package_with_allocation_config: Orb::Models::CustomRatingFunctionConfigModel, + package_with_allocation_config: T::Hash[Symbol, T.anything], billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::BillingCycleConfiguration + ), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -3016,6 +4484,80 @@ module Orb def self.values end end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end class NewPlanTierWithProrationPrice < Orb::BaseModel @@ -3051,14 +4593,11 @@ module Orb def name=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def tiered_with_proration_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def tiered_with_proration_config=(_) end @@ -3078,13 +4617,21 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::BillingCycleConfiguration) + ) + end def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::BillingCycleConfiguration) + ) + .returns( + T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::BillingCycleConfiguration) + ) end def billing_cycle_configuration=(_) end @@ -3129,13 +4676,27 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::InvoicingCycleConfiguration + ) + ) + end def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::InvoicingCycleConfiguration + ) + ) end def invoicing_cycle_configuration=(_) end @@ -3156,16 +4717,18 @@ module Orb cadence: Symbol, item_id: String, name: String, - tiered_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, + tiered_with_proration_config: T::Hash[Symbol, T.anything], billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -3198,16 +4761,18 @@ module Orb item_id: String, model_type: Symbol, name: String, - tiered_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, + tiered_with_proration_config: T::Hash[Symbol, T.anything], billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -3229,6 +4794,80 @@ module Orb def self.values end end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end class NewPlanUnitWithProrationPrice < Orb::BaseModel @@ -3264,14 +4903,11 @@ module Orb def name=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def unit_with_proration_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def unit_with_proration_config=(_) end @@ -3291,13 +4927,21 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::BillingCycleConfiguration) + ) + end def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::BillingCycleConfiguration) + ) + .returns( + T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::BillingCycleConfiguration) + ) end def billing_cycle_configuration=(_) end @@ -3342,13 +4986,27 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::InvoicingCycleConfiguration + ) + ) + end def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::InvoicingCycleConfiguration + ) + ) end def invoicing_cycle_configuration=(_) end @@ -3369,16 +5027,18 @@ module Orb cadence: Symbol, item_id: String, name: String, - unit_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, + unit_with_proration_config: T::Hash[Symbol, T.anything], billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -3411,16 +5071,18 @@ module Orb item_id: String, model_type: Symbol, name: String, - unit_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, + unit_with_proration_config: T::Hash[Symbol, T.anything], billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -3442,6 +5104,80 @@ module Orb def self.values end end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end class NewPlanGroupedAllocationPrice < Orb::BaseModel @@ -3453,14 +5189,11 @@ module Orb def cadence=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def grouped_allocation_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def grouped_allocation_config=(_) end @@ -3504,13 +5237,21 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::BillingCycleConfiguration) + ) + end def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::BillingCycleConfiguration) + ) + .returns( + T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::BillingCycleConfiguration) + ) end def billing_cycle_configuration=(_) end @@ -3555,13 +5296,27 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::InvoicingCycleConfiguration + ) + ) + end def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::InvoicingCycleConfiguration + ) + ) end def invoicing_cycle_configuration=(_) end @@ -3580,18 +5335,20 @@ module Orb sig do params( cadence: Symbol, - grouped_allocation_config: Orb::Models::CustomRatingFunctionConfigModel, + grouped_allocation_config: T::Hash[Symbol, T.anything], item_id: String, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -3621,19 +5378,21 @@ module Orb .returns( { cadence: Symbol, - grouped_allocation_config: Orb::Models::CustomRatingFunctionConfigModel, + grouped_allocation_config: T::Hash[Symbol, T.anything], item_id: String, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -3641,18 +5400,92 @@ module Orb def to_hash end - class Cadence < Orb::Enum - abstract! + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end - sig { override.returns(T::Array[Symbol]) } - def self.values + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end end end end @@ -3666,14 +5499,11 @@ module Orb def cadence=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def grouped_with_prorated_minimum_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def grouped_with_prorated_minimum_config=(_) end @@ -3717,13 +5547,27 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::BillingCycleConfiguration + ) + ) + end def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::BillingCycleConfiguration + ) + ) end def billing_cycle_configuration=(_) end @@ -3768,13 +5612,27 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration + ) + ) + end def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration + ) + ) end def invoicing_cycle_configuration=(_) end @@ -3793,18 +5651,22 @@ module Orb sig do params( cadence: Symbol, - grouped_with_prorated_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, + grouped_with_prorated_minimum_config: T::Hash[Symbol, T.anything], item_id: String, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::BillingCycleConfiguration + ), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -3834,19 +5696,23 @@ module Orb .returns( { cadence: Symbol, - grouped_with_prorated_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, + grouped_with_prorated_minimum_config: T::Hash[Symbol, T.anything], item_id: String, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::BillingCycleConfiguration + ), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -3868,6 +5734,80 @@ module Orb def self.values end end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end class NewPlanGroupedWithMeteredMinimumPrice < Orb::BaseModel @@ -3879,14 +5819,11 @@ module Orb def cadence=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def grouped_with_metered_minimum_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def grouped_with_metered_minimum_config=(_) end @@ -3930,13 +5867,27 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::BillingCycleConfiguration + ) + ) + end def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::BillingCycleConfiguration + ) + ) end def billing_cycle_configuration=(_) end @@ -3981,13 +5932,27 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration + ) + ) + end def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration + ) + ) end def invoicing_cycle_configuration=(_) end @@ -4006,18 +5971,22 @@ module Orb sig do params( cadence: Symbol, - grouped_with_metered_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, + grouped_with_metered_minimum_config: T::Hash[Symbol, T.anything], item_id: String, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::BillingCycleConfiguration + ), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -4047,19 +6016,23 @@ module Orb .returns( { cadence: Symbol, - grouped_with_metered_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, + grouped_with_metered_minimum_config: T::Hash[Symbol, T.anything], item_id: String, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::BillingCycleConfiguration + ), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -4081,6 +6054,80 @@ module Orb def self.values end end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end class NewPlanMatrixWithDisplayNamePrice < Orb::BaseModel @@ -4100,14 +6147,11 @@ module Orb def item_id=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def matrix_with_display_name_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def matrix_with_display_name_config=(_) end @@ -4143,13 +6187,27 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::BillingCycleConfiguration + ) + ) + end def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::BillingCycleConfiguration + ) + ) end def billing_cycle_configuration=(_) end @@ -4194,13 +6252,27 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::InvoicingCycleConfiguration + ) + ) + end def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::InvoicingCycleConfiguration + ) + ) end def invoicing_cycle_configuration=(_) end @@ -4220,17 +6292,21 @@ module Orb params( cadence: Symbol, item_id: String, - matrix_with_display_name_config: Orb::Models::CustomRatingFunctionConfigModel, + matrix_with_display_name_config: T::Hash[Symbol, T.anything], name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::BillingCycleConfiguration + ), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -4261,18 +6337,22 @@ module Orb { cadence: Symbol, item_id: String, - matrix_with_display_name_config: Orb::Models::CustomRatingFunctionConfigModel, + matrix_with_display_name_config: T::Hash[Symbol, T.anything], model_type: Symbol, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::BillingCycleConfiguration + ), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -4294,17 +6374,88 @@ module Orb def self.values end end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end class NewPlanBulkWithProrationPrice < Orb::BaseModel - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def bulk_with_proration_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def bulk_with_proration_config=(_) end @@ -4356,13 +6507,21 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::BillingCycleConfiguration) + ) + end def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::BillingCycleConfiguration) + ) + .returns( + T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::BillingCycleConfiguration) + ) end def billing_cycle_configuration=(_) end @@ -4407,13 +6566,27 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::InvoicingCycleConfiguration + ) + ) + end def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::InvoicingCycleConfiguration + ) + ) end def invoicing_cycle_configuration=(_) end @@ -4431,19 +6604,21 @@ module Orb sig do params( - bulk_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, + bulk_with_proration_config: T::Hash[Symbol, T.anything], cadence: Symbol, item_id: String, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -4472,20 +6647,22 @@ module Orb override .returns( { - bulk_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, + bulk_with_proration_config: T::Hash[Symbol, T.anything], cadence: Symbol, item_id: String, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::BillingCycleConfiguration), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -4507,6 +6684,80 @@ module Orb def self.values end end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end class NewPlanGroupedTieredPackagePrice < Orb::BaseModel @@ -4518,14 +6769,11 @@ module Orb def cadence=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def grouped_tiered_package_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def grouped_tiered_package_config=(_) end @@ -4569,13 +6817,27 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::BillingCycleConfiguration + ) + ) + end def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::BillingCycleConfiguration + ) + ) end def billing_cycle_configuration=(_) end @@ -4619,14 +6881,28 @@ module Orb sig { params(_: T.nilable(String)).returns(T.nilable(String)) } def invoice_grouping_key=(_) end - - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + end def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::InvoicingCycleConfiguration + ) + ) end def invoicing_cycle_configuration=(_) end @@ -4645,18 +6921,22 @@ module Orb sig do params( cadence: Symbol, - grouped_tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, + grouped_tiered_package_config: T::Hash[Symbol, T.anything], item_id: String, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::BillingCycleConfiguration + ), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -4686,19 +6966,23 @@ module Orb .returns( { cadence: Symbol, - grouped_tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, + grouped_tiered_package_config: T::Hash[Symbol, T.anything], item_id: String, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::BillingCycleConfiguration + ), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -4720,6 +7004,80 @@ module Orb def self.values end end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end class NewPlanMaxGroupTieredPackagePrice < Orb::BaseModel @@ -4739,14 +7097,11 @@ module Orb def item_id=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def max_group_tiered_package_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def max_group_tiered_package_config=(_) end @@ -4782,13 +7137,27 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::BillingCycleConfiguration + ) + ) + end def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::BillingCycleConfiguration + ) + ) end def billing_cycle_configuration=(_) end @@ -4833,13 +7202,27 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + end def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::InvoicingCycleConfiguration + ) + ) end def invoicing_cycle_configuration=(_) end @@ -4859,17 +7242,21 @@ module Orb params( cadence: Symbol, item_id: String, - max_group_tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, + max_group_tiered_package_config: T::Hash[Symbol, T.anything], name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::BillingCycleConfiguration + ), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -4900,18 +7287,22 @@ module Orb { cadence: Symbol, item_id: String, - max_group_tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, + max_group_tiered_package_config: T::Hash[Symbol, T.anything], model_type: Symbol, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::BillingCycleConfiguration + ), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -4933,6 +7324,80 @@ module Orb def self.values end end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end class NewPlanScalableMatrixWithUnitPricingPrice < Orb::BaseModel @@ -4968,14 +7433,11 @@ module Orb def name=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def scalable_matrix_with_unit_pricing_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def scalable_matrix_with_unit_pricing_config=(_) end @@ -4995,13 +7457,27 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration + ) + ) + end def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration + ) + ) end def billing_cycle_configuration=(_) end @@ -5046,13 +7522,27 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration + ) + ) + end def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration + ) + ) end def invoicing_cycle_configuration=(_) end @@ -5073,16 +7563,20 @@ module Orb cadence: Symbol, item_id: String, name: String, - scalable_matrix_with_unit_pricing_config: Orb::Models::CustomRatingFunctionConfigModel, + scalable_matrix_with_unit_pricing_config: T::Hash[Symbol, T.anything], billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration + ), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -5115,16 +7609,20 @@ module Orb item_id: String, model_type: Symbol, name: String, - scalable_matrix_with_unit_pricing_config: Orb::Models::CustomRatingFunctionConfigModel, + scalable_matrix_with_unit_pricing_config: T::Hash[Symbol, T.anything], billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration + ), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -5146,6 +7644,80 @@ module Orb def self.values end end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end class NewPlanScalableMatrixWithTieredPricingPrice < Orb::BaseModel @@ -5181,14 +7753,11 @@ module Orb def name=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def scalable_matrix_with_tiered_pricing_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def scalable_matrix_with_tiered_pricing_config=(_) end @@ -5208,13 +7777,27 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration + ) + ) + end def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration + ) + ) end def billing_cycle_configuration=(_) end @@ -5259,13 +7842,27 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration + ) + ) + end def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration + ) + ) end def invoicing_cycle_configuration=(_) end @@ -5286,16 +7883,20 @@ module Orb cadence: Symbol, item_id: String, name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Models::CustomRatingFunctionConfigModel, + scalable_matrix_with_tiered_pricing_config: T::Hash[Symbol, T.anything], billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration + ), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -5328,16 +7929,20 @@ module Orb item_id: String, model_type: Symbol, name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Models::CustomRatingFunctionConfigModel, + scalable_matrix_with_tiered_pricing_config: T::Hash[Symbol, T.anything], billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration + ), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -5359,6 +7964,80 @@ module Orb def self.values end end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end class NewPlanCumulativeGroupedBulkPrice < Orb::BaseModel @@ -5370,14 +8049,11 @@ module Orb def cadence=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def cumulative_grouped_bulk_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def cumulative_grouped_bulk_config=(_) end @@ -5421,13 +8097,27 @@ module Orb def billed_in_advance=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::BillingCycleConfiguration + ) + ) + end def billing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::BillingCycleConfiguration + ) + ) end def billing_cycle_configuration=(_) end @@ -5472,13 +8162,27 @@ module Orb def invoice_grouping_key=(_) end - sig { returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) } + sig do + returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::InvoicingCycleConfiguration + ) + ) + end def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::NewBillingCycleConfigurationModel)) + params( + _: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::InvoicingCycleConfiguration + ) + ) end def invoicing_cycle_configuration=(_) end @@ -5497,18 +8201,22 @@ module Orb sig do params( cadence: Symbol, - cumulative_grouped_bulk_config: Orb::Models::CustomRatingFunctionConfigModel, + cumulative_grouped_bulk_config: T::Hash[Symbol, T.anything], item_id: String, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::BillingCycleConfiguration + ), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), model_type: Symbol ) @@ -5538,19 +8246,23 @@ module Orb .returns( { cadence: Symbol, - cumulative_grouped_bulk_config: Orb::Models::CustomRatingFunctionConfigModel, + cumulative_grouped_bulk_config: T::Hash[Symbol, T.anything], item_id: String, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + billing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::BillingCycleConfiguration + ), conversion_rate: T.nilable(Float), currency: T.nilable(String), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: T.nilable(Orb::Models::NewBillingCycleConfigurationModel), + invoicing_cycle_configuration: T.nilable( + Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::InvoicingCycleConfiguration + ), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) } ) @@ -5572,6 +8284,80 @@ module Orb def self.values end end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end end sig do diff --git a/rbi/lib/orb/models/plan_minified_model.rbi b/rbi/lib/orb/models/plan_minified_model.rbi deleted file mode 100644 index cc2d9846..00000000 --- a/rbi/lib/orb/models/plan_minified_model.rbi +++ /dev/null @@ -1,47 +0,0 @@ -# typed: strong - -module Orb - module Models - class PlanMinifiedModel < Orb::BaseModel - sig { returns(T.nilable(String)) } - def id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def id=(_) - end - - sig { returns(T.nilable(String)) } - def external_plan_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_plan_id=(_) - end - - sig { returns(T.nilable(String)) } - def name - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def name=(_) - end - - sig { params(id: T.nilable(String), external_plan_id: T.nilable(String), name: T.nilable(String)).void } - def initialize(id:, external_plan_id:, name:) - end - - sig do - override.returns( - { - id: T.nilable(String), - external_plan_id: T.nilable(String), - name: T.nilable(String) - } - ) - end - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/plan_model.rbi b/rbi/lib/orb/models/plan_model.rbi deleted file mode 100644 index 914ef93b..00000000 --- a/rbi/lib/orb/models/plan_model.rbi +++ /dev/null @@ -1,840 +0,0 @@ -# typed: strong - -module Orb - module Models - class PlanModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig do - returns( - T::Array[ - T.any( - Orb::Models::AdjustmentModel::PlanPhaseUsageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseAmountDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhasePercentageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMinimumAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMaximumAdjustment - ) - ] - ) - end - def adjustments - end - - sig do - params( - _: T::Array[ - T.any( - Orb::Models::AdjustmentModel::PlanPhaseUsageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseAmountDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhasePercentageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMinimumAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMaximumAdjustment - ) - ] - ) - .returns( - T::Array[ - T.any( - Orb::Models::AdjustmentModel::PlanPhaseUsageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseAmountDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhasePercentageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMinimumAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMaximumAdjustment - ) - ] - ) - end - def adjustments=(_) - end - - sig { returns(T.nilable(Orb::Models::PlanMinifiedModel)) } - def base_plan - end - - sig { params(_: T.nilable(Orb::Models::PlanMinifiedModel)).returns(T.nilable(Orb::Models::PlanMinifiedModel)) } - def base_plan=(_) - end - - sig { returns(T.nilable(String)) } - def base_plan_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def base_plan_id=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(T.nilable(String)) } - def default_invoice_memo - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def default_invoice_memo=(_) - end - - sig { returns(String) } - def description - end - - sig { params(_: String).returns(String) } - def description=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_plan_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_plan_id=(_) - end - - sig { returns(String) } - def invoicing_currency - end - - sig { params(_: String).returns(String) } - def invoicing_currency=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def net_terms - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def net_terms=(_) - end - - sig { returns(T.nilable(T::Array[Orb::Models::PlanModel::PlanPhase])) } - def plan_phases - end - - sig do - params(_: T.nilable(T::Array[Orb::Models::PlanModel::PlanPhase])) - .returns(T.nilable(T::Array[Orb::Models::PlanModel::PlanPhase])) - end - def plan_phases=(_) - end - - sig do - returns( - T::Array[ - T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice - ) - ] - ) - end - def prices - end - - sig do - params( - _: T::Array[ - T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice - ) - ] - ) - .returns( - T::Array[ - T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice - ) - ] - ) - end - def prices=(_) - end - - sig { returns(Orb::Models::PlanModel::Product) } - def product - end - - sig { params(_: Orb::Models::PlanModel::Product).returns(Orb::Models::PlanModel::Product) } - def product=(_) - end - - sig { returns(Symbol) } - def status - end - - sig { params(_: Symbol).returns(Symbol) } - def status=(_) - end - - sig { returns(Orb::Models::PlanModel::TrialConfig) } - def trial_config - end - - sig { params(_: Orb::Models::PlanModel::TrialConfig).returns(Orb::Models::PlanModel::TrialConfig) } - def trial_config=(_) - end - - sig { returns(Integer) } - def version - end - - sig { params(_: Integer).returns(Integer) } - def version=(_) - end - - sig do - params( - id: String, - adjustments: T::Array[ - T.any( - Orb::Models::AdjustmentModel::PlanPhaseUsageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseAmountDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhasePercentageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMinimumAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMaximumAdjustment - ) - ], - base_plan: T.nilable(Orb::Models::PlanMinifiedModel), - base_plan_id: T.nilable(String), - created_at: Time, - currency: String, - default_invoice_memo: T.nilable(String), - description: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_plan_id: T.nilable(String), - invoicing_currency: String, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - net_terms: T.nilable(Integer), - plan_phases: T.nilable(T::Array[Orb::Models::PlanModel::PlanPhase]), - prices: T::Array[ - T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice - ) - ], - product: Orb::Models::PlanModel::Product, - status: Symbol, - trial_config: Orb::Models::PlanModel::TrialConfig, - version: Integer - ) - .void - end - def initialize( - id:, - adjustments:, - base_plan:, - base_plan_id:, - created_at:, - currency:, - default_invoice_memo:, - description:, - discount:, - external_plan_id:, - invoicing_currency:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - net_terms:, - plan_phases:, - prices:, - product:, - status:, - trial_config:, - version: - ) - end - - sig do - override - .returns( - { - id: String, - adjustments: T::Array[ - T.any( - Orb::Models::AdjustmentModel::PlanPhaseUsageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseAmountDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhasePercentageDiscountAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMinimumAdjustment, - Orb::Models::AdjustmentModel::PlanPhaseMaximumAdjustment - ) - ], - base_plan: T.nilable(Orb::Models::PlanMinifiedModel), - base_plan_id: T.nilable(String), - created_at: Time, - currency: String, - default_invoice_memo: T.nilable(String), - description: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_plan_id: T.nilable(String), - invoicing_currency: String, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - net_terms: T.nilable(Integer), - plan_phases: T.nilable(T::Array[Orb::Models::PlanModel::PlanPhase]), - prices: T::Array[ - T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice - ) - ], - product: Orb::Models::PlanModel::Product, - status: Symbol, - trial_config: Orb::Models::PlanModel::TrialConfig, - version: Integer - } - ) - end - def to_hash - end - - class PlanPhase < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(String)) } - def description - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def description=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(Integer)) } - def duration - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def duration=(_) - end - - sig { returns(T.nilable(Symbol)) } - def duration_unit - end - - sig { params(_: T.nilable(Symbol)).returns(T.nilable(Symbol)) } - def duration_unit=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Integer) } - def order - end - - sig { params(_: Integer).returns(Integer) } - def order=(_) - end - - sig do - params( - id: String, - description: T.nilable(String), - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - duration: T.nilable(Integer), - duration_unit: T.nilable(Symbol), - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - order: Integer - ) - .void - end - def initialize( - id:, - description:, - discount:, - duration:, - duration_unit:, - maximum:, - maximum_amount:, - minimum:, - minimum_amount:, - name:, - order: - ) - end - - sig do - override - .returns( - { - id: String, - description: T.nilable(String), - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - duration: T.nilable(Integer), - duration_unit: T.nilable(Symbol), - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - order: Integer - } - ) - end - def to_hash - end - - class DurationUnit < Orb::Enum - abstract! - - DAILY = T.let(:daily, T.nilable(Symbol)) - MONTHLY = T.let(:monthly, T.nilable(Symbol)) - QUARTERLY = T.let(:quarterly, T.nilable(Symbol)) - SEMI_ANNUAL = T.let(:semi_annual, T.nilable(Symbol)) - ANNUAL = T.let(:annual, T.nilable(Symbol)) - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class Product < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { params(id: String, created_at: Time, name: String).void } - def initialize(id:, created_at:, name:) - end - - sig { override.returns({id: String, created_at: Time, name: String}) } - def to_hash - end - end - - class Status < Orb::Enum - abstract! - - ACTIVE = :active - ARCHIVED = :archived - DRAFT = :draft - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class TrialConfig < Orb::BaseModel - sig { returns(T.nilable(Integer)) } - def trial_period - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def trial_period=(_) - end - - sig { returns(Symbol) } - def trial_period_unit - end - - sig { params(_: Symbol).returns(Symbol) } - def trial_period_unit=(_) - end - - sig { params(trial_period: T.nilable(Integer), trial_period_unit: Symbol).void } - def initialize(trial_period:, trial_period_unit:) - end - - sig { override.returns({trial_period: T.nilable(Integer), trial_period_unit: Symbol}) } - def to_hash - end - - class TrialPeriodUnit < Orb::Enum - abstract! - - DAYS = :days - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end - end -end diff --git a/rbi/lib/orb/models/plan_update_params.rbi b/rbi/lib/orb/models/plan_update_params.rbi index 3ba39a22..6c917c46 100644 --- a/rbi/lib/orb/models/plan_update_params.rbi +++ b/rbi/lib/orb/models/plan_update_params.rbi @@ -2,15 +2,50 @@ module Orb module Models - class PlanUpdateParams < Orb::Models::EditPlanModel + class PlanUpdateParams < Orb::BaseModel extend Orb::RequestParameters::Converter include Orb::RequestParameters - sig { params(request_options: T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])).void } - def initialize(request_options: {}) + sig { returns(T.nilable(String)) } + def external_plan_id end - sig { override.returns({request_options: Orb::RequestOptions}) } + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_plan_id=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + external_plan_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + request_options: T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything]) + ) + .void + end + def initialize(external_plan_id: nil, metadata: nil, request_options: {}) + end + + sig do + override + .returns( + { + external_plan_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + request_options: Orb::RequestOptions + } + ) + end def to_hash end end diff --git a/rbi/lib/orb/models/plans/external_plan_id_update_params.rbi b/rbi/lib/orb/models/plans/external_plan_id_update_params.rbi index e88f3a4c..135da52e 100644 --- a/rbi/lib/orb/models/plans/external_plan_id_update_params.rbi +++ b/rbi/lib/orb/models/plans/external_plan_id_update_params.rbi @@ -3,15 +3,50 @@ module Orb module Models module Plans - class ExternalPlanIDUpdateParams < Orb::Models::EditPlanModel + class ExternalPlanIDUpdateParams < Orb::BaseModel extend Orb::RequestParameters::Converter include Orb::RequestParameters - sig { params(request_options: T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])).void } - def initialize(request_options: {}) + sig { returns(T.nilable(String)) } + def external_plan_id end - sig { override.returns({request_options: Orb::RequestOptions}) } + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_plan_id=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + external_plan_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + request_options: T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything]) + ) + .void + end + def initialize(external_plan_id: nil, metadata: nil, request_options: {}) + end + + sig do + override + .returns( + { + external_plan_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + request_options: Orb::RequestOptions + } + ) + end def to_hash end end diff --git a/rbi/lib/orb/models/price.rbi b/rbi/lib/orb/models/price.rbi index 42c09ca8..10186518 100644 --- a/rbi/lib/orb/models/price.rbi +++ b/rbi/lib/orb/models/price.rbi @@ -14,23 +14,24 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::UnitPrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::UnitPrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::UnitPrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::UnitPrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::UnitPrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::UnitPrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end @@ -59,11 +60,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::UnitPrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::UnitPrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::UnitPrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -131,30 +135,33 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::UnitPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::UnitPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::UnitPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::UnitPrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig { params(_: Orb::Models::Price::UnitPrice::Item).returns(Orb::Models::Price::UnitPrice::Item) } def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::UnitPrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::UnitPrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::UnitPrice::Maximum)) + end def maximum=(_) end @@ -174,11 +181,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::UnitPrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::UnitPrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::UnitPrice::Minimum)) + end def minimum=(_) end @@ -222,21 +232,21 @@ module Orb def price_type=(_) end - sig { returns(Orb::Models::UnitConfigModel) } + sig { returns(Orb::Models::Price::UnitPrice::UnitConfig) } def unit_config end - sig { params(_: Orb::Models::UnitConfigModel).returns(Orb::Models::UnitConfigModel) } + sig { params(_: Orb::Models::Price::UnitPrice::UnitConfig).returns(Orb::Models::Price::UnitPrice::UnitConfig) } def unit_config=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::UnitPrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::UnitPrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::UnitPrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -244,12 +254,12 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::UnitPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::UnitPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::UnitPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -261,18 +271,18 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::UnitPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::UnitPrice::Item, + maximum: T.nilable(Orb::Models::Price::UnitPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::UnitPrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - unit_config: Orb::Models::UnitConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + unit_config: Orb::Models::Price::UnitPrice::UnitConfig, + dimensional_price_configuration: T.nilable(Orb::Models::Price::UnitPrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -310,12 +320,12 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::UnitPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::UnitPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::UnitPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -327,25 +337,80 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::UnitPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::UnitPrice::Item, + maximum: T.nilable(Orb::Models::Price::UnitPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::UnitPrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - unit_config: Orb::Models::UnitConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + unit_config: Orb::Models::Price::UnitPrice::UnitConfig, + dimensional_price_configuration: T.nilable(Orb::Models::Price::UnitPrice::DimensionalPriceConfiguration) } ) end def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Cadence < Orb::Enum abstract! @@ -361,6 +426,147 @@ module Orb end end + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + class PriceType < Orb::Enum abstract! @@ -371,6 +577,50 @@ module Orb def self.values end end + + class UnitConfig < Orb::BaseModel + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { params(unit_amount: String).void } + def initialize(unit_amount:) + end + + sig { override.returns({unit_amount: String}) } + def to_hash + end + end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end class PackagePrice < Orb::BaseModel @@ -382,23 +632,24 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::PackagePrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::PackagePrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::PackagePrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::PackagePrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::PackagePrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::PackagePrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end @@ -427,11 +678,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::PackagePrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::PackagePrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::PackagePrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -499,30 +753,33 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::PackagePrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::PackagePrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::PackagePrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::PackagePrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig { params(_: Orb::Models::Price::PackagePrice::Item).returns(Orb::Models::Price::PackagePrice::Item) } def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::PackagePrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::PackagePrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::PackagePrice::Maximum)) + end def maximum=(_) end @@ -542,11 +799,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::PackagePrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::PackagePrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::PackagePrice::Minimum)) + end def minimum=(_) end @@ -574,11 +834,14 @@ module Orb def name=(_) end - sig { returns(Orb::Models::PackageConfigModel) } + sig { returns(Orb::Models::Price::PackagePrice::PackageConfig) } def package_config end - sig { params(_: Orb::Models::PackageConfigModel).returns(Orb::Models::PackageConfigModel) } + sig do + params(_: Orb::Models::Price::PackagePrice::PackageConfig) + .returns(Orb::Models::Price::PackagePrice::PackageConfig) + end def package_config=(_) end @@ -598,13 +861,13 @@ module Orb def price_type=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::PackagePrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::PackagePrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::PackagePrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -612,12 +875,12 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::PackagePrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::PackagePrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::PackagePrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -629,18 +892,18 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::PackagePrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::PackagePrice::Item, + maximum: T.nilable(Orb::Models::Price::PackagePrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::PackagePrice::Minimum), minimum_amount: T.nilable(String), name: String, - package_config: Orb::Models::PackageConfigModel, + package_config: Orb::Models::Price::PackagePrice::PackageConfig, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + dimensional_price_configuration: T.nilable(Orb::Models::Price::PackagePrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -678,12 +941,12 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::PackagePrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::PackagePrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::PackagePrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -695,25 +958,80 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::PackagePrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::PackagePrice::Item, + maximum: T.nilable(Orb::Models::Price::PackagePrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::PackagePrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, - package_config: Orb::Models::PackageConfigModel, + package_config: Orb::Models::Price::PackagePrice::PackageConfig, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + dimensional_price_configuration: T.nilable(Orb::Models::Price::PackagePrice::DimensionalPriceConfiguration) } ) end def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Cadence < Orb::Enum abstract! @@ -729,6 +1047,173 @@ module Orb end end + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + + class PackageConfig < Orb::BaseModel + sig { returns(String) } + def package_amount + end + + sig { params(_: String).returns(String) } + def package_amount=(_) + end + + sig { returns(Integer) } + def package_size + end + + sig { params(_: Integer).returns(Integer) } + def package_size=(_) + end + + sig { params(package_amount: String, package_size: Integer).void } + def initialize(package_amount:, package_size:) + end + + sig { override.returns({package_amount: String, package_size: Integer}) } + def to_hash + end + end + class PriceType < Orb::Enum abstract! @@ -739,6 +1224,32 @@ module Orb def self.values end end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end class MatrixPrice < Orb::BaseModel @@ -750,23 +1261,24 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::MatrixPrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::MatrixPrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::MatrixPrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::MatrixPrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::MatrixPrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::MatrixPrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end @@ -795,11 +1307,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::MatrixPrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::MatrixPrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::MatrixPrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -867,38 +1382,44 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::MatrixPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::MatrixPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::MatrixPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::MatrixPrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig { params(_: Orb::Models::Price::MatrixPrice::Item).returns(Orb::Models::Price::MatrixPrice::Item) } def item=(_) end - sig { returns(Orb::Models::MatrixConfigModel) } + sig { returns(Orb::Models::Price::MatrixPrice::MatrixConfig) } def matrix_config end - sig { params(_: Orb::Models::MatrixConfigModel).returns(Orb::Models::MatrixConfigModel) } + sig do + params(_: Orb::Models::Price::MatrixPrice::MatrixConfig) + .returns(Orb::Models::Price::MatrixPrice::MatrixConfig) + end def matrix_config=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::MatrixPrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::MatrixPrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::MatrixPrice::Maximum)) + end def maximum=(_) end @@ -918,11 +1439,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::MatrixPrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::MatrixPrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::MatrixPrice::Minimum)) + end def minimum=(_) end @@ -966,13 +1490,13 @@ module Orb def price_type=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::MatrixPrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::MatrixPrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::MatrixPrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -980,12 +1504,12 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::MatrixPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::MatrixPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::MatrixPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -997,18 +1521,18 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - matrix_config: Orb::Models::MatrixConfigModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::MatrixPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::MatrixPrice::Item, + matrix_config: Orb::Models::Price::MatrixPrice::MatrixConfig, + maximum: T.nilable(Orb::Models::Price::MatrixPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::MatrixPrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + dimensional_price_configuration: T.nilable(Orb::Models::Price::MatrixPrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -1046,12 +1570,12 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::MatrixPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::MatrixPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::MatrixPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -1063,25 +1587,80 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - matrix_config: Orb::Models::MatrixConfigModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::MatrixPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::MatrixPrice::Item, + matrix_config: Orb::Models::Price::MatrixPrice::MatrixConfig, + maximum: T.nilable(Orb::Models::Price::MatrixPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::MatrixPrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + dimensional_price_configuration: T.nilable(Orb::Models::Price::MatrixPrice::DimensionalPriceConfiguration) } ) end def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Cadence < Orb::Enum abstract! @@ -1097,6 +1676,226 @@ module Orb end end + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class MatrixConfig < Orb::BaseModel + sig { returns(String) } + def default_unit_amount + end + + sig { params(_: String).returns(String) } + def default_unit_amount=(_) + end + + sig { returns(T::Array[T.nilable(String)]) } + def dimensions + end + + sig { params(_: T::Array[T.nilable(String)]).returns(T::Array[T.nilable(String)]) } + def dimensions=(_) + end + + sig { returns(T::Array[Orb::Models::Price::MatrixPrice::MatrixConfig::MatrixValue]) } + def matrix_values + end + + sig do + params(_: T::Array[Orb::Models::Price::MatrixPrice::MatrixConfig::MatrixValue]) + .returns(T::Array[Orb::Models::Price::MatrixPrice::MatrixConfig::MatrixValue]) + end + def matrix_values=(_) + end + + sig do + params( + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + matrix_values: T::Array[Orb::Models::Price::MatrixPrice::MatrixConfig::MatrixValue] + ) + .void + end + def initialize(default_unit_amount:, dimensions:, matrix_values:) + end + + sig do + override + .returns( + { + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + matrix_values: T::Array[Orb::Models::Price::MatrixPrice::MatrixConfig::MatrixValue] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::BaseModel + sig { returns(T::Array[T.nilable(String)]) } + def dimension_values + end + + sig { params(_: T::Array[T.nilable(String)]).returns(T::Array[T.nilable(String)]) } + def dimension_values=(_) + end + + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { params(dimension_values: T::Array[T.nilable(String)], unit_amount: String).void } + def initialize(dimension_values:, unit_amount:) + end + + sig { override.returns({dimension_values: T::Array[T.nilable(String)], unit_amount: String}) } + def to_hash + end + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + class PriceType < Orb::Enum abstract! @@ -1107,6 +1906,32 @@ module Orb def self.values end end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end class TieredPrice < Orb::BaseModel @@ -1118,23 +1943,24 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredPrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::TieredPrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::TieredPrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::TieredPrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::TieredPrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::TieredPrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end @@ -1163,11 +1989,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredPrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::TieredPrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::TieredPrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -1235,30 +2064,33 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::TieredPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::TieredPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::TieredPrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig { params(_: Orb::Models::Price::TieredPrice::Item).returns(Orb::Models::Price::TieredPrice::Item) } def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredPrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::TieredPrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::TieredPrice::Maximum)) + end def maximum=(_) end @@ -1278,11 +2110,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredPrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::TieredPrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::TieredPrice::Minimum)) + end def minimum=(_) end @@ -1326,21 +2161,24 @@ module Orb def price_type=(_) end - sig { returns(Orb::Models::TieredConfigModel) } + sig { returns(Orb::Models::Price::TieredPrice::TieredConfig) } def tiered_config end - sig { params(_: Orb::Models::TieredConfigModel).returns(Orb::Models::TieredConfigModel) } + sig do + params(_: Orb::Models::Price::TieredPrice::TieredConfig) + .returns(Orb::Models::Price::TieredPrice::TieredConfig) + end def tiered_config=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredPrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::TieredPrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::TieredPrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -1348,12 +2186,12 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::TieredPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::TieredPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::TieredPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -1365,18 +2203,18 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::TieredPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::TieredPrice::Item, + maximum: T.nilable(Orb::Models::Price::TieredPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::TieredPrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - tiered_config: Orb::Models::TieredConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + tiered_config: Orb::Models::Price::TieredPrice::TieredConfig, + dimensional_price_configuration: T.nilable(Orb::Models::Price::TieredPrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -1414,12 +2252,12 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::TieredPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::TieredPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::TieredPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -1431,25 +2269,80 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::TieredPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::TieredPrice::Item, + maximum: T.nilable(Orb::Models::Price::TieredPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::TieredPrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - tiered_config: Orb::Models::TieredConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + tiered_config: Orb::Models::Price::TieredPrice::TieredConfig, + dimensional_price_configuration: T.nilable(Orb::Models::Price::TieredPrice::DimensionalPriceConfiguration) } ) end def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Cadence < Orb::Enum abstract! @@ -1465,97 +2358,323 @@ module Orb end end - class PriceType < Orb::Enum - abstract! + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end - sig { override.returns(T::Array[Symbol]) } - def self.values + sig { returns(String) } + def currency end - end - end - class TieredBpsPrice < Orb::BaseModel - sig { returns(String) } - def id - end + sig { params(_: String).returns(String) } + def currency=(_) + end - sig { params(_: String).returns(String) } - def id=(_) - end + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end end - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end + sig { returns(Symbol) } + def duration_unit + end - sig { returns(Symbol) } - def cadence - end + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end - sig { returns(T.nilable(Float)) } - def conversion_rate - end + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end + class DurationUnit < Orb::Enum + abstract! - sig { returns(Time) } - def created_at - end + DAY = :day + MONTH = :month - sig { params(_: Time).returns(Time) } - def created_at=(_) + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end + class Item < Orb::BaseModel + sig { returns(String) } + def id + end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end + sig { params(_: String).returns(String) } + def id=(_) + end - sig { returns(String) } - def currency - end + sig { returns(String) } + def name + end - sig { params(_: String).returns(String) } - def currency=(_) + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end end - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + + class PriceType < Orb::Enum + abstract! + + USAGE_PRICE = :usage_price + FIXED_PRICE = :fixed_price + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class TieredConfig < Orb::BaseModel + sig { returns(T::Array[Orb::Models::Price::TieredPrice::TieredConfig::Tier]) } + def tiers + end + + sig do + params(_: T::Array[Orb::Models::Price::TieredPrice::TieredConfig::Tier]) + .returns(T::Array[Orb::Models::Price::TieredPrice::TieredConfig::Tier]) + end + def tiers=(_) + end + + sig { params(tiers: T::Array[Orb::Models::Price::TieredPrice::TieredConfig::Tier]).void } + def initialize(tiers:) + end + + sig { override.returns({tiers: T::Array[Orb::Models::Price::TieredPrice::TieredConfig::Tier]}) } + def to_hash + end + + class Tier < Orb::BaseModel + sig { returns(Float) } + def first_unit + end + + sig { params(_: Float).returns(Float) } + def first_unit=(_) + end + + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { returns(T.nilable(Float)) } + def last_unit + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def last_unit=(_) + end + + sig { params(first_unit: Float, unit_amount: String, last_unit: T.nilable(Float)).void } + def initialize(first_unit:, unit_amount:, last_unit: nil) + end + + sig { override.returns({first_unit: Float, unit_amount: String, last_unit: T.nilable(Float)}) } + def to_hash + end + end + end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end + end + + class TieredBpsPrice < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Orb::Models::Price::TieredBpsPrice::BillableMetric)) } + def billable_metric + end + + sig do + params(_: T.nilable(Orb::Models::Price::TieredBpsPrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::TieredBpsPrice::BillableMetric)) + end + def billable_metric=(_) + end + + sig { returns(Orb::Models::Price::TieredBpsPrice::BillingCycleConfiguration) } + def billing_cycle_configuration + end + + sig do + params(_: Orb::Models::Price::TieredBpsPrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::TieredBpsPrice::BillingCycleConfiguration) + end + def billing_cycle_configuration=(_) + end + + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(T.nilable(Orb::Models::Price::TieredBpsPrice::CreditAllocation)) } + def credit_allocation + end + + sig do + params(_: T.nilable(Orb::Models::Price::TieredBpsPrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::TieredBpsPrice::CreditAllocation)) + end + def credit_allocation=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig do + returns( + T.nilable( + T.any( + Orb::Models::PercentageDiscount, + Orb::Models::TrialDiscount, + Orb::Models::Discount::UsageDiscount, + Orb::Models::AmountDiscount + ) ) ) end @@ -1603,30 +2722,33 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredBpsPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::TieredBpsPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::TieredBpsPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::TieredBpsPrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig { params(_: Orb::Models::Price::TieredBpsPrice::Item).returns(Orb::Models::Price::TieredBpsPrice::Item) } def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredBpsPrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::TieredBpsPrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::TieredBpsPrice::Maximum)) + end def maximum=(_) end @@ -1646,11 +2768,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredBpsPrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::TieredBpsPrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::TieredBpsPrice::Minimum)) + end def minimum=(_) end @@ -1694,21 +2819,24 @@ module Orb def price_type=(_) end - sig { returns(Orb::Models::TieredBpsConfigModel) } + sig { returns(Orb::Models::Price::TieredBpsPrice::TieredBpsConfig) } def tiered_bps_config end - sig { params(_: Orb::Models::TieredBpsConfigModel).returns(Orb::Models::TieredBpsConfigModel) } + sig do + params(_: Orb::Models::Price::TieredBpsPrice::TieredBpsConfig) + .returns(Orb::Models::Price::TieredBpsPrice::TieredBpsConfig) + end def tiered_bps_config=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredBpsPrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::TieredBpsPrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::TieredBpsPrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -1716,12 +2844,12 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::TieredBpsPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::TieredBpsPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::TieredBpsPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -1733,18 +2861,18 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::TieredBpsPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::TieredBpsPrice::Item, + maximum: T.nilable(Orb::Models::Price::TieredBpsPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::TieredBpsPrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - tiered_bps_config: Orb::Models::TieredBpsConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + tiered_bps_config: Orb::Models::Price::TieredBpsPrice::TieredBpsConfig, + dimensional_price_configuration: T.nilable(Orb::Models::Price::TieredBpsPrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -1782,12 +2910,12 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::TieredBpsPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::TieredBpsPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::TieredBpsPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -1799,25 +2927,80 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::TieredBpsPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::TieredBpsPrice::Item, + maximum: T.nilable(Orb::Models::Price::TieredBpsPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::TieredBpsPrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - tiered_bps_config: Orb::Models::TieredBpsConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + tiered_bps_config: Orb::Models::Price::TieredBpsPrice::TieredBpsConfig, + dimensional_price_configuration: T.nilable(Orb::Models::Price::TieredBpsPrice::DimensionalPriceConfiguration) } ) end def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Cadence < Orb::Enum abstract! @@ -1833,6 +3016,147 @@ module Orb end end + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + class PriceType < Orb::Enum abstract! @@ -1843,6 +3167,113 @@ module Orb def self.values end end + + class TieredBpsConfig < Orb::BaseModel + sig { returns(T::Array[Orb::Models::Price::TieredBpsPrice::TieredBpsConfig::Tier]) } + def tiers + end + + sig do + params(_: T::Array[Orb::Models::Price::TieredBpsPrice::TieredBpsConfig::Tier]) + .returns(T::Array[Orb::Models::Price::TieredBpsPrice::TieredBpsConfig::Tier]) + end + def tiers=(_) + end + + sig { params(tiers: T::Array[Orb::Models::Price::TieredBpsPrice::TieredBpsConfig::Tier]).void } + def initialize(tiers:) + end + + sig { override.returns({tiers: T::Array[Orb::Models::Price::TieredBpsPrice::TieredBpsConfig::Tier]}) } + def to_hash + end + + class Tier < Orb::BaseModel + sig { returns(Float) } + def bps + end + + sig { params(_: Float).returns(Float) } + def bps=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(T.nilable(String)) } + def maximum_amount + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_maximum + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_maximum=(_) + end + + sig do + params( + bps: Float, + minimum_amount: String, + maximum_amount: T.nilable(String), + per_unit_maximum: T.nilable(String) + ) + .void + end + def initialize(bps:, minimum_amount:, maximum_amount: nil, per_unit_maximum: nil) + end + + sig do + override + .returns( + { + bps: Float, + minimum_amount: String, + maximum_amount: T.nilable(String), + per_unit_maximum: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end class BpsPrice < Orb::BaseModel @@ -1854,32 +3285,33 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::BpsPrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::BpsPrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::BpsPrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::BpsPrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::BpsPrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::BpsPrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end - sig { returns(Orb::Models::BpsConfigModel) } + sig { returns(Orb::Models::Price::BpsPrice::BpsConfig) } def bps_config end - sig { params(_: Orb::Models::BpsConfigModel).returns(Orb::Models::BpsConfigModel) } + sig { params(_: Orb::Models::Price::BpsPrice::BpsConfig).returns(Orb::Models::Price::BpsPrice::BpsConfig) } def bps_config=(_) end @@ -1907,11 +3339,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::BpsPrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::BpsPrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::BpsPrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -1979,30 +3414,33 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::BpsPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::BpsPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::BpsPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::BpsPrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig { params(_: Orb::Models::Price::BpsPrice::Item).returns(Orb::Models::Price::BpsPrice::Item) } def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::BpsPrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::BpsPrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::BpsPrice::Maximum)) + end def maximum=(_) end @@ -2022,11 +3460,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::BpsPrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::BpsPrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::BpsPrice::Minimum)) + end def minimum=(_) end @@ -2070,13 +3511,13 @@ module Orb def price_type=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::BpsPrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::BpsPrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::BpsPrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -2084,13 +3525,13 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bps_config: Orb::Models::BpsConfigModel, + billable_metric: T.nilable(Orb::Models::Price::BpsPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::BpsPrice::BillingCycleConfiguration, + bps_config: Orb::Models::Price::BpsPrice::BpsConfig, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::BpsPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -2102,17 +3543,17 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::BpsPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::BpsPrice::Item, + maximum: T.nilable(Orb::Models::Price::BpsPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::BpsPrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + dimensional_price_configuration: T.nilable(Orb::Models::Price::BpsPrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -2150,13 +3591,13 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bps_config: Orb::Models::BpsConfigModel, + billable_metric: T.nilable(Orb::Models::Price::BpsPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::BpsPrice::BillingCycleConfiguration, + bps_config: Orb::Models::Price::BpsPrice::BpsConfig, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::BpsPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -2168,24 +3609,105 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::BpsPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::BpsPrice::Item, + maximum: T.nilable(Orb::Models::Price::BpsPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::BpsPrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + dimensional_price_configuration: T.nilable(Orb::Models::Price::BpsPrice::DimensionalPriceConfiguration) } ) end def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class BpsConfig < Orb::BaseModel + sig { returns(Float) } + def bps + end + + sig { params(_: Float).returns(Float) } + def bps=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_maximum + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_maximum=(_) + end + + sig { params(bps: Float, per_unit_maximum: T.nilable(String)).void } + def initialize(bps:, per_unit_maximum: nil) + end + + sig { override.returns({bps: Float, per_unit_maximum: T.nilable(String)}) } + def to_hash + end + end + class Cadence < Orb::Enum abstract! @@ -2199,16 +3721,183 @@ module Orb sig { override.returns(T::Array[Symbol]) } def self.values end - end + end + + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + + class PriceType < Orb::Enum + abstract! + + USAGE_PRICE = :usage_price + FIXED_PRICE = :fixed_price + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end - class PriceType < Orb::Enum - abstract! + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end - sig { override.returns(T::Array[Symbol]) } - def self.values + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash end end end @@ -2222,32 +3911,36 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::BulkBpsPrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::BulkBpsPrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::BulkBpsPrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::BulkBpsPrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::BulkBpsPrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::BulkBpsPrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end - sig { returns(Orb::Models::BulkBpsConfigModel) } + sig { returns(Orb::Models::Price::BulkBpsPrice::BulkBpsConfig) } def bulk_bps_config end - sig { params(_: Orb::Models::BulkBpsConfigModel).returns(Orb::Models::BulkBpsConfigModel) } + sig do + params(_: Orb::Models::Price::BulkBpsPrice::BulkBpsConfig) + .returns(Orb::Models::Price::BulkBpsPrice::BulkBpsConfig) + end def bulk_bps_config=(_) end @@ -2275,11 +3968,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::BulkBpsPrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::BulkBpsPrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::BulkBpsPrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -2347,30 +4043,33 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::BulkBpsPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::BulkBpsPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::BulkBpsPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::BulkBpsPrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig { params(_: Orb::Models::Price::BulkBpsPrice::Item).returns(Orb::Models::Price::BulkBpsPrice::Item) } def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::BulkBpsPrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::BulkBpsPrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::BulkBpsPrice::Maximum)) + end def maximum=(_) end @@ -2390,11 +4089,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::BulkBpsPrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::BulkBpsPrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::BulkBpsPrice::Minimum)) + end def minimum=(_) end @@ -2438,13 +4140,13 @@ module Orb def price_type=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::BulkBpsPrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::BulkBpsPrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::BulkBpsPrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -2452,13 +4154,13 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_bps_config: Orb::Models::BulkBpsConfigModel, + billable_metric: T.nilable(Orb::Models::Price::BulkBpsPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::BulkBpsPrice::BillingCycleConfiguration, + bulk_bps_config: Orb::Models::Price::BulkBpsPrice::BulkBpsConfig, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::BulkBpsPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -2470,17 +4172,17 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::BulkBpsPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::BulkBpsPrice::Item, + maximum: T.nilable(Orb::Models::Price::BulkBpsPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::BulkBpsPrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + dimensional_price_configuration: T.nilable(Orb::Models::Price::BulkBpsPrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -2518,13 +4220,13 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_bps_config: Orb::Models::BulkBpsConfigModel, + billable_metric: T.nilable(Orb::Models::Price::BulkBpsPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::BulkBpsPrice::BillingCycleConfiguration, + bulk_bps_config: Orb::Models::Price::BulkBpsPrice::BulkBpsConfig, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::BulkBpsPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -2536,24 +4238,144 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::BulkBpsPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::BulkBpsPrice::Item, + maximum: T.nilable(Orb::Models::Price::BulkBpsPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::BulkBpsPrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + dimensional_price_configuration: T.nilable(Orb::Models::Price::BulkBpsPrice::DimensionalPriceConfiguration) } ) end def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class BulkBpsConfig < Orb::BaseModel + sig { returns(T::Array[Orb::Models::Price::BulkBpsPrice::BulkBpsConfig::Tier]) } + def tiers + end + + sig do + params(_: T::Array[Orb::Models::Price::BulkBpsPrice::BulkBpsConfig::Tier]) + .returns(T::Array[Orb::Models::Price::BulkBpsPrice::BulkBpsConfig::Tier]) + end + def tiers=(_) + end + + sig { params(tiers: T::Array[Orb::Models::Price::BulkBpsPrice::BulkBpsConfig::Tier]).void } + def initialize(tiers:) + end + + sig { override.returns({tiers: T::Array[Orb::Models::Price::BulkBpsPrice::BulkBpsConfig::Tier]}) } + def to_hash + end + + class Tier < Orb::BaseModel + sig { returns(Float) } + def bps + end + + sig { params(_: Float).returns(Float) } + def bps=(_) + end + + sig { returns(T.nilable(String)) } + def maximum_amount + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_maximum + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_maximum=(_) + end + + sig do + params(bps: Float, maximum_amount: T.nilable(String), per_unit_maximum: T.nilable(String)).void + end + def initialize(bps:, maximum_amount: nil, per_unit_maximum: nil) + end + + sig do + override.returns( + { + bps: Float, + maximum_amount: T.nilable(String), + per_unit_maximum: T.nilable(String) + } + ) + end + def to_hash + end + end + end + class Cadence < Orb::Enum abstract! @@ -2569,6 +4391,147 @@ module Orb end end + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + class PriceType < Orb::Enum abstract! @@ -2579,6 +4542,32 @@ module Orb def self.values end end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end class BulkPrice < Orb::BaseModel @@ -2590,32 +4579,33 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::BulkPrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::BulkPrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::BulkPrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::BulkPrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::BulkPrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::BulkPrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end - sig { returns(Orb::Models::BulkConfigModel) } + sig { returns(Orb::Models::Price::BulkPrice::BulkConfig) } def bulk_config end - sig { params(_: Orb::Models::BulkConfigModel).returns(Orb::Models::BulkConfigModel) } + sig { params(_: Orb::Models::Price::BulkPrice::BulkConfig).returns(Orb::Models::Price::BulkPrice::BulkConfig) } def bulk_config=(_) end @@ -2643,11 +4633,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::BulkPrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::BulkPrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::BulkPrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -2715,30 +4708,33 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::BulkPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::BulkPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::BulkPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::BulkPrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig { params(_: Orb::Models::Price::BulkPrice::Item).returns(Orb::Models::Price::BulkPrice::Item) } def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::BulkPrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::BulkPrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::BulkPrice::Maximum)) + end def maximum=(_) end @@ -2758,11 +4754,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::BulkPrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::BulkPrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::BulkPrice::Minimum)) + end def minimum=(_) end @@ -2806,13 +4805,13 @@ module Orb def price_type=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::BulkPrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::BulkPrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::BulkPrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -2820,13 +4819,13 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_config: Orb::Models::BulkConfigModel, + billable_metric: T.nilable(Orb::Models::Price::BulkPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::BulkPrice::BillingCycleConfiguration, + bulk_config: Orb::Models::Price::BulkPrice::BulkConfig, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::BulkPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -2838,17 +4837,17 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::BulkPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::BulkPrice::Item, + maximum: T.nilable(Orb::Models::Price::BulkPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::BulkPrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + dimensional_price_configuration: T.nilable(Orb::Models::Price::BulkPrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -2886,13 +4885,13 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_config: Orb::Models::BulkConfigModel, + billable_metric: T.nilable(Orb::Models::Price::BulkPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::BulkPrice::BillingCycleConfiguration, + bulk_config: Orb::Models::Price::BulkPrice::BulkConfig, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::BulkPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -2904,36 +4903,279 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::BulkPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::BulkPrice::Item, + maximum: T.nilable(Orb::Models::Price::BulkPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::BulkPrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + dimensional_price_configuration: T.nilable(Orb::Models::Price::BulkPrice::DimensionalPriceConfiguration) } ) end def to_hash end - class Cadence < Orb::Enum - abstract! + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class BulkConfig < Orb::BaseModel + sig { returns(T::Array[Orb::Models::Price::BulkPrice::BulkConfig::Tier]) } + def tiers + end + + sig do + params(_: T::Array[Orb::Models::Price::BulkPrice::BulkConfig::Tier]) + .returns(T::Array[Orb::Models::Price::BulkPrice::BulkConfig::Tier]) + end + def tiers=(_) + end + + sig { params(tiers: T::Array[Orb::Models::Price::BulkPrice::BulkConfig::Tier]).void } + def initialize(tiers:) + end + + sig { override.returns({tiers: T::Array[Orb::Models::Price::BulkPrice::BulkConfig::Tier]}) } + def to_hash + end + + class Tier < Orb::BaseModel + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { returns(T.nilable(Float)) } + def maximum_units + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def maximum_units=(_) + end + + sig { params(unit_amount: String, maximum_units: T.nilable(Float)).void } + def initialize(unit_amount:, maximum_units: nil) + end + + sig { override.returns({unit_amount: String, maximum_units: T.nilable(Float)}) } + def to_hash + end + end + end + + class Cadence < Orb::Enum + abstract! + + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end - sig { override.returns(T::Array[Symbol]) } - def self.values + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash end end @@ -2947,6 +5189,32 @@ module Orb def self.values end end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end class ThresholdTotalAmountPrice < Orb::BaseModel @@ -2958,23 +5226,24 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::ThresholdTotalAmountPrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::ThresholdTotalAmountPrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::ThresholdTotalAmountPrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end @@ -3003,11 +5272,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -3075,30 +5347,36 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::ThresholdTotalAmountPrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig do + params(_: Orb::Models::Price::ThresholdTotalAmountPrice::Item) + .returns(Orb::Models::Price::ThresholdTotalAmountPrice::Item) + end def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::Maximum)) + end def maximum=(_) end @@ -3118,11 +5396,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::Minimum)) + end def minimum=(_) end @@ -3166,24 +5447,21 @@ module Orb def price_type=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def threshold_total_amount_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def threshold_total_amount_config=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -3191,12 +5469,12 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::ThresholdTotalAmountPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -3208,18 +5486,18 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::ThresholdTotalAmountPrice::Item, + maximum: T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - threshold_total_amount_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + threshold_total_amount_config: T::Hash[Symbol, T.anything], + dimensional_price_configuration: T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -3257,12 +5535,12 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::ThresholdTotalAmountPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -3274,25 +5552,80 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::ThresholdTotalAmountPrice::Item, + maximum: T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - threshold_total_amount_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + threshold_total_amount_config: T::Hash[Symbol, T.anything], + dimensional_price_configuration: T.nilable(Orb::Models::Price::ThresholdTotalAmountPrice::DimensionalPriceConfiguration) } ) end def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Cadence < Orb::Enum abstract! @@ -3308,6 +5641,147 @@ module Orb end end + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + class PriceType < Orb::Enum abstract! @@ -3318,6 +5792,32 @@ module Orb def self.values end end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end class TieredPackagePrice < Orb::BaseModel @@ -3329,23 +5829,24 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredPackagePrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::TieredPackagePrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::TieredPackagePrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::TieredPackagePrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::TieredPackagePrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::TieredPackagePrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end @@ -3374,11 +5875,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredPackagePrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::TieredPackagePrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::TieredPackagePrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -3446,30 +5950,36 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredPackagePrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::TieredPackagePrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::TieredPackagePrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::TieredPackagePrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig do + params(_: Orb::Models::Price::TieredPackagePrice::Item) + .returns(Orb::Models::Price::TieredPackagePrice::Item) + end def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredPackagePrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::TieredPackagePrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::TieredPackagePrice::Maximum)) + end def maximum=(_) end @@ -3489,11 +5999,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredPackagePrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::TieredPackagePrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::TieredPackagePrice::Minimum)) + end def minimum=(_) end @@ -3537,24 +6050,21 @@ module Orb def price_type=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def tiered_package_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def tiered_package_config=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredPackagePrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::TieredPackagePrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::TieredPackagePrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -3562,12 +6072,12 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::TieredPackagePrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::TieredPackagePrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::TieredPackagePrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -3579,18 +6089,18 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::TieredPackagePrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::TieredPackagePrice::Item, + maximum: T.nilable(Orb::Models::Price::TieredPackagePrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::TieredPackagePrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + tiered_package_config: T::Hash[Symbol, T.anything], + dimensional_price_configuration: T.nilable(Orb::Models::Price::TieredPackagePrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -3628,12 +6138,12 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::TieredPackagePrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::TieredPackagePrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::TieredPackagePrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -3645,37 +6155,233 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::TieredPackagePrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::TieredPackagePrice::Item, + maximum: T.nilable(Orb::Models::Price::TieredPackagePrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::TieredPackagePrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + tiered_package_config: T::Hash[Symbol, T.anything], + dimensional_price_configuration: T.nilable(Orb::Models::Price::TieredPackagePrice::DimensionalPriceConfiguration) } ) end def to_hash end - class Cadence < Orb::Enum - abstract! + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Cadence < Orb::Enum + abstract! + + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end - sig { override.returns(T::Array[Symbol]) } - def self.values + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash end end @@ -3689,6 +6395,32 @@ module Orb def self.values end end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end class GroupedTieredPrice < Orb::BaseModel @@ -3700,23 +6432,24 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedTieredPrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::GroupedTieredPrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::GroupedTieredPrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::GroupedTieredPrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::GroupedTieredPrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::GroupedTieredPrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end @@ -3745,11 +6478,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedTieredPrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::GroupedTieredPrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::GroupedTieredPrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -3817,41 +6553,44 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def grouped_tiered_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def grouped_tiered_config=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedTieredPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::GroupedTieredPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::GroupedTieredPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::GroupedTieredPrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig do + params(_: Orb::Models::Price::GroupedTieredPrice::Item) + .returns(Orb::Models::Price::GroupedTieredPrice::Item) + end def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedTieredPrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::GroupedTieredPrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::GroupedTieredPrice::Maximum)) + end def maximum=(_) end @@ -3871,11 +6610,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedTieredPrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::GroupedTieredPrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::GroupedTieredPrice::Minimum)) + end def minimum=(_) end @@ -3919,13 +6661,13 @@ module Orb def price_type=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedTieredPrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::GroupedTieredPrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::GroupedTieredPrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -3933,12 +6675,12 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::GroupedTieredPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::GroupedTieredPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::GroupedTieredPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -3950,18 +6692,18 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - grouped_tiered_config: Orb::Models::CustomRatingFunctionConfigModel, - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + grouped_tiered_config: T::Hash[Symbol, T.anything], + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::GroupedTieredPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::GroupedTieredPrice::Item, + maximum: T.nilable(Orb::Models::Price::GroupedTieredPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::GroupedTieredPrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + dimensional_price_configuration: T.nilable(Orb::Models::Price::GroupedTieredPrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -3999,12 +6741,12 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::GroupedTieredPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::GroupedTieredPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::GroupedTieredPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -4016,25 +6758,80 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - grouped_tiered_config: Orb::Models::CustomRatingFunctionConfigModel, - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + grouped_tiered_config: T::Hash[Symbol, T.anything], + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::GroupedTieredPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::GroupedTieredPrice::Item, + maximum: T.nilable(Orb::Models::Price::GroupedTieredPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::GroupedTieredPrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + dimensional_price_configuration: T.nilable(Orb::Models::Price::GroupedTieredPrice::DimensionalPriceConfiguration) } ) end def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Cadence < Orb::Enum abstract! @@ -4050,6 +6847,147 @@ module Orb end end + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + class PriceType < Orb::Enum abstract! @@ -4060,6 +6998,32 @@ module Orb def self.values end end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end class TieredWithMinimumPrice < Orb::BaseModel @@ -4071,23 +7035,24 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredWithMinimumPrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::TieredWithMinimumPrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::TieredWithMinimumPrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::TieredWithMinimumPrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::TieredWithMinimumPrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::TieredWithMinimumPrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end @@ -4116,11 +7081,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredWithMinimumPrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::TieredWithMinimumPrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::TieredWithMinimumPrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -4188,30 +7156,36 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredWithMinimumPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::TieredWithMinimumPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::TieredWithMinimumPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::TieredWithMinimumPrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig do + params(_: Orb::Models::Price::TieredWithMinimumPrice::Item) + .returns(Orb::Models::Price::TieredWithMinimumPrice::Item) + end def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredWithMinimumPrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::TieredWithMinimumPrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::TieredWithMinimumPrice::Maximum)) + end def maximum=(_) end @@ -4231,11 +7205,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredWithMinimumPrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::TieredWithMinimumPrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::TieredWithMinimumPrice::Minimum)) + end def minimum=(_) end @@ -4279,24 +7256,21 @@ module Orb def price_type=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def tiered_with_minimum_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def tiered_with_minimum_config=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredWithMinimumPrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::TieredWithMinimumPrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::TieredWithMinimumPrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -4304,12 +7278,12 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::TieredWithMinimumPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::TieredWithMinimumPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::TieredWithMinimumPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -4321,18 +7295,18 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::TieredWithMinimumPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::TieredWithMinimumPrice::Item, + maximum: T.nilable(Orb::Models::Price::TieredWithMinimumPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::TieredWithMinimumPrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - tiered_with_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + tiered_with_minimum_config: T::Hash[Symbol, T.anything], + dimensional_price_configuration: T.nilable(Orb::Models::Price::TieredWithMinimumPrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -4370,12 +7344,12 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::TieredWithMinimumPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::TieredWithMinimumPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::TieredWithMinimumPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -4387,25 +7361,80 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::TieredWithMinimumPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::TieredWithMinimumPrice::Item, + maximum: T.nilable(Orb::Models::Price::TieredWithMinimumPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::TieredWithMinimumPrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - tiered_with_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + tiered_with_minimum_config: T::Hash[Symbol, T.anything], + dimensional_price_configuration: T.nilable(Orb::Models::Price::TieredWithMinimumPrice::DimensionalPriceConfiguration) } ) end def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Cadence < Orb::Enum abstract! @@ -4416,8 +7445,149 @@ module Orb ANNUAL = :annual CUSTOM = :custom - sig { override.returns(T::Array[Symbol]) } - def self.values + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash end end @@ -4431,6 +7601,32 @@ module Orb def self.values end end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end class TieredPackageWithMinimumPrice < Orb::BaseModel @@ -4442,23 +7638,24 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::TieredPackageWithMinimumPrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::TieredPackageWithMinimumPrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::TieredPackageWithMinimumPrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end @@ -4487,11 +7684,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -4559,30 +7759,36 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::TieredPackageWithMinimumPrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig do + params(_: Orb::Models::Price::TieredPackageWithMinimumPrice::Item) + .returns(Orb::Models::Price::TieredPackageWithMinimumPrice::Item) + end def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::Maximum)) + end def maximum=(_) end @@ -4602,11 +7808,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::Minimum)) + end def minimum=(_) end @@ -4650,24 +7859,21 @@ module Orb def price_type=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def tiered_package_with_minimum_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def tiered_package_with_minimum_config=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -4675,12 +7881,12 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::TieredPackageWithMinimumPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -4692,18 +7898,18 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::TieredPackageWithMinimumPrice::Item, + maximum: T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - tiered_package_with_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + tiered_package_with_minimum_config: T::Hash[Symbol, T.anything], + dimensional_price_configuration: T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -4741,12 +7947,12 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::TieredPackageWithMinimumPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -4758,25 +7964,80 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::TieredPackageWithMinimumPrice::Item, + maximum: T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - tiered_package_with_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + tiered_package_with_minimum_config: T::Hash[Symbol, T.anything], + dimensional_price_configuration: T.nilable(Orb::Models::Price::TieredPackageWithMinimumPrice::DimensionalPriceConfiguration) } ) end def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Cadence < Orb::Enum abstract! @@ -4792,6 +8053,147 @@ module Orb end end + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + class PriceType < Orb::Enum abstract! @@ -4802,6 +8204,32 @@ module Orb def self.values end end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end class PackageWithAllocationPrice < Orb::BaseModel @@ -4813,23 +8241,24 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::PackageWithAllocationPrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::PackageWithAllocationPrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::PackageWithAllocationPrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::PackageWithAllocationPrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::PackageWithAllocationPrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::PackageWithAllocationPrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end @@ -4858,11 +8287,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::PackageWithAllocationPrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::PackageWithAllocationPrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::PackageWithAllocationPrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -4930,30 +8362,36 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::PackageWithAllocationPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::PackageWithAllocationPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::PackageWithAllocationPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::PackageWithAllocationPrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig do + params(_: Orb::Models::Price::PackageWithAllocationPrice::Item) + .returns(Orb::Models::Price::PackageWithAllocationPrice::Item) + end def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::PackageWithAllocationPrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::PackageWithAllocationPrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::PackageWithAllocationPrice::Maximum)) + end def maximum=(_) end @@ -4973,11 +8411,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::PackageWithAllocationPrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::PackageWithAllocationPrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::PackageWithAllocationPrice::Minimum)) + end def minimum=(_) end @@ -5005,14 +8446,11 @@ module Orb def name=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def package_with_allocation_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def package_with_allocation_config=(_) end @@ -5032,13 +8470,13 @@ module Orb def price_type=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::PackageWithAllocationPrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::PackageWithAllocationPrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::PackageWithAllocationPrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -5046,12 +8484,12 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::PackageWithAllocationPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::PackageWithAllocationPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::PackageWithAllocationPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -5063,18 +8501,18 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::PackageWithAllocationPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::PackageWithAllocationPrice::Item, + maximum: T.nilable(Orb::Models::Price::PackageWithAllocationPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::PackageWithAllocationPrice::Minimum), minimum_amount: T.nilable(String), name: String, - package_with_allocation_config: Orb::Models::CustomRatingFunctionConfigModel, + package_with_allocation_config: T::Hash[Symbol, T.anything], plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + dimensional_price_configuration: T.nilable(Orb::Models::Price::PackageWithAllocationPrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -5112,12 +8550,12 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::PackageWithAllocationPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::PackageWithAllocationPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::PackageWithAllocationPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -5129,25 +8567,80 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::PackageWithAllocationPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::PackageWithAllocationPrice::Item, + maximum: T.nilable(Orb::Models::Price::PackageWithAllocationPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::PackageWithAllocationPrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, - package_with_allocation_config: Orb::Models::CustomRatingFunctionConfigModel, + package_with_allocation_config: T::Hash[Symbol, T.anything], plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + dimensional_price_configuration: T.nilable(Orb::Models::Price::PackageWithAllocationPrice::DimensionalPriceConfiguration) } ) end def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Cadence < Orb::Enum abstract! @@ -5163,14 +8656,181 @@ module Orb end end + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + class PriceType < Orb::Enum abstract! USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price - sig { override.returns(T::Array[Symbol]) } - def self.values + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash end end end @@ -5184,23 +8844,24 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::UnitWithPercentPrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::UnitWithPercentPrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::UnitWithPercentPrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::UnitWithPercentPrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::UnitWithPercentPrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::UnitWithPercentPrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end @@ -5229,11 +8890,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::UnitWithPercentPrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::UnitWithPercentPrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::UnitWithPercentPrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -5301,30 +8965,36 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::UnitWithPercentPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::UnitWithPercentPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::UnitWithPercentPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::UnitWithPercentPrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig do + params(_: Orb::Models::Price::UnitWithPercentPrice::Item) + .returns(Orb::Models::Price::UnitWithPercentPrice::Item) + end def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::UnitWithPercentPrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::UnitWithPercentPrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::UnitWithPercentPrice::Maximum)) + end def maximum=(_) end @@ -5344,11 +9014,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::UnitWithPercentPrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::UnitWithPercentPrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::UnitWithPercentPrice::Minimum)) + end def minimum=(_) end @@ -5392,24 +9065,21 @@ module Orb def price_type=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def unit_with_percent_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def unit_with_percent_config=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::UnitWithPercentPrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::UnitWithPercentPrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::UnitWithPercentPrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -5417,12 +9087,12 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::UnitWithPercentPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::UnitWithPercentPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::UnitWithPercentPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -5434,18 +9104,18 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::UnitWithPercentPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::UnitWithPercentPrice::Item, + maximum: T.nilable(Orb::Models::Price::UnitWithPercentPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::UnitWithPercentPrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - unit_with_percent_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + unit_with_percent_config: T::Hash[Symbol, T.anything], + dimensional_price_configuration: T.nilable(Orb::Models::Price::UnitWithPercentPrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -5483,12 +9153,12 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::UnitWithPercentPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::UnitWithPercentPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::UnitWithPercentPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -5500,25 +9170,80 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::UnitWithPercentPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::UnitWithPercentPrice::Item, + maximum: T.nilable(Orb::Models::Price::UnitWithPercentPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::UnitWithPercentPrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - unit_with_percent_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + unit_with_percent_config: T::Hash[Symbol, T.anything], + dimensional_price_configuration: T.nilable(Orb::Models::Price::UnitWithPercentPrice::DimensionalPriceConfiguration) } ) end def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Cadence < Orb::Enum abstract! @@ -5534,6 +9259,147 @@ module Orb end end + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + class PriceType < Orb::Enum abstract! @@ -5544,6 +9410,32 @@ module Orb def self.values end end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end class MatrixWithAllocationPrice < Orb::BaseModel @@ -5555,23 +9447,24 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::MatrixWithAllocationPrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::MatrixWithAllocationPrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::MatrixWithAllocationPrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end @@ -5600,11 +9493,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -5672,41 +9568,47 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::MatrixWithAllocationPrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig do + params(_: Orb::Models::Price::MatrixWithAllocationPrice::Item) + .returns(Orb::Models::Price::MatrixWithAllocationPrice::Item) + end def item=(_) end - sig { returns(Orb::Models::MatrixWithAllocationConfigModel) } + sig { returns(Orb::Models::Price::MatrixWithAllocationPrice::MatrixWithAllocationConfig) } def matrix_with_allocation_config end sig do - params(_: Orb::Models::MatrixWithAllocationConfigModel) - .returns(Orb::Models::MatrixWithAllocationConfigModel) + params(_: Orb::Models::Price::MatrixWithAllocationPrice::MatrixWithAllocationConfig) + .returns(Orb::Models::Price::MatrixWithAllocationPrice::MatrixWithAllocationConfig) end def matrix_with_allocation_config=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::Maximum)) + end def maximum=(_) end @@ -5726,11 +9628,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::Minimum)) + end def minimum=(_) end @@ -5774,13 +9679,13 @@ module Orb def price_type=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -5788,12 +9693,12 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::MatrixWithAllocationPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -5805,18 +9710,18 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - matrix_with_allocation_config: Orb::Models::MatrixWithAllocationConfigModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::MatrixWithAllocationPrice::Item, + matrix_with_allocation_config: Orb::Models::Price::MatrixWithAllocationPrice::MatrixWithAllocationConfig, + maximum: T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + dimensional_price_configuration: T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -5854,12 +9759,12 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::MatrixWithAllocationPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -5871,37 +9776,324 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - matrix_with_allocation_config: Orb::Models::MatrixWithAllocationConfigModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::MatrixWithAllocationPrice::Item, + matrix_with_allocation_config: Orb::Models::Price::MatrixWithAllocationPrice::MatrixWithAllocationConfig, + maximum: T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + dimensional_price_configuration: T.nilable(Orb::Models::Price::MatrixWithAllocationPrice::DimensionalPriceConfiguration) } ) end def to_hash end - class Cadence < Orb::Enum - abstract! + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Cadence < Orb::Enum + abstract! + + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class MatrixWithAllocationConfig < Orb::BaseModel + sig { returns(Float) } + def allocation + end + + sig { params(_: Float).returns(Float) } + def allocation=(_) + end + + sig { returns(String) } + def default_unit_amount + end + + sig { params(_: String).returns(String) } + def default_unit_amount=(_) + end + + sig { returns(T::Array[T.nilable(String)]) } + def dimensions + end + + sig { params(_: T::Array[T.nilable(String)]).returns(T::Array[T.nilable(String)]) } + def dimensions=(_) + end + + sig { returns(T::Array[Orb::Models::Price::MatrixWithAllocationPrice::MatrixWithAllocationConfig::MatrixValue]) } + def matrix_values + end + + sig do + params( + _: T::Array[Orb::Models::Price::MatrixWithAllocationPrice::MatrixWithAllocationConfig::MatrixValue] + ) + .returns(T::Array[Orb::Models::Price::MatrixWithAllocationPrice::MatrixWithAllocationConfig::MatrixValue]) + end + def matrix_values=(_) + end + + sig do + params( + allocation: Float, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + matrix_values: T::Array[Orb::Models::Price::MatrixWithAllocationPrice::MatrixWithAllocationConfig::MatrixValue] + ) + .void + end + def initialize(allocation:, default_unit_amount:, dimensions:, matrix_values:) + end + + sig do + override + .returns( + { + allocation: Float, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + matrix_values: T::Array[Orb::Models::Price::MatrixWithAllocationPrice::MatrixWithAllocationConfig::MatrixValue] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::BaseModel + sig { returns(T::Array[T.nilable(String)]) } + def dimension_values + end + + sig { params(_: T::Array[T.nilable(String)]).returns(T::Array[T.nilable(String)]) } + def dimension_values=(_) + end + + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { params(dimension_values: T::Array[T.nilable(String)], unit_amount: String).void } + def initialize(dimension_values:, unit_amount:) + end + + sig { override.returns({dimension_values: T::Array[T.nilable(String)], unit_amount: String}) } + def to_hash + end + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end - sig { override.returns(T::Array[Symbol]) } - def self.values + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash end end @@ -5915,6 +10107,32 @@ module Orb def self.values end end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end class TieredWithProrationPrice < Orb::BaseModel @@ -5926,23 +10144,24 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredWithProrationPrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::TieredWithProrationPrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::TieredWithProrationPrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::TieredWithProrationPrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::TieredWithProrationPrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::TieredWithProrationPrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end @@ -5971,11 +10190,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredWithProrationPrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::TieredWithProrationPrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::TieredWithProrationPrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -6043,30 +10265,36 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredWithProrationPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::TieredWithProrationPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::TieredWithProrationPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::TieredWithProrationPrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig do + params(_: Orb::Models::Price::TieredWithProrationPrice::Item) + .returns(Orb::Models::Price::TieredWithProrationPrice::Item) + end def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredWithProrationPrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::TieredWithProrationPrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::TieredWithProrationPrice::Maximum)) + end def maximum=(_) end @@ -6086,11 +10314,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredWithProrationPrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::TieredWithProrationPrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::TieredWithProrationPrice::Minimum)) + end def minimum=(_) end @@ -6134,24 +10365,21 @@ module Orb def price_type=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def tiered_with_proration_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def tiered_with_proration_config=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::TieredWithProrationPrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::TieredWithProrationPrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::TieredWithProrationPrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -6159,12 +10387,12 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::TieredWithProrationPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::TieredWithProrationPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::TieredWithProrationPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -6176,18 +10404,18 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::TieredWithProrationPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::TieredWithProrationPrice::Item, + maximum: T.nilable(Orb::Models::Price::TieredWithProrationPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::TieredWithProrationPrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - tiered_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + tiered_with_proration_config: T::Hash[Symbol, T.anything], + dimensional_price_configuration: T.nilable(Orb::Models::Price::TieredWithProrationPrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -6225,12 +10453,12 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::TieredWithProrationPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::TieredWithProrationPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::TieredWithProrationPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -6242,25 +10470,80 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::TieredWithProrationPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::TieredWithProrationPrice::Item, + maximum: T.nilable(Orb::Models::Price::TieredWithProrationPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::TieredWithProrationPrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - tiered_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + tiered_with_proration_config: T::Hash[Symbol, T.anything], + dimensional_price_configuration: T.nilable(Orb::Models::Price::TieredWithProrationPrice::DimensionalPriceConfiguration) } ) end def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Cadence < Orb::Enum abstract! @@ -6276,6 +10559,147 @@ module Orb end end + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + class PriceType < Orb::Enum abstract! @@ -6286,6 +10710,32 @@ module Orb def self.values end end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end class UnitWithProrationPrice < Orb::BaseModel @@ -6297,23 +10747,24 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::UnitWithProrationPrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::UnitWithProrationPrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::UnitWithProrationPrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::UnitWithProrationPrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::UnitWithProrationPrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::UnitWithProrationPrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end @@ -6342,11 +10793,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::UnitWithProrationPrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::UnitWithProrationPrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::UnitWithProrationPrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -6414,30 +10868,36 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::UnitWithProrationPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::UnitWithProrationPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::UnitWithProrationPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::UnitWithProrationPrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig do + params(_: Orb::Models::Price::UnitWithProrationPrice::Item) + .returns(Orb::Models::Price::UnitWithProrationPrice::Item) + end def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::UnitWithProrationPrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::UnitWithProrationPrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::UnitWithProrationPrice::Maximum)) + end def maximum=(_) end @@ -6457,11 +10917,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::UnitWithProrationPrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::UnitWithProrationPrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::UnitWithProrationPrice::Minimum)) + end def minimum=(_) end @@ -6505,24 +10968,21 @@ module Orb def price_type=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def unit_with_proration_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def unit_with_proration_config=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::UnitWithProrationPrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::UnitWithProrationPrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::UnitWithProrationPrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -6530,12 +10990,12 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::UnitWithProrationPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::UnitWithProrationPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::UnitWithProrationPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -6547,18 +11007,18 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::UnitWithProrationPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::UnitWithProrationPrice::Item, + maximum: T.nilable(Orb::Models::Price::UnitWithProrationPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::UnitWithProrationPrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - unit_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + unit_with_proration_config: T::Hash[Symbol, T.anything], + dimensional_price_configuration: T.nilable(Orb::Models::Price::UnitWithProrationPrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -6596,12 +11056,12 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::UnitWithProrationPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::UnitWithProrationPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::UnitWithProrationPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -6613,37 +11073,233 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::UnitWithProrationPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::UnitWithProrationPrice::Item, + maximum: T.nilable(Orb::Models::Price::UnitWithProrationPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::UnitWithProrationPrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - unit_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + unit_with_proration_config: T::Hash[Symbol, T.anything], + dimensional_price_configuration: T.nilable(Orb::Models::Price::UnitWithProrationPrice::DimensionalPriceConfiguration) } ) end def to_hash end - class Cadence < Orb::Enum - abstract! + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Cadence < Orb::Enum + abstract! + + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end - sig { override.returns(T::Array[Symbol]) } - def self.values + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash end end @@ -6657,6 +11313,32 @@ module Orb def self.values end end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end class GroupedAllocationPrice < Orb::BaseModel @@ -6668,23 +11350,24 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedAllocationPrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::GroupedAllocationPrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::GroupedAllocationPrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::GroupedAllocationPrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::GroupedAllocationPrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::GroupedAllocationPrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end @@ -6713,11 +11396,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedAllocationPrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::GroupedAllocationPrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::GroupedAllocationPrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -6785,41 +11471,44 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def grouped_allocation_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def grouped_allocation_config=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedAllocationPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::GroupedAllocationPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::GroupedAllocationPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::GroupedAllocationPrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig do + params(_: Orb::Models::Price::GroupedAllocationPrice::Item) + .returns(Orb::Models::Price::GroupedAllocationPrice::Item) + end def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedAllocationPrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::GroupedAllocationPrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::GroupedAllocationPrice::Maximum)) + end def maximum=(_) end @@ -6839,11 +11528,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedAllocationPrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::GroupedAllocationPrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::GroupedAllocationPrice::Minimum)) + end def minimum=(_) end @@ -6887,13 +11579,13 @@ module Orb def price_type=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedAllocationPrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::GroupedAllocationPrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::GroupedAllocationPrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -6901,12 +11593,12 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::GroupedAllocationPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::GroupedAllocationPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::GroupedAllocationPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -6918,18 +11610,18 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - grouped_allocation_config: Orb::Models::CustomRatingFunctionConfigModel, - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + grouped_allocation_config: T::Hash[Symbol, T.anything], + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::GroupedAllocationPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::GroupedAllocationPrice::Item, + maximum: T.nilable(Orb::Models::Price::GroupedAllocationPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::GroupedAllocationPrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + dimensional_price_configuration: T.nilable(Orb::Models::Price::GroupedAllocationPrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -6967,12 +11659,12 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::GroupedAllocationPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::GroupedAllocationPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::GroupedAllocationPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -6984,25 +11676,80 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - grouped_allocation_config: Orb::Models::CustomRatingFunctionConfigModel, - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + grouped_allocation_config: T::Hash[Symbol, T.anything], + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::GroupedAllocationPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::GroupedAllocationPrice::Item, + maximum: T.nilable(Orb::Models::Price::GroupedAllocationPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::GroupedAllocationPrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + dimensional_price_configuration: T.nilable(Orb::Models::Price::GroupedAllocationPrice::DimensionalPriceConfiguration) } ) end def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Cadence < Orb::Enum abstract! @@ -7018,6 +11765,147 @@ module Orb end end + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + class PriceType < Orb::Enum abstract! @@ -7028,6 +11916,32 @@ module Orb def self.values end end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end class GroupedWithProratedMinimumPrice < Orb::BaseModel @@ -7039,23 +11953,24 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::GroupedWithProratedMinimumPrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::GroupedWithProratedMinimumPrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::GroupedWithProratedMinimumPrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end @@ -7084,11 +11999,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -7156,41 +12074,44 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def grouped_with_prorated_minimum_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def grouped_with_prorated_minimum_config=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::GroupedWithProratedMinimumPrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig do + params(_: Orb::Models::Price::GroupedWithProratedMinimumPrice::Item) + .returns(Orb::Models::Price::GroupedWithProratedMinimumPrice::Item) + end def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::Maximum)) + end def maximum=(_) end @@ -7210,11 +12131,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::Minimum)) + end def minimum=(_) end @@ -7258,13 +12182,13 @@ module Orb def price_type=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -7272,12 +12196,12 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::GroupedWithProratedMinimumPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -7289,18 +12213,18 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - grouped_with_prorated_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + grouped_with_prorated_minimum_config: T::Hash[Symbol, T.anything], + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::GroupedWithProratedMinimumPrice::Item, + maximum: T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + dimensional_price_configuration: T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -7338,12 +12262,12 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::GroupedWithProratedMinimumPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -7355,37 +12279,233 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - grouped_with_prorated_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + grouped_with_prorated_minimum_config: T::Hash[Symbol, T.anything], + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::GroupedWithProratedMinimumPrice::Item, + maximum: T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + dimensional_price_configuration: T.nilable(Orb::Models::Price::GroupedWithProratedMinimumPrice::DimensionalPriceConfiguration) } ) end def to_hash end - class Cadence < Orb::Enum - abstract! + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Cadence < Orb::Enum + abstract! + + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end - sig { override.returns(T::Array[Symbol]) } - def self.values + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash end end @@ -7399,6 +12519,32 @@ module Orb def self.values end end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end class GroupedWithMeteredMinimumPrice < Orb::BaseModel @@ -7410,23 +12556,24 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end @@ -7455,11 +12602,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -7527,41 +12677,44 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def grouped_with_metered_minimum_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def grouped_with_metered_minimum_config=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::GroupedWithMeteredMinimumPrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig do + params(_: Orb::Models::Price::GroupedWithMeteredMinimumPrice::Item) + .returns(Orb::Models::Price::GroupedWithMeteredMinimumPrice::Item) + end def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::Maximum)) + end def maximum=(_) end @@ -7581,11 +12734,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::Minimum)) + end def minimum=(_) end @@ -7629,13 +12785,13 @@ module Orb def price_type=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -7643,12 +12799,12 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -7660,18 +12816,18 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - grouped_with_metered_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + grouped_with_metered_minimum_config: T::Hash[Symbol, T.anything], + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::GroupedWithMeteredMinimumPrice::Item, + maximum: T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + dimensional_price_configuration: T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -7709,12 +12865,12 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -7726,25 +12882,80 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - grouped_with_metered_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + grouped_with_metered_minimum_config: T::Hash[Symbol, T.anything], + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::GroupedWithMeteredMinimumPrice::Item, + maximum: T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + dimensional_price_configuration: T.nilable(Orb::Models::Price::GroupedWithMeteredMinimumPrice::DimensionalPriceConfiguration) } ) end def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Cadence < Orb::Enum abstract! @@ -7760,6 +12971,147 @@ module Orb end end + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + class PriceType < Orb::Enum abstract! @@ -7770,6 +13122,32 @@ module Orb def self.values end end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end class MatrixWithDisplayNamePrice < Orb::BaseModel @@ -7781,23 +13159,24 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::MatrixWithDisplayNamePrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::MatrixWithDisplayNamePrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::MatrixWithDisplayNamePrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end @@ -7826,11 +13205,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -7898,41 +13280,44 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::MatrixWithDisplayNamePrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig do + params(_: Orb::Models::Price::MatrixWithDisplayNamePrice::Item) + .returns(Orb::Models::Price::MatrixWithDisplayNamePrice::Item) + end def item=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def matrix_with_display_name_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def matrix_with_display_name_config=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::Maximum)) + end def maximum=(_) end @@ -7952,11 +13337,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::Minimum)) + end def minimum=(_) end @@ -8000,13 +13388,13 @@ module Orb def price_type=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -8014,12 +13402,12 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::MatrixWithDisplayNamePrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -8031,18 +13419,18 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - matrix_with_display_name_config: Orb::Models::CustomRatingFunctionConfigModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::MatrixWithDisplayNamePrice::Item, + matrix_with_display_name_config: T::Hash[Symbol, T.anything], + maximum: T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + dimensional_price_configuration: T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -8080,12 +13468,12 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::MatrixWithDisplayNamePrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -8097,37 +13485,233 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - matrix_with_display_name_config: Orb::Models::CustomRatingFunctionConfigModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::MatrixWithDisplayNamePrice::Item, + matrix_with_display_name_config: T::Hash[Symbol, T.anything], + maximum: T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + dimensional_price_configuration: T.nilable(Orb::Models::Price::MatrixWithDisplayNamePrice::DimensionalPriceConfiguration) } ) end def to_hash end - class Cadence < Orb::Enum - abstract! + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Cadence < Orb::Enum + abstract! + + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end - sig { override.returns(T::Array[Symbol]) } - def self.values + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash end end @@ -8141,6 +13725,32 @@ module Orb def self.values end end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end class BulkWithProrationPrice < Orb::BaseModel @@ -8152,35 +13762,33 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::BulkWithProrationPrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::BulkWithProrationPrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::BulkWithProrationPrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::BulkWithProrationPrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::BulkWithProrationPrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::BulkWithProrationPrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def bulk_with_proration_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def bulk_with_proration_config=(_) end @@ -8208,11 +13816,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::BulkWithProrationPrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::BulkWithProrationPrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::BulkWithProrationPrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -8280,30 +13891,36 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::BulkWithProrationPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::BulkWithProrationPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::BulkWithProrationPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::BulkWithProrationPrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig do + params(_: Orb::Models::Price::BulkWithProrationPrice::Item) + .returns(Orb::Models::Price::BulkWithProrationPrice::Item) + end def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::BulkWithProrationPrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::BulkWithProrationPrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::BulkWithProrationPrice::Maximum)) + end def maximum=(_) end @@ -8323,11 +13940,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::BulkWithProrationPrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::BulkWithProrationPrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::BulkWithProrationPrice::Minimum)) + end def minimum=(_) end @@ -8371,13 +13991,13 @@ module Orb def price_type=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::BulkWithProrationPrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::BulkWithProrationPrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::BulkWithProrationPrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -8385,13 +14005,13 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, + billable_metric: T.nilable(Orb::Models::Price::BulkWithProrationPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::BulkWithProrationPrice::BillingCycleConfiguration, + bulk_with_proration_config: T::Hash[Symbol, T.anything], cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::BulkWithProrationPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -8403,17 +14023,17 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::BulkWithProrationPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::BulkWithProrationPrice::Item, + maximum: T.nilable(Orb::Models::Price::BulkWithProrationPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::BulkWithProrationPrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + dimensional_price_configuration: T.nilable(Orb::Models::Price::BulkWithProrationPrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -8451,13 +14071,13 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, + billable_metric: T.nilable(Orb::Models::Price::BulkWithProrationPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::BulkWithProrationPrice::BillingCycleConfiguration, + bulk_with_proration_config: T::Hash[Symbol, T.anything], cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::BulkWithProrationPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -8469,24 +14089,79 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::BulkWithProrationPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::BulkWithProrationPrice::Item, + maximum: T.nilable(Orb::Models::Price::BulkWithProrationPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::BulkWithProrationPrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + dimensional_price_configuration: T.nilable(Orb::Models::Price::BulkWithProrationPrice::DimensionalPriceConfiguration) } ) end def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Cadence < Orb::Enum abstract! @@ -8502,6 +14177,147 @@ module Orb end end + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + class PriceType < Orb::Enum abstract! @@ -8512,6 +14328,32 @@ module Orb def self.values end end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end class GroupedTieredPackagePrice < Orb::BaseModel @@ -8523,23 +14365,24 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::GroupedTieredPackagePrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::GroupedTieredPackagePrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::GroupedTieredPackagePrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end @@ -8568,11 +14411,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -8640,41 +14486,44 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def grouped_tiered_package_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def grouped_tiered_package_config=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::GroupedTieredPackagePrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig do + params(_: Orb::Models::Price::GroupedTieredPackagePrice::Item) + .returns(Orb::Models::Price::GroupedTieredPackagePrice::Item) + end def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::Maximum)) + end def maximum=(_) end @@ -8694,11 +14543,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::Minimum)) + end def minimum=(_) end @@ -8742,13 +14594,13 @@ module Orb def price_type=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -8756,12 +14608,12 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::GroupedTieredPackagePrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -8773,18 +14625,18 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - grouped_tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + grouped_tiered_package_config: T::Hash[Symbol, T.anything], + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::GroupedTieredPackagePrice::Item, + maximum: T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + dimensional_price_configuration: T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -8822,12 +14674,12 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::GroupedTieredPackagePrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -8839,25 +14691,80 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - grouped_tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + grouped_tiered_package_config: T::Hash[Symbol, T.anything], + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::GroupedTieredPackagePrice::Item, + maximum: T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + dimensional_price_configuration: T.nilable(Orb::Models::Price::GroupedTieredPackagePrice::DimensionalPriceConfiguration) } ) end def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Cadence < Orb::Enum abstract! @@ -8873,6 +14780,147 @@ module Orb end end + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + class PriceType < Orb::Enum abstract! @@ -8883,6 +14931,32 @@ module Orb def self.values end end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end class MaxGroupTieredPackagePrice < Orb::BaseModel @@ -8894,23 +14968,24 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::MaxGroupTieredPackagePrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::MaxGroupTieredPackagePrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::MaxGroupTieredPackagePrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end @@ -8939,11 +15014,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -9011,41 +15089,44 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::MaxGroupTieredPackagePrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig do + params(_: Orb::Models::Price::MaxGroupTieredPackagePrice::Item) + .returns(Orb::Models::Price::MaxGroupTieredPackagePrice::Item) + end def item=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def max_group_tiered_package_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def max_group_tiered_package_config=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::Maximum)) + end def maximum=(_) end @@ -9065,11 +15146,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::Minimum)) + end def minimum=(_) end @@ -9113,13 +15197,13 @@ module Orb def price_type=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -9127,12 +15211,12 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::MaxGroupTieredPackagePrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -9144,18 +15228,18 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - max_group_tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::MaxGroupTieredPackagePrice::Item, + max_group_tiered_package_config: T::Hash[Symbol, T.anything], + maximum: T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + dimensional_price_configuration: T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -9193,12 +15277,12 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::MaxGroupTieredPackagePrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -9210,25 +15294,80 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - max_group_tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::MaxGroupTieredPackagePrice::Item, + max_group_tiered_package_config: T::Hash[Symbol, T.anything], + maximum: T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + dimensional_price_configuration: T.nilable(Orb::Models::Price::MaxGroupTieredPackagePrice::DimensionalPriceConfiguration) } ) end def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Cadence < Orb::Enum abstract! @@ -9244,6 +15383,147 @@ module Orb end end + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + class PriceType < Orb::Enum abstract! @@ -9254,6 +15534,32 @@ module Orb def self.values end end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end class ScalableMatrixWithUnitPricingPrice < Orb::BaseModel @@ -9265,23 +15571,24 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end @@ -9310,11 +15617,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -9382,30 +15692,36 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig do + params(_: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Item) + .returns(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Item) + end def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Maximum)) + end def maximum=(_) end @@ -9425,11 +15741,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Minimum)) + end def minimum=(_) end @@ -9473,24 +15792,23 @@ module Orb def price_type=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def scalable_matrix_with_unit_pricing_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def scalable_matrix_with_unit_pricing_config=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params( + _: T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::DimensionalPriceConfiguration) + ) + .returns(T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -9498,12 +15816,12 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -9515,18 +15833,18 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Item, + maximum: T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - scalable_matrix_with_unit_pricing_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + scalable_matrix_with_unit_pricing_config: T::Hash[Symbol, T.anything], + dimensional_price_configuration: T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -9564,12 +15882,12 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -9581,25 +15899,80 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Item, + maximum: T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - scalable_matrix_with_unit_pricing_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + scalable_matrix_with_unit_pricing_config: T::Hash[Symbol, T.anything], + dimensional_price_configuration: T.nilable(Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::DimensionalPriceConfiguration) } ) end def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Cadence < Orb::Enum abstract! @@ -9613,16 +15986,183 @@ module Orb sig { override.returns(T::Array[Symbol]) } def self.values end - end + end + + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + + class PriceType < Orb::Enum + abstract! + + USAGE_PRICE = :usage_price + FIXED_PRICE = :fixed_price + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end - class PriceType < Orb::Enum - abstract! + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end - sig { override.returns(T::Array[Symbol]) } - def self.values + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash end end end @@ -9636,23 +16176,24 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end @@ -9681,11 +16222,14 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::CreditAllocation)) + end def credit_allocation=(_) end @@ -9753,30 +16297,38 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params( + _: T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration) + ) + .returns(T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig do + params(_: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Item) + .returns(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Item) + end def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Maximum)) + end def maximum=(_) end @@ -9796,11 +16348,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Minimum)) + end def minimum=(_) end @@ -9844,24 +16399,29 @@ module Orb def price_type=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def scalable_matrix_with_tiered_pricing_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def scalable_matrix_with_tiered_pricing_config=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig do + returns( + T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::DimensionalPriceConfiguration) + ) + end def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params( + _: T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::DimensionalPriceConfiguration) + ) + .returns( + T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::DimensionalPriceConfiguration) + ) end def dimensional_price_configuration=(_) end @@ -9869,12 +16429,12 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -9886,18 +16446,18 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Item, + maximum: T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - scalable_matrix_with_tiered_pricing_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + scalable_matrix_with_tiered_pricing_config: T::Hash[Symbol, T.anything], + dimensional_price_configuration: T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -9935,12 +16495,12 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), + credit_allocation: T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::CreditAllocation), currency: String, discount: T.nilable( T.any( @@ -9952,25 +16512,80 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Item, + maximum: T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - scalable_matrix_with_tiered_pricing_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + scalable_matrix_with_tiered_pricing_config: T::Hash[Symbol, T.anything], + dimensional_price_configuration: T.nilable(Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::DimensionalPriceConfiguration) } ) end def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Cadence < Orb::Enum abstract! @@ -9986,6 +16601,147 @@ module Orb end end + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + class PriceType < Orb::Enum abstract! @@ -9996,6 +16752,32 @@ module Orb def self.values end end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end class CumulativeGroupedBulkPrice < Orb::BaseModel @@ -10007,23 +16789,24 @@ module Orb def id=(_) end - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } + sig { returns(T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::BillableMetric)) } def billable_metric end sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) + params(_: T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::BillableMetric)) + .returns(T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::BillableMetric)) end def billable_metric=(_) end - sig { returns(Orb::Models::BillingCycleConfigurationModel) } + sig { returns(Orb::Models::Price::CumulativeGroupedBulkPrice::BillingCycleConfiguration) } def billing_cycle_configuration end sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) + params(_: Orb::Models::Price::CumulativeGroupedBulkPrice::BillingCycleConfiguration) + .returns(Orb::Models::Price::CumulativeGroupedBulkPrice::BillingCycleConfiguration) end def billing_cycle_configuration=(_) end @@ -10052,22 +16835,22 @@ module Orb def created_at=(_) end - sig { returns(T.nilable(Orb::Models::AllocationModel)) } + sig { returns(T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::CreditAllocation)) } def credit_allocation end - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::CreditAllocation)) + .returns(T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::CreditAllocation)) + end def credit_allocation=(_) end - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } + sig { returns(T::Hash[Symbol, T.anything]) } def cumulative_grouped_bulk_config end - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } def cumulative_grouped_bulk_config=(_) end @@ -10135,30 +16918,36 @@ module Orb def fixed_price_quantity=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::InvoicingCycleConfiguration)) end def invoicing_cycle_configuration=(_) end - sig { returns(Orb::Models::ItemSlimModel) } + sig { returns(Orb::Models::Price::CumulativeGroupedBulkPrice::Item) } def item end - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } + sig do + params(_: Orb::Models::Price::CumulativeGroupedBulkPrice::Item) + .returns(Orb::Models::Price::CumulativeGroupedBulkPrice::Item) + end def item=(_) end - sig { returns(T.nilable(Orb::Models::MaximumModel)) } + sig { returns(T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::Maximum)) } def maximum end - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::Maximum)) + .returns(T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::Maximum)) + end def maximum=(_) end @@ -10178,11 +16967,14 @@ module Orb def metadata=(_) end - sig { returns(T.nilable(Orb::Models::MinimumModel)) } + sig { returns(T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::Minimum)) } def minimum end - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } + sig do + params(_: T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::Minimum)) + .returns(T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::Minimum)) + end def minimum=(_) end @@ -10226,13 +17018,13 @@ module Orb def price_type=(_) end - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::DimensionalPriceConfiguration)) } def dimensional_price_configuration end sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) + params(_: T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::DimensionalPriceConfiguration)) + .returns(T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::DimensionalPriceConfiguration)) end def dimensional_price_configuration=(_) end @@ -10240,13 +17032,13 @@ module Orb sig do params( id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::CumulativeGroupedBulkPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - cumulative_grouped_bulk_config: Orb::Models::CustomRatingFunctionConfigModel, + credit_allocation: T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::CreditAllocation), + cumulative_grouped_bulk_config: T::Hash[Symbol, T.anything], currency: String, discount: T.nilable( T.any( @@ -10258,17 +17050,17 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::CumulativeGroupedBulkPrice::Item, + maximum: T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::Minimum), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), + dimensional_price_configuration: T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::DimensionalPriceConfiguration), model_type: Symbol ) .void @@ -10306,13 +17098,13 @@ module Orb .returns( { id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::BillableMetric), + billing_cycle_configuration: Orb::Models::Price::CumulativeGroupedBulkPrice::BillingCycleConfiguration, cadence: Symbol, conversion_rate: T.nilable(Float), created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - cumulative_grouped_bulk_config: Orb::Models::CustomRatingFunctionConfigModel, + credit_allocation: T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::CreditAllocation), + cumulative_grouped_bulk_config: T::Hash[Symbol, T.anything], currency: String, discount: T.nilable( T.any( @@ -10324,24 +17116,79 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), + invoicing_cycle_configuration: T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::InvoicingCycleConfiguration), + item: Orb::Models::Price::CumulativeGroupedBulkPrice::Item, + maximum: T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), + minimum: T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) + dimensional_price_configuration: T.nilable(Orb::Models::Price::CumulativeGroupedBulkPrice::DimensionalPriceConfiguration) } ) end def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { params(id: String).void } + def initialize(id:) + end + + sig { override.returns({id: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Cadence < Orb::Enum abstract! @@ -10357,6 +17204,147 @@ module Orb end end + class CreditAllocation < Orb::BaseModel + sig { returns(T::Boolean) } + def allows_rollover + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def allows_rollover=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { params(allows_rollover: T::Boolean, currency: String).void } + def initialize(allows_rollover:, currency:) + end + + sig { override.returns({allows_rollover: T::Boolean, currency: String}) } + def to_hash + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Item < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Maximum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], maximum_amount: String).void } + def initialize(applies_to_price_ids:, maximum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) } + def to_hash + end + end + + class Minimum < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { params(applies_to_price_ids: T::Array[String], minimum_amount: String).void } + def initialize(applies_to_price_ids:, minimum_amount:) + end + + sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) } + def to_hash + end + end + class PriceType < Orb::Enum abstract! @@ -10367,6 +17355,32 @@ module Orb def self.values end end + + class DimensionalPriceConfiguration < Orb::BaseModel + sig { returns(T::Array[String]) } + def dimension_values + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def dimension_values=(_) + end + + sig { returns(String) } + def dimensional_price_group_id + end + + sig { params(_: String).returns(String) } + def dimensional_price_group_id=(_) + end + + sig { params(dimension_values: T::Array[String], dimensional_price_group_id: String).void } + def initialize(dimension_values:, dimensional_price_group_id:) + end + + sig { override.returns({dimension_values: T::Array[String], dimensional_price_group_id: String}) } + def to_hash + end + end end sig do diff --git a/rbi/lib/orb/models/price_create_params.rbi b/rbi/lib/orb/models/price_create_params.rbi index 698b2545..1bae64a0 100644 --- a/rbi/lib/orb/models/price_create_params.rbi +++ b/rbi/lib/orb/models/price_create_params.rbi @@ -6,191 +6,1101 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(Orb::Models::PriceCreateParams::UnitConfig) } + def unit_config + end + + sig { params(_: Orb::Models::PriceCreateParams::UnitConfig).returns(Orb::Models::PriceCreateParams::UnitConfig) } + def unit_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig { returns(T.nilable(Orb::Models::PriceCreateParams::BillingCycleConfiguration)) } + def billing_cycle_configuration + end + sig do - returns( - T.any( - Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice - ) - ) + params(_: T.nilable(Orb::Models::PriceCreateParams::BillingCycleConfiguration)) + .returns(T.nilable(Orb::Models::PriceCreateParams::BillingCycleConfiguration)) end - def new_floating_price_model + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig { returns(T.nilable(Orb::Models::PriceCreateParams::InvoicingCycleConfiguration)) } + def invoicing_cycle_configuration end sig do - params( - _: T.any( - Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice - ) - ) - .returns( - T.any( - Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice - ) - ) + params(_: T.nilable(Orb::Models::PriceCreateParams::InvoicingCycleConfiguration)) + .returns(T.nilable(Orb::Models::PriceCreateParams::InvoicingCycleConfiguration)) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(Orb::Models::PriceCreateParams::PackageConfig) } + def package_config + end + + sig do + params(_: Orb::Models::PriceCreateParams::PackageConfig) + .returns(Orb::Models::PriceCreateParams::PackageConfig) + end + def package_config=(_) + end + + sig { returns(Orb::Models::PriceCreateParams::MatrixConfig) } + def matrix_config + end + + sig do + params(_: Orb::Models::PriceCreateParams::MatrixConfig) + .returns(Orb::Models::PriceCreateParams::MatrixConfig) + end + def matrix_config=(_) + end + + sig { returns(Orb::Models::PriceCreateParams::MatrixWithAllocationConfig) } + def matrix_with_allocation_config end - def new_floating_price_model=(_) + + sig do + params(_: Orb::Models::PriceCreateParams::MatrixWithAllocationConfig) + .returns(Orb::Models::PriceCreateParams::MatrixWithAllocationConfig) + end + def matrix_with_allocation_config=(_) + end + + sig { returns(Orb::Models::PriceCreateParams::TieredConfig) } + def tiered_config + end + + sig do + params(_: Orb::Models::PriceCreateParams::TieredConfig) + .returns(Orb::Models::PriceCreateParams::TieredConfig) + end + def tiered_config=(_) + end + + sig { returns(Orb::Models::PriceCreateParams::TieredBpsConfig) } + def tiered_bps_config + end + + sig do + params(_: Orb::Models::PriceCreateParams::TieredBpsConfig) + .returns(Orb::Models::PriceCreateParams::TieredBpsConfig) + end + def tiered_bps_config=(_) + end + + sig { returns(Orb::Models::PriceCreateParams::BpsConfig) } + def bps_config + end + + sig { params(_: Orb::Models::PriceCreateParams::BpsConfig).returns(Orb::Models::PriceCreateParams::BpsConfig) } + def bps_config=(_) + end + + sig { returns(Orb::Models::PriceCreateParams::BulkBpsConfig) } + def bulk_bps_config + end + + sig do + params(_: Orb::Models::PriceCreateParams::BulkBpsConfig) + .returns(Orb::Models::PriceCreateParams::BulkBpsConfig) + end + def bulk_bps_config=(_) + end + + sig { returns(Orb::Models::PriceCreateParams::BulkConfig) } + def bulk_config + end + + sig { params(_: Orb::Models::PriceCreateParams::BulkConfig).returns(Orb::Models::PriceCreateParams::BulkConfig) } + def bulk_config=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def threshold_total_amount_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def threshold_total_amount_config=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def tiered_package_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def tiered_package_config=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def grouped_tiered_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def grouped_tiered_config=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def max_group_tiered_package_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def max_group_tiered_package_config=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def tiered_with_minimum_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def tiered_with_minimum_config=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def package_with_allocation_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def package_with_allocation_config=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def tiered_package_with_minimum_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def tiered_package_with_minimum_config=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def unit_with_percent_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def unit_with_percent_config=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def tiered_with_proration_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def tiered_with_proration_config=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def unit_with_proration_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def unit_with_proration_config=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def grouped_allocation_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def grouped_allocation_config=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def grouped_with_prorated_minimum_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def grouped_with_prorated_minimum_config=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def grouped_with_metered_minimum_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def grouped_with_metered_minimum_config=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def matrix_with_display_name_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def matrix_with_display_name_config=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def bulk_with_proration_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def bulk_with_proration_config=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def grouped_tiered_package_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def grouped_tiered_package_config=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def scalable_matrix_with_unit_pricing_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def scalable_matrix_with_unit_pricing_config=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def scalable_matrix_with_tiered_pricing_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def scalable_matrix_with_tiered_pricing_config=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def cumulative_grouped_bulk_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def cumulative_grouped_bulk_config=(_) end sig do params( - new_floating_price_model: T.any( - Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice - ), + cadence: Symbol, + currency: String, + item_id: String, + model_type: Symbol, + name: String, + unit_config: Orb::Models::PriceCreateParams::UnitConfig, + package_config: Orb::Models::PriceCreateParams::PackageConfig, + matrix_config: Orb::Models::PriceCreateParams::MatrixConfig, + matrix_with_allocation_config: Orb::Models::PriceCreateParams::MatrixWithAllocationConfig, + tiered_config: Orb::Models::PriceCreateParams::TieredConfig, + tiered_bps_config: Orb::Models::PriceCreateParams::TieredBpsConfig, + bps_config: Orb::Models::PriceCreateParams::BpsConfig, + bulk_bps_config: Orb::Models::PriceCreateParams::BulkBpsConfig, + bulk_config: Orb::Models::PriceCreateParams::BulkConfig, + threshold_total_amount_config: T::Hash[Symbol, T.anything], + tiered_package_config: T::Hash[Symbol, T.anything], + grouped_tiered_config: T::Hash[Symbol, T.anything], + max_group_tiered_package_config: T::Hash[Symbol, T.anything], + tiered_with_minimum_config: T::Hash[Symbol, T.anything], + package_with_allocation_config: T::Hash[Symbol, T.anything], + tiered_package_with_minimum_config: T::Hash[Symbol, T.anything], + unit_with_percent_config: T::Hash[Symbol, T.anything], + tiered_with_proration_config: T::Hash[Symbol, T.anything], + unit_with_proration_config: T::Hash[Symbol, T.anything], + grouped_allocation_config: T::Hash[Symbol, T.anything], + grouped_with_prorated_minimum_config: T::Hash[Symbol, T.anything], + grouped_with_metered_minimum_config: T::Hash[Symbol, T.anything], + matrix_with_display_name_config: T::Hash[Symbol, T.anything], + bulk_with_proration_config: T::Hash[Symbol, T.anything], + grouped_tiered_package_config: T::Hash[Symbol, T.anything], + scalable_matrix_with_unit_pricing_config: T::Hash[Symbol, T.anything], + scalable_matrix_with_tiered_pricing_config: T::Hash[Symbol, T.anything], + cumulative_grouped_bulk_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable(Orb::Models::PriceCreateParams::BillingCycleConfiguration), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable(Orb::Models::PriceCreateParams::InvoicingCycleConfiguration), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything]) ) .void end - def initialize(new_floating_price_model:, request_options: {}) + def initialize( + cadence:, + currency:, + item_id:, + model_type:, + name:, + unit_config:, + package_config:, + matrix_config:, + matrix_with_allocation_config:, + tiered_config:, + tiered_bps_config:, + bps_config:, + bulk_bps_config:, + bulk_config:, + threshold_total_amount_config:, + tiered_package_config:, + grouped_tiered_config:, + max_group_tiered_package_config:, + tiered_with_minimum_config:, + package_with_allocation_config:, + tiered_package_with_minimum_config:, + unit_with_percent_config:, + tiered_with_proration_config:, + unit_with_proration_config:, + grouped_allocation_config:, + grouped_with_prorated_minimum_config:, + grouped_with_metered_minimum_config:, + matrix_with_display_name_config:, + bulk_with_proration_config:, + grouped_tiered_package_config:, + scalable_matrix_with_unit_pricing_config:, + scalable_matrix_with_tiered_pricing_config:, + cumulative_grouped_bulk_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + request_options: {} + ) end sig do override .returns( { - new_floating_price_model: T.any( - Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice - ), + cadence: Symbol, + currency: String, + item_id: String, + model_type: Symbol, + name: String, + unit_config: Orb::Models::PriceCreateParams::UnitConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable(Orb::Models::PriceCreateParams::BillingCycleConfiguration), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable(Orb::Models::PriceCreateParams::InvoicingCycleConfiguration), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + package_config: Orb::Models::PriceCreateParams::PackageConfig, + matrix_config: Orb::Models::PriceCreateParams::MatrixConfig, + matrix_with_allocation_config: Orb::Models::PriceCreateParams::MatrixWithAllocationConfig, + tiered_config: Orb::Models::PriceCreateParams::TieredConfig, + tiered_bps_config: Orb::Models::PriceCreateParams::TieredBpsConfig, + bps_config: Orb::Models::PriceCreateParams::BpsConfig, + bulk_bps_config: Orb::Models::PriceCreateParams::BulkBpsConfig, + bulk_config: Orb::Models::PriceCreateParams::BulkConfig, + threshold_total_amount_config: T::Hash[Symbol, T.anything], + tiered_package_config: T::Hash[Symbol, T.anything], + grouped_tiered_config: T::Hash[Symbol, T.anything], + max_group_tiered_package_config: T::Hash[Symbol, T.anything], + tiered_with_minimum_config: T::Hash[Symbol, T.anything], + package_with_allocation_config: T::Hash[Symbol, T.anything], + tiered_package_with_minimum_config: T::Hash[Symbol, T.anything], + unit_with_percent_config: T::Hash[Symbol, T.anything], + tiered_with_proration_config: T::Hash[Symbol, T.anything], + unit_with_proration_config: T::Hash[Symbol, T.anything], + grouped_allocation_config: T::Hash[Symbol, T.anything], + grouped_with_prorated_minimum_config: T::Hash[Symbol, T.anything], + grouped_with_metered_minimum_config: T::Hash[Symbol, T.anything], + matrix_with_display_name_config: T::Hash[Symbol, T.anything], + bulk_with_proration_config: T::Hash[Symbol, T.anything], + grouped_tiered_package_config: T::Hash[Symbol, T.anything], + scalable_matrix_with_unit_pricing_config: T::Hash[Symbol, T.anything], + scalable_matrix_with_tiered_pricing_config: T::Hash[Symbol, T.anything], + cumulative_grouped_bulk_config: T::Hash[Symbol, T.anything], request_options: Orb::RequestOptions } ) end def to_hash end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class ModelType < Orb::Enum + abstract! + + CUMULATIVE_GROUPED_BULK = :cumulative_grouped_bulk + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class UnitConfig < Orb::BaseModel + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { params(unit_amount: String).void } + def initialize(unit_amount:) + end + + sig { override.returns({unit_amount: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class PackageConfig < Orb::BaseModel + sig { returns(String) } + def package_amount + end + + sig { params(_: String).returns(String) } + def package_amount=(_) + end + + sig { returns(Integer) } + def package_size + end + + sig { params(_: Integer).returns(Integer) } + def package_size=(_) + end + + sig { params(package_amount: String, package_size: Integer).void } + def initialize(package_amount:, package_size:) + end + + sig { override.returns({package_amount: String, package_size: Integer}) } + def to_hash + end + end + + class MatrixConfig < Orb::BaseModel + sig { returns(String) } + def default_unit_amount + end + + sig { params(_: String).returns(String) } + def default_unit_amount=(_) + end + + sig { returns(T::Array[T.nilable(String)]) } + def dimensions + end + + sig { params(_: T::Array[T.nilable(String)]).returns(T::Array[T.nilable(String)]) } + def dimensions=(_) + end + + sig { returns(T::Array[Orb::Models::PriceCreateParams::MatrixConfig::MatrixValue]) } + def matrix_values + end + + sig do + params(_: T::Array[Orb::Models::PriceCreateParams::MatrixConfig::MatrixValue]) + .returns(T::Array[Orb::Models::PriceCreateParams::MatrixConfig::MatrixValue]) + end + def matrix_values=(_) + end + + sig do + params( + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + matrix_values: T::Array[Orb::Models::PriceCreateParams::MatrixConfig::MatrixValue] + ) + .void + end + def initialize(default_unit_amount:, dimensions:, matrix_values:) + end + + sig do + override + .returns( + { + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + matrix_values: T::Array[Orb::Models::PriceCreateParams::MatrixConfig::MatrixValue] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::BaseModel + sig { returns(T::Array[T.nilable(String)]) } + def dimension_values + end + + sig { params(_: T::Array[T.nilable(String)]).returns(T::Array[T.nilable(String)]) } + def dimension_values=(_) + end + + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { params(dimension_values: T::Array[T.nilable(String)], unit_amount: String).void } + def initialize(dimension_values:, unit_amount:) + end + + sig { override.returns({dimension_values: T::Array[T.nilable(String)], unit_amount: String}) } + def to_hash + end + end + end + + class MatrixWithAllocationConfig < Orb::BaseModel + sig { returns(Float) } + def allocation + end + + sig { params(_: Float).returns(Float) } + def allocation=(_) + end + + sig { returns(String) } + def default_unit_amount + end + + sig { params(_: String).returns(String) } + def default_unit_amount=(_) + end + + sig { returns(T::Array[T.nilable(String)]) } + def dimensions + end + + sig { params(_: T::Array[T.nilable(String)]).returns(T::Array[T.nilable(String)]) } + def dimensions=(_) + end + + sig { returns(T::Array[Orb::Models::PriceCreateParams::MatrixWithAllocationConfig::MatrixValue]) } + def matrix_values + end + + sig do + params(_: T::Array[Orb::Models::PriceCreateParams::MatrixWithAllocationConfig::MatrixValue]) + .returns(T::Array[Orb::Models::PriceCreateParams::MatrixWithAllocationConfig::MatrixValue]) + end + def matrix_values=(_) + end + + sig do + params( + allocation: Float, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + matrix_values: T::Array[Orb::Models::PriceCreateParams::MatrixWithAllocationConfig::MatrixValue] + ) + .void + end + def initialize(allocation:, default_unit_amount:, dimensions:, matrix_values:) + end + + sig do + override + .returns( + { + allocation: Float, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + matrix_values: T::Array[Orb::Models::PriceCreateParams::MatrixWithAllocationConfig::MatrixValue] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::BaseModel + sig { returns(T::Array[T.nilable(String)]) } + def dimension_values + end + + sig { params(_: T::Array[T.nilable(String)]).returns(T::Array[T.nilable(String)]) } + def dimension_values=(_) + end + + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { params(dimension_values: T::Array[T.nilable(String)], unit_amount: String).void } + def initialize(dimension_values:, unit_amount:) + end + + sig { override.returns({dimension_values: T::Array[T.nilable(String)], unit_amount: String}) } + def to_hash + end + end + end + + class TieredConfig < Orb::BaseModel + sig { returns(T::Array[Orb::Models::PriceCreateParams::TieredConfig::Tier]) } + def tiers + end + + sig do + params(_: T::Array[Orb::Models::PriceCreateParams::TieredConfig::Tier]) + .returns(T::Array[Orb::Models::PriceCreateParams::TieredConfig::Tier]) + end + def tiers=(_) + end + + sig { params(tiers: T::Array[Orb::Models::PriceCreateParams::TieredConfig::Tier]).void } + def initialize(tiers:) + end + + sig { override.returns({tiers: T::Array[Orb::Models::PriceCreateParams::TieredConfig::Tier]}) } + def to_hash + end + + class Tier < Orb::BaseModel + sig { returns(Float) } + def first_unit + end + + sig { params(_: Float).returns(Float) } + def first_unit=(_) + end + + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { returns(T.nilable(Float)) } + def last_unit + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def last_unit=(_) + end + + sig { params(first_unit: Float, unit_amount: String, last_unit: T.nilable(Float)).void } + def initialize(first_unit:, unit_amount:, last_unit: nil) + end + + sig { override.returns({first_unit: Float, unit_amount: String, last_unit: T.nilable(Float)}) } + def to_hash + end + end + end + + class TieredBpsConfig < Orb::BaseModel + sig { returns(T::Array[Orb::Models::PriceCreateParams::TieredBpsConfig::Tier]) } + def tiers + end + + sig do + params(_: T::Array[Orb::Models::PriceCreateParams::TieredBpsConfig::Tier]) + .returns(T::Array[Orb::Models::PriceCreateParams::TieredBpsConfig::Tier]) + end + def tiers=(_) + end + + sig { params(tiers: T::Array[Orb::Models::PriceCreateParams::TieredBpsConfig::Tier]).void } + def initialize(tiers:) + end + + sig { override.returns({tiers: T::Array[Orb::Models::PriceCreateParams::TieredBpsConfig::Tier]}) } + def to_hash + end + + class Tier < Orb::BaseModel + sig { returns(Float) } + def bps + end + + sig { params(_: Float).returns(Float) } + def bps=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(T.nilable(String)) } + def maximum_amount + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_maximum + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_maximum=(_) + end + + sig do + params( + bps: Float, + minimum_amount: String, + maximum_amount: T.nilable(String), + per_unit_maximum: T.nilable(String) + ) + .void + end + def initialize(bps:, minimum_amount:, maximum_amount: nil, per_unit_maximum: nil) + end + + sig do + override + .returns( + { + bps: Float, + minimum_amount: String, + maximum_amount: T.nilable(String), + per_unit_maximum: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + class BpsConfig < Orb::BaseModel + sig { returns(Float) } + def bps + end + + sig { params(_: Float).returns(Float) } + def bps=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_maximum + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_maximum=(_) + end + + sig { params(bps: Float, per_unit_maximum: T.nilable(String)).void } + def initialize(bps:, per_unit_maximum: nil) + end + + sig { override.returns({bps: Float, per_unit_maximum: T.nilable(String)}) } + def to_hash + end + end + + class BulkBpsConfig < Orb::BaseModel + sig { returns(T::Array[Orb::Models::PriceCreateParams::BulkBpsConfig::Tier]) } + def tiers + end + + sig do + params(_: T::Array[Orb::Models::PriceCreateParams::BulkBpsConfig::Tier]) + .returns(T::Array[Orb::Models::PriceCreateParams::BulkBpsConfig::Tier]) + end + def tiers=(_) + end + + sig { params(tiers: T::Array[Orb::Models::PriceCreateParams::BulkBpsConfig::Tier]).void } + def initialize(tiers:) + end + + sig { override.returns({tiers: T::Array[Orb::Models::PriceCreateParams::BulkBpsConfig::Tier]}) } + def to_hash + end + + class Tier < Orb::BaseModel + sig { returns(Float) } + def bps + end + + sig { params(_: Float).returns(Float) } + def bps=(_) + end + + sig { returns(T.nilable(String)) } + def maximum_amount + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_maximum + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_maximum=(_) + end + + sig do + params(bps: Float, maximum_amount: T.nilable(String), per_unit_maximum: T.nilable(String)).void + end + def initialize(bps:, maximum_amount: nil, per_unit_maximum: nil) + end + + sig do + override.returns( + { + bps: Float, + maximum_amount: T.nilable(String), + per_unit_maximum: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + class BulkConfig < Orb::BaseModel + sig { returns(T::Array[Orb::Models::PriceCreateParams::BulkConfig::Tier]) } + def tiers + end + + sig do + params(_: T::Array[Orb::Models::PriceCreateParams::BulkConfig::Tier]) + .returns(T::Array[Orb::Models::PriceCreateParams::BulkConfig::Tier]) + end + def tiers=(_) + end + + sig { params(tiers: T::Array[Orb::Models::PriceCreateParams::BulkConfig::Tier]).void } + def initialize(tiers:) + end + + sig { override.returns({tiers: T::Array[Orb::Models::PriceCreateParams::BulkConfig::Tier]}) } + def to_hash + end + + class Tier < Orb::BaseModel + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { returns(T.nilable(Float)) } + def maximum_units + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def maximum_units=(_) + end + + sig { params(unit_amount: String, maximum_units: T.nilable(Float)).void } + def initialize(unit_amount:, maximum_units: nil) + end + + sig { override.returns({unit_amount: String, maximum_units: T.nilable(Float)}) } + def to_hash + end + end + end end end end diff --git a/rbi/lib/orb/models/price_interval_fixed_fee_quantity_transition_model.rbi b/rbi/lib/orb/models/price_interval_fixed_fee_quantity_transition_model.rbi deleted file mode 100644 index ee8ee51f..00000000 --- a/rbi/lib/orb/models/price_interval_fixed_fee_quantity_transition_model.rbi +++ /dev/null @@ -1,31 +0,0 @@ -# typed: strong - -module Orb - module Models - class PriceIntervalFixedFeeQuantityTransitionModel < Orb::BaseModel - sig { returns(Time) } - def effective_date - end - - sig { params(_: Time).returns(Time) } - def effective_date=(_) - end - - sig { returns(Integer) } - def quantity - end - - sig { params(_: Integer).returns(Integer) } - def quantity=(_) - end - - sig { params(effective_date: Time, quantity: Integer).void } - def initialize(effective_date:, quantity:) - end - - sig { override.returns({effective_date: Time, quantity: Integer}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/price_interval_model.rbi b/rbi/lib/orb/models/price_interval_model.rbi deleted file mode 100644 index 6a2011f8..00000000 --- a/rbi/lib/orb/models/price_interval_model.rbi +++ /dev/null @@ -1,329 +0,0 @@ -# typed: strong - -module Orb - module Models - class PriceIntervalModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(Integer) } - def billing_cycle_day - end - - sig { params(_: Integer).returns(Integer) } - def billing_cycle_day=(_) - end - - sig { returns(T.nilable(Time)) } - def current_billing_period_end_date - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def current_billing_period_end_date=(_) - end - - sig { returns(T.nilable(Time)) } - def current_billing_period_start_date - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def current_billing_period_start_date=(_) - end - - sig { returns(T.nilable(Time)) } - def end_date - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def end_date=(_) - end - - sig { returns(T.nilable(String)) } - def filter - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def filter=(_) - end - - sig { returns(T.nilable(T::Array[Orb::Models::PriceIntervalModel::FixedFeeQuantityTransition])) } - def fixed_fee_quantity_transitions - end - - sig do - params(_: T.nilable(T::Array[Orb::Models::PriceIntervalModel::FixedFeeQuantityTransition])) - .returns(T.nilable(T::Array[Orb::Models::PriceIntervalModel::FixedFeeQuantityTransition])) - end - def fixed_fee_quantity_transitions=(_) - end - - sig do - returns( - T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice - ) - ) - end - def price - end - - sig do - params( - _: T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice - ) - ) - .returns( - T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice - ) - ) - end - def price=(_) - end - - sig { returns(Time) } - def start_date - end - - sig { params(_: Time).returns(Time) } - def start_date=(_) - end - - sig { returns(T.nilable(T::Array[String])) } - def usage_customer_ids - end - - sig { params(_: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } - def usage_customer_ids=(_) - end - - sig do - params( - id: String, - billing_cycle_day: Integer, - current_billing_period_end_date: T.nilable(Time), - current_billing_period_start_date: T.nilable(Time), - end_date: T.nilable(Time), - filter: T.nilable(String), - fixed_fee_quantity_transitions: T.nilable(T::Array[Orb::Models::PriceIntervalModel::FixedFeeQuantityTransition]), - price: T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice - ), - start_date: Time, - usage_customer_ids: T.nilable(T::Array[String]) - ) - .void - end - def initialize( - id:, - billing_cycle_day:, - current_billing_period_end_date:, - current_billing_period_start_date:, - end_date:, - filter:, - fixed_fee_quantity_transitions:, - price:, - start_date:, - usage_customer_ids: - ) - end - - sig do - override - .returns( - { - id: String, - billing_cycle_day: Integer, - current_billing_period_end_date: T.nilable(Time), - current_billing_period_start_date: T.nilable(Time), - end_date: T.nilable(Time), - filter: T.nilable(String), - fixed_fee_quantity_transitions: T.nilable(T::Array[Orb::Models::PriceIntervalModel::FixedFeeQuantityTransition]), - price: T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice - ), - start_date: Time, - usage_customer_ids: T.nilable(T::Array[String]) - } - ) - end - def to_hash - end - - class FixedFeeQuantityTransition < Orb::BaseModel - sig { returns(Time) } - def effective_date - end - - sig { params(_: Time).returns(Time) } - def effective_date=(_) - end - - sig { returns(String) } - def price_id - end - - sig { params(_: String).returns(String) } - def price_id=(_) - end - - sig { returns(Integer) } - def quantity - end - - sig { params(_: Integer).returns(Integer) } - def quantity=(_) - end - - sig { params(effective_date: Time, price_id: String, quantity: Integer).void } - def initialize(effective_date:, price_id:, quantity:) - end - - sig { override.returns({effective_date: Time, price_id: String, quantity: Integer}) } - def to_hash - end - end - end - end -end diff --git a/rbi/lib/orb/models/price_model.rbi b/rbi/lib/orb/models/price_model.rbi deleted file mode 100644 index 80b8f131..00000000 --- a/rbi/lib/orb/models/price_model.rbi +++ /dev/null @@ -1,10382 +0,0 @@ -# typed: strong - -module Orb - module Models - class PriceModel < Orb::Union - abstract! - - class UnitPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(Orb::Models::UnitConfigModel) } - def unit_config - end - - sig { params(_: Orb::Models::UnitConfigModel).returns(Orb::Models::UnitConfigModel) } - def unit_config=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - unit_config: Orb::Models::UnitConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - unit_config:, - dimensional_price_configuration: nil, - model_type: :unit - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - unit_config: Orb::Models::UnitConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class PackagePrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::PackageConfigModel) } - def package_config - end - - sig { params(_: Orb::Models::PackageConfigModel).returns(Orb::Models::PackageConfigModel) } - def package_config=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - package_config: Orb::Models::PackageConfigModel, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - package_config:, - plan_phase_order:, - price_type:, - dimensional_price_configuration: nil, - model_type: :package - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - package_config: Orb::Models::PackageConfigModel, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class MatrixPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(Orb::Models::MatrixConfigModel) } - def matrix_config - end - - sig { params(_: Orb::Models::MatrixConfigModel).returns(Orb::Models::MatrixConfigModel) } - def matrix_config=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - matrix_config: Orb::Models::MatrixConfigModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - invoicing_cycle_configuration:, - item:, - matrix_config:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - dimensional_price_configuration: nil, - model_type: :matrix - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - matrix_config: Orb::Models::MatrixConfigModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class TieredPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(Orb::Models::TieredConfigModel) } - def tiered_config - end - - sig { params(_: Orb::Models::TieredConfigModel).returns(Orb::Models::TieredConfigModel) } - def tiered_config=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - tiered_config: Orb::Models::TieredConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - tiered_config:, - dimensional_price_configuration: nil, - model_type: :tiered - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - tiered_config: Orb::Models::TieredConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class TieredBpsPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(Orb::Models::TieredBpsConfigModel) } - def tiered_bps_config - end - - sig { params(_: Orb::Models::TieredBpsConfigModel).returns(Orb::Models::TieredBpsConfigModel) } - def tiered_bps_config=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - tiered_bps_config: Orb::Models::TieredBpsConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - tiered_bps_config:, - dimensional_price_configuration: nil, - model_type: :tiered_bps - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - tiered_bps_config: Orb::Models::TieredBpsConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class BpsPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::BpsConfigModel) } - def bps_config - end - - sig { params(_: Orb::Models::BpsConfigModel).returns(Orb::Models::BpsConfigModel) } - def bps_config=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bps_config: Orb::Models::BpsConfigModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - bps_config:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - dimensional_price_configuration: nil, - model_type: :bps - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bps_config: Orb::Models::BpsConfigModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class BulkBpsPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::BulkBpsConfigModel) } - def bulk_bps_config - end - - sig { params(_: Orb::Models::BulkBpsConfigModel).returns(Orb::Models::BulkBpsConfigModel) } - def bulk_bps_config=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_bps_config: Orb::Models::BulkBpsConfigModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - bulk_bps_config:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - dimensional_price_configuration: nil, - model_type: :bulk_bps - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_bps_config: Orb::Models::BulkBpsConfigModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class BulkPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::BulkConfigModel) } - def bulk_config - end - - sig { params(_: Orb::Models::BulkConfigModel).returns(Orb::Models::BulkConfigModel) } - def bulk_config=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_config: Orb::Models::BulkConfigModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - bulk_config:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - dimensional_price_configuration: nil, - model_type: :bulk - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_config: Orb::Models::BulkConfigModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class ThresholdTotalAmountPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def threshold_total_amount_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def threshold_total_amount_config=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - threshold_total_amount_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - threshold_total_amount_config:, - dimensional_price_configuration: nil, - model_type: :threshold_total_amount - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - threshold_total_amount_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class TieredPackagePrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def tiered_package_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def tiered_package_config=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - tiered_package_config:, - dimensional_price_configuration: nil, - model_type: :tiered_package - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class GroupedTieredPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def grouped_tiered_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def grouped_tiered_config=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - grouped_tiered_config: Orb::Models::CustomRatingFunctionConfigModel, - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - grouped_tiered_config:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - dimensional_price_configuration: nil, - model_type: :grouped_tiered - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - grouped_tiered_config: Orb::Models::CustomRatingFunctionConfigModel, - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class TieredWithMinimumPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def tiered_with_minimum_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def tiered_with_minimum_config=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - tiered_with_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - tiered_with_minimum_config:, - dimensional_price_configuration: nil, - model_type: :tiered_with_minimum - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - tiered_with_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class TieredPackageWithMinimumPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def tiered_package_with_minimum_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def tiered_package_with_minimum_config=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - tiered_package_with_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - tiered_package_with_minimum_config:, - dimensional_price_configuration: nil, - model_type: :tiered_package_with_minimum - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - tiered_package_with_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class PackageWithAllocationPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def package_with_allocation_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def package_with_allocation_config=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - package_with_allocation_config: Orb::Models::CustomRatingFunctionConfigModel, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - package_with_allocation_config:, - plan_phase_order:, - price_type:, - dimensional_price_configuration: nil, - model_type: :package_with_allocation - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - package_with_allocation_config: Orb::Models::CustomRatingFunctionConfigModel, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class UnitWithPercentPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def unit_with_percent_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def unit_with_percent_config=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - unit_with_percent_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - unit_with_percent_config:, - dimensional_price_configuration: nil, - model_type: :unit_with_percent - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - unit_with_percent_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class MatrixWithAllocationPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(Orb::Models::MatrixWithAllocationConfigModel) } - def matrix_with_allocation_config - end - - sig do - params(_: Orb::Models::MatrixWithAllocationConfigModel) - .returns(Orb::Models::MatrixWithAllocationConfigModel) - end - def matrix_with_allocation_config=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - matrix_with_allocation_config: Orb::Models::MatrixWithAllocationConfigModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - invoicing_cycle_configuration:, - item:, - matrix_with_allocation_config:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - dimensional_price_configuration: nil, - model_type: :matrix_with_allocation - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - matrix_with_allocation_config: Orb::Models::MatrixWithAllocationConfigModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class TieredWithProrationPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def tiered_with_proration_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def tiered_with_proration_config=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - tiered_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - tiered_with_proration_config:, - dimensional_price_configuration: nil, - model_type: :tiered_with_proration - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - tiered_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class UnitWithProrationPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def unit_with_proration_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def unit_with_proration_config=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - unit_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - unit_with_proration_config:, - dimensional_price_configuration: nil, - model_type: :unit_with_proration - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - unit_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class GroupedAllocationPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def grouped_allocation_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def grouped_allocation_config=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - grouped_allocation_config: Orb::Models::CustomRatingFunctionConfigModel, - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - grouped_allocation_config:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - dimensional_price_configuration: nil, - model_type: :grouped_allocation - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - grouped_allocation_config: Orb::Models::CustomRatingFunctionConfigModel, - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class GroupedWithProratedMinimumPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def grouped_with_prorated_minimum_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def grouped_with_prorated_minimum_config=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - grouped_with_prorated_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - grouped_with_prorated_minimum_config:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - dimensional_price_configuration: nil, - model_type: :grouped_with_prorated_minimum - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - grouped_with_prorated_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class GroupedWithMeteredMinimumPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def grouped_with_metered_minimum_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def grouped_with_metered_minimum_config=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - grouped_with_metered_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - grouped_with_metered_minimum_config:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - dimensional_price_configuration: nil, - model_type: :grouped_with_metered_minimum - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - grouped_with_metered_minimum_config: Orb::Models::CustomRatingFunctionConfigModel, - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class MatrixWithDisplayNamePrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def matrix_with_display_name_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def matrix_with_display_name_config=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - matrix_with_display_name_config: Orb::Models::CustomRatingFunctionConfigModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - invoicing_cycle_configuration:, - item:, - matrix_with_display_name_config:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - dimensional_price_configuration: nil, - model_type: :matrix_with_display_name - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - matrix_with_display_name_config: Orb::Models::CustomRatingFunctionConfigModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class BulkWithProrationPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def bulk_with_proration_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def bulk_with_proration_config=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - bulk_with_proration_config:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - dimensional_price_configuration: nil, - model_type: :bulk_with_proration - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_with_proration_config: Orb::Models::CustomRatingFunctionConfigModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class GroupedTieredPackagePrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def grouped_tiered_package_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def grouped_tiered_package_config=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - grouped_tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - grouped_tiered_package_config:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - dimensional_price_configuration: nil, - model_type: :grouped_tiered_package - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - grouped_tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class MaxGroupTieredPackagePrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def max_group_tiered_package_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def max_group_tiered_package_config=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - max_group_tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - invoicing_cycle_configuration:, - item:, - max_group_tiered_package_config:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - dimensional_price_configuration: nil, - model_type: :max_group_tiered_package - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - max_group_tiered_package_config: Orb::Models::CustomRatingFunctionConfigModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class ScalableMatrixWithUnitPricingPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def scalable_matrix_with_unit_pricing_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def scalable_matrix_with_unit_pricing_config=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - scalable_matrix_with_unit_pricing_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - scalable_matrix_with_unit_pricing_config:, - dimensional_price_configuration: nil, - model_type: :scalable_matrix_with_unit_pricing - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - scalable_matrix_with_unit_pricing_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class ScalableMatrixWithTieredPricingPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def scalable_matrix_with_tiered_pricing_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def scalable_matrix_with_tiered_pricing_config=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - scalable_matrix_with_tiered_pricing_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - scalable_matrix_with_tiered_pricing_config:, - dimensional_price_configuration: nil, - model_type: :scalable_matrix_with_tiered_pricing - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - scalable_matrix_with_tiered_pricing_config: Orb::Models::CustomRatingFunctionConfigModel, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - class CumulativeGroupedBulkPrice < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Orb::Models::BillableMetricTinyModel)) } - def billable_metric - end - - sig do - params(_: T.nilable(Orb::Models::BillableMetricTinyModel)) - .returns(T.nilable(Orb::Models::BillableMetricTinyModel)) - end - def billable_metric=(_) - end - - sig { returns(Orb::Models::BillingCycleConfigurationModel) } - def billing_cycle_configuration - end - - sig do - params(_: Orb::Models::BillingCycleConfigurationModel).returns(Orb::Models::BillingCycleConfigurationModel) - end - def billing_cycle_configuration=(_) - end - - sig { returns(Symbol) } - def cadence - end - - sig { params(_: Symbol).returns(Symbol) } - def cadence=(_) - end - - sig { returns(T.nilable(Float)) } - def conversion_rate - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def conversion_rate=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation - end - - sig { params(_: T.nilable(Orb::Models::AllocationModel)).returns(T.nilable(Orb::Models::AllocationModel)) } - def credit_allocation=(_) - end - - sig { returns(Orb::Models::CustomRatingFunctionConfigModel) } - def cumulative_grouped_bulk_config - end - - sig do - params(_: Orb::Models::CustomRatingFunctionConfigModel) - .returns(Orb::Models::CustomRatingFunctionConfigModel) - end - def cumulative_grouped_bulk_config=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig do - returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount - end - - sig do - params( - _: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - .returns( - T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ) - ) - end - def discount=(_) - end - - sig { returns(T.nilable(String)) } - def external_price_id - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def external_price_id=(_) - end - - sig { returns(T.nilable(Float)) } - def fixed_price_quantity - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def fixed_price_quantity=(_) - end - - sig { returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) } - def invoicing_cycle_configuration - end - - sig do - params(_: T.nilable(Orb::Models::BillingCycleConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleConfigurationModel)) - end - def invoicing_cycle_configuration=(_) - end - - sig { returns(Orb::Models::ItemSlimModel) } - def item - end - - sig { params(_: Orb::Models::ItemSlimModel).returns(Orb::Models::ItemSlimModel) } - def item=(_) - end - - sig { returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum - end - - sig { params(_: T.nilable(Orb::Models::MaximumModel)).returns(T.nilable(Orb::Models::MaximumModel)) } - def maximum=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum - end - - sig { params(_: T.nilable(Orb::Models::MinimumModel)).returns(T.nilable(Orb::Models::MinimumModel)) } - def minimum=(_) - end - - sig { returns(T.nilable(String)) } - def minimum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def minimum_amount=(_) - end - - sig { returns(Symbol) } - def model_type - end - - sig { params(_: Symbol).returns(Symbol) } - def model_type=(_) - end - - sig { returns(String) } - def name - end - - sig { params(_: String).returns(String) } - def name=(_) - end - - sig { returns(T.nilable(Integer)) } - def plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def plan_phase_order=(_) - end - - sig { returns(Symbol) } - def price_type - end - - sig { params(_: Symbol).returns(Symbol) } - def price_type=(_) - end - - sig { returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) } - def dimensional_price_configuration - end - - sig do - params(_: T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - .returns(T.nilable(Orb::Models::DimensionalPriceConfigurationModel)) - end - def dimensional_price_configuration=(_) - end - - sig do - params( - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - cumulative_grouped_bulk_config: Orb::Models::CustomRatingFunctionConfigModel, - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel), - model_type: Symbol - ) - .void - end - def initialize( - id:, - billable_metric:, - billing_cycle_configuration:, - cadence:, - conversion_rate:, - created_at:, - credit_allocation:, - cumulative_grouped_bulk_config:, - currency:, - discount:, - external_price_id:, - fixed_price_quantity:, - invoicing_cycle_configuration:, - item:, - maximum:, - maximum_amount:, - metadata:, - minimum:, - minimum_amount:, - name:, - plan_phase_order:, - price_type:, - dimensional_price_configuration: nil, - model_type: :cumulative_grouped_bulk - ) - end - - sig do - override - .returns( - { - id: String, - billable_metric: T.nilable(Orb::Models::BillableMetricTinyModel), - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Symbol, - conversion_rate: T.nilable(Float), - created_at: Time, - credit_allocation: T.nilable(Orb::Models::AllocationModel), - cumulative_grouped_bulk_config: Orb::Models::CustomRatingFunctionConfigModel, - currency: String, - discount: T.nilable( - T.any( - Orb::Models::PercentageDiscount, - Orb::Models::TrialDiscount, - Orb::Models::Discount::UsageDiscount, - Orb::Models::AmountDiscount - ) - ), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoicing_cycle_configuration: T.nilable(Orb::Models::BillingCycleConfigurationModel), - item: Orb::Models::ItemSlimModel, - maximum: T.nilable(Orb::Models::MaximumModel), - maximum_amount: T.nilable(String), - metadata: T::Hash[Symbol, String], - minimum: T.nilable(Orb::Models::MinimumModel), - minimum_amount: T.nilable(String), - model_type: Symbol, - name: String, - plan_phase_order: T.nilable(Integer), - price_type: Symbol, - dimensional_price_configuration: T.nilable(Orb::Models::DimensionalPriceConfigurationModel) - } - ) - end - def to_hash - end - - class Cadence < Orb::Enum - abstract! - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - - class PriceType < Orb::Enum - abstract! - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - - sig do - override - .returns( - [[Symbol, Orb::Models::PriceModel::UnitPrice], [Symbol, Orb::Models::PriceModel::PackagePrice], [Symbol, Orb::Models::PriceModel::MatrixPrice], [Symbol, Orb::Models::PriceModel::TieredPrice], [Symbol, Orb::Models::PriceModel::TieredBpsPrice], [Symbol, Orb::Models::PriceModel::BpsPrice], [Symbol, Orb::Models::PriceModel::BulkBpsPrice], [Symbol, Orb::Models::PriceModel::BulkPrice], [Symbol, Orb::Models::PriceModel::ThresholdTotalAmountPrice], [Symbol, Orb::Models::PriceModel::TieredPackagePrice], [Symbol, Orb::Models::PriceModel::GroupedTieredPrice], [Symbol, Orb::Models::PriceModel::TieredWithMinimumPrice], [Symbol, Orb::Models::PriceModel::TieredPackageWithMinimumPrice], [Symbol, Orb::Models::PriceModel::PackageWithAllocationPrice], [Symbol, Orb::Models::PriceModel::UnitWithPercentPrice], [Symbol, Orb::Models::PriceModel::MatrixWithAllocationPrice], [Symbol, Orb::Models::PriceModel::TieredWithProrationPrice], [Symbol, Orb::Models::PriceModel::UnitWithProrationPrice], [Symbol, Orb::Models::PriceModel::GroupedAllocationPrice], [Symbol, Orb::Models::PriceModel::GroupedWithProratedMinimumPrice], [Symbol, Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice], [Symbol, Orb::Models::PriceModel::MatrixWithDisplayNamePrice], [Symbol, Orb::Models::PriceModel::BulkWithProrationPrice], [Symbol, Orb::Models::PriceModel::GroupedTieredPackagePrice], [Symbol, Orb::Models::PriceModel::MaxGroupTieredPackagePrice], [Symbol, Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice], [Symbol, Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice], [Symbol, Orb::Models::PriceModel::CumulativeGroupedBulkPrice]] - ) - end - private_class_method def self.variants - end - end - end -end diff --git a/rbi/lib/orb/models/replace_subscription_adjustment_params.rbi b/rbi/lib/orb/models/replace_subscription_adjustment_params.rbi index 69a57ecc..15569d3b 100644 --- a/rbi/lib/orb/models/replace_subscription_adjustment_params.rbi +++ b/rbi/lib/orb/models/replace_subscription_adjustment_params.rbi @@ -6,11 +6,11 @@ module Orb sig do returns( T.any( - Orb::Models::NewAdjustmentModel::NewPercentageDiscount, - Orb::Models::NewAdjustmentModel::NewUsageDiscount, - Orb::Models::NewAdjustmentModel::NewAmountDiscount, - Orb::Models::NewAdjustmentModel::NewMinimum, - Orb::Models::NewAdjustmentModel::NewMaximum + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount, + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount, + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount, + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMinimum, + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMaximum ) ) end @@ -20,20 +20,20 @@ module Orb sig do params( _: T.any( - Orb::Models::NewAdjustmentModel::NewPercentageDiscount, - Orb::Models::NewAdjustmentModel::NewUsageDiscount, - Orb::Models::NewAdjustmentModel::NewAmountDiscount, - Orb::Models::NewAdjustmentModel::NewMinimum, - Orb::Models::NewAdjustmentModel::NewMaximum + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount, + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount, + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount, + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMinimum, + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMaximum ) ) .returns( T.any( - Orb::Models::NewAdjustmentModel::NewPercentageDiscount, - Orb::Models::NewAdjustmentModel::NewUsageDiscount, - Orb::Models::NewAdjustmentModel::NewAmountDiscount, - Orb::Models::NewAdjustmentModel::NewMinimum, - Orb::Models::NewAdjustmentModel::NewMaximum + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount, + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount, + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount, + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMinimum, + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMaximum ) ) end @@ -51,11 +51,11 @@ module Orb sig do params( adjustment: T.any( - Orb::Models::NewAdjustmentModel::NewPercentageDiscount, - Orb::Models::NewAdjustmentModel::NewUsageDiscount, - Orb::Models::NewAdjustmentModel::NewAmountDiscount, - Orb::Models::NewAdjustmentModel::NewMinimum, - Orb::Models::NewAdjustmentModel::NewMaximum + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount, + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount, + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount, + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMinimum, + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMaximum ), replaces_adjustment_id: String ) @@ -69,11 +69,11 @@ module Orb .returns( { adjustment: T.any( - Orb::Models::NewAdjustmentModel::NewPercentageDiscount, - Orb::Models::NewAdjustmentModel::NewUsageDiscount, - Orb::Models::NewAdjustmentModel::NewAmountDiscount, - Orb::Models::NewAdjustmentModel::NewMinimum, - Orb::Models::NewAdjustmentModel::NewMaximum + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount, + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount, + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount, + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMinimum, + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMaximum ), replaces_adjustment_id: String } @@ -81,6 +81,355 @@ module Orb end def to_hash end + + class Adjustment < Orb::Union + abstract! + + class NewPercentageDiscount < Orb::BaseModel + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + percentage_discount: Float, + is_invoice_level: T::Boolean, + adjustment_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + percentage_discount:, + is_invoice_level: nil, + adjustment_type: :percentage_discount + ) + end + + sig do + override + .returns( + { + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + percentage_discount: Float, + is_invoice_level: T::Boolean + } + ) + end + def to_hash + end + end + + class NewUsageDiscount < Orb::BaseModel + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + usage_discount: Float, + is_invoice_level: T::Boolean, + adjustment_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + usage_discount:, + is_invoice_level: nil, + adjustment_type: :usage_discount + ) + end + + sig do + override + .returns( + { + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + usage_discount: Float, + is_invoice_level: T::Boolean + } + ) + end + def to_hash + end + end + + class NewAmountDiscount < Orb::BaseModel + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig do + params( + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + adjustment_type: Symbol + ) + .void + end + def initialize( + amount_discount:, + applies_to_price_ids:, + is_invoice_level: nil, + adjustment_type: :amount_discount + ) + end + + sig do + override + .returns( + { + adjustment_type: Symbol, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean + } + ) + end + def to_hash + end + end + + class NewMinimum < Orb::BaseModel + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + item_id: String, + minimum_amount: String, + is_invoice_level: T::Boolean, + adjustment_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + item_id:, + minimum_amount:, + is_invoice_level: nil, + adjustment_type: :minimum + ) + end + + sig do + override + .returns( + { + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + item_id: String, + minimum_amount: String, + is_invoice_level: T::Boolean + } + ) + end + def to_hash + end + end + + class NewMaximum < Orb::BaseModel + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + maximum_amount: String, + is_invoice_level: T::Boolean, + adjustment_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + maximum_amount:, + is_invoice_level: nil, + adjustment_type: :maximum + ) + end + + sig do + override + .returns( + { + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + maximum_amount: String, + is_invoice_level: T::Boolean + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount], [Symbol, Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount], [Symbol, Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount], [Symbol, Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMinimum], [Symbol, Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMaximum]] + ) + end + private_class_method def self.variants + end + end end end end diff --git a/rbi/lib/orb/models/replace_subscription_price_params.rbi b/rbi/lib/orb/models/replace_subscription_price_params.rbi index 5ee81ffc..e661c691 100644 --- a/rbi/lib/orb/models/replace_subscription_price_params.rbi +++ b/rbi/lib/orb/models/replace_subscription_price_params.rbi @@ -11,24 +11,24 @@ module Orb def replaces_price_id=(_) end - sig { returns(T.nilable(Orb::Models::NewAllocationPriceModel)) } + sig { returns(T.nilable(Orb::Models::ReplaceSubscriptionPriceParams::AllocationPrice)) } def allocation_price end sig do - params(_: T.nilable(Orb::Models::NewAllocationPriceModel)) - .returns(T.nilable(Orb::Models::NewAllocationPriceModel)) + params(_: T.nilable(Orb::Models::ReplaceSubscriptionPriceParams::AllocationPrice)) + .returns(T.nilable(Orb::Models::ReplaceSubscriptionPriceParams::AllocationPrice)) end def allocation_price=(_) end - sig { returns(T.nilable(T::Array[Orb::Models::DiscountOverrideModel])) } + sig { returns(T.nilable(T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Discount])) } def discounts end sig do - params(_: T.nilable(T::Array[Orb::Models::DiscountOverrideModel])) - .returns(T.nilable(T::Array[Orb::Models::DiscountOverrideModel])) + params(_: T.nilable(T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Discount])) + .returns(T.nilable(T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Discount])) end def discounts=(_) end @@ -69,31 +69,31 @@ module Orb returns( T.nilable( T.any( - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice ) ) ) @@ -105,62 +105,62 @@ module Orb params( _: T.nilable( T.any( - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice ) ) ) .returns( T.nilable( T.any( - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice ) ) ) @@ -179,39 +179,39 @@ module Orb sig do params( replaces_price_id: String, - allocation_price: T.nilable(Orb::Models::NewAllocationPriceModel), - discounts: T.nilable(T::Array[Orb::Models::DiscountOverrideModel]), + allocation_price: T.nilable(Orb::Models::ReplaceSubscriptionPriceParams::AllocationPrice), + discounts: T.nilable(T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Discount]), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), maximum_amount: T.nilable(String), minimum_amount: T.nilable(String), price: T.nilable( T.any( - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice ) ), price_id: T.nilable(String) @@ -236,39 +236,39 @@ module Orb .returns( { replaces_price_id: String, - allocation_price: T.nilable(Orb::Models::NewAllocationPriceModel), - discounts: T.nilable(T::Array[Orb::Models::DiscountOverrideModel]), + allocation_price: T.nilable(Orb::Models::ReplaceSubscriptionPriceParams::AllocationPrice), + discounts: T.nilable(T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Discount]), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), maximum_amount: T.nilable(String), minimum_amount: T.nilable(String), price: T.nilable( T.any( - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice ) ), price_id: T.nilable(String) @@ -277,6 +277,8959 @@ module Orb end def to_hash end + + class AllocationPrice < Orb::BaseModel + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(T::Boolean) } + def expires_at_end_of_cadence + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def expires_at_end_of_cadence=(_) + end + + sig do + params( + amount: String, + cadence: Symbol, + currency: String, + expires_at_end_of_cadence: T::Boolean + ).void + end + def initialize(amount:, cadence:, currency:, expires_at_end_of_cadence:) + end + + sig do + override + .returns({ + amount: String, + cadence: Symbol, + currency: String, + expires_at_end_of_cadence: T::Boolean + }) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Discount < Orb::BaseModel + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(String)) } + def amount_discount + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def amount_discount=(_) + end + + sig { returns(T.nilable(Float)) } + def percentage_discount + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def percentage_discount=(_) + end + + sig { returns(T.nilable(Float)) } + def usage_discount + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def usage_discount=(_) + end + + sig do + params( + discount_type: Symbol, + amount_discount: T.nilable(String), + percentage_discount: T.nilable(Float), + usage_discount: T.nilable(Float) + ) + .void + end + def initialize(discount_type:, amount_discount: nil, percentage_discount: nil, usage_discount: nil) + end + + sig do + override + .returns( + { + discount_type: Symbol, + amount_discount: T.nilable(String), + percentage_discount: T.nilable(Float), + usage_discount: T.nilable(Float) + } + ) + end + def to_hash + end + + class DiscountType < Orb::Enum + abstract! + + PERCENTAGE = :percentage + USAGE = :usage + AMOUNT = :amount + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class Price < Orb::Union + abstract! + + class NewSubscriptionUnitPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::UnitConfig) } + def unit_config + end + + sig do + params(_: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::UnitConfig) + .returns(Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::UnitConfig) + end + def unit_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + unit_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::UnitConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + unit_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :unit + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + unit_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::UnitConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class UnitConfig < Orb::BaseModel + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { params(unit_amount: String).void } + def initialize(unit_amount:) + end + + sig { override.returns({unit_amount: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionPackagePrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::PackageConfig) } + def package_config + end + + sig do + params(_: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::PackageConfig) + .returns(Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::PackageConfig) + end + def package_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + package_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::PackageConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + package_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :package + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + package_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::PackageConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class PackageConfig < Orb::BaseModel + sig { returns(String) } + def package_amount + end + + sig { params(_: String).returns(String) } + def package_amount=(_) + end + + sig { returns(Integer) } + def package_size + end + + sig { params(_: Integer).returns(Integer) } + def package_size=(_) + end + + sig { params(package_amount: String, package_size: Integer).void } + def initialize(package_amount:, package_size:) + end + + sig { override.returns({package_amount: String, package_size: Integer}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionMatrixPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig) } + def matrix_config + end + + sig do + params(_: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig) + .returns(Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig) + end + def matrix_config=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + matrix_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + matrix_config:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :matrix + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + matrix_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class MatrixConfig < Orb::BaseModel + sig { returns(String) } + def default_unit_amount + end + + sig { params(_: String).returns(String) } + def default_unit_amount=(_) + end + + sig { returns(T::Array[T.nilable(String)]) } + def dimensions + end + + sig { params(_: T::Array[T.nilable(String)]).returns(T::Array[T.nilable(String)]) } + def dimensions=(_) + end + + sig do + returns( + T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig::MatrixValue] + ) + end + def matrix_values + end + + sig do + params( + _: T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig::MatrixValue] + ) + .returns( + T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig::MatrixValue] + ) + end + def matrix_values=(_) + end + + sig do + params( + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + matrix_values: T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig::MatrixValue] + ) + .void + end + def initialize(default_unit_amount:, dimensions:, matrix_values:) + end + + sig do + override + .returns( + { + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + matrix_values: T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig::MatrixValue] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::BaseModel + sig { returns(T::Array[T.nilable(String)]) } + def dimension_values + end + + sig { params(_: T::Array[T.nilable(String)]).returns(T::Array[T.nilable(String)]) } + def dimension_values=(_) + end + + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { params(dimension_values: T::Array[T.nilable(String)], unit_amount: String).void } + def initialize(dimension_values:, unit_amount:) + end + + sig { override.returns({dimension_values: T::Array[T.nilable(String)], unit_amount: String}) } + def to_hash + end + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionTieredPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig) } + def tiered_config + end + + sig do + params(_: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig) + .returns(Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig) + end + def tiered_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + tiered_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + tiered_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :tiered + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + tiered_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class TieredConfig < Orb::BaseModel + sig do + returns( + T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig::Tier] + ) + end + def tiers + end + + sig do + params( + _: T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig::Tier] + ) + .returns( + T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig::Tier] + ) + end + def tiers=(_) + end + + sig do + params( + tiers: T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig::Tier] + ) + .void + end + def initialize(tiers:) + end + + sig do + override + .returns( + { + tiers: T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig::Tier] + } + ) + end + def to_hash + end + + class Tier < Orb::BaseModel + sig { returns(Float) } + def first_unit + end + + sig { params(_: Float).returns(Float) } + def first_unit=(_) + end + + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { returns(T.nilable(Float)) } + def last_unit + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def last_unit=(_) + end + + sig { params(first_unit: Float, unit_amount: String, last_unit: T.nilable(Float)).void } + def initialize(first_unit:, unit_amount:, last_unit: nil) + end + + sig { override.returns({first_unit: Float, unit_amount: String, last_unit: T.nilable(Float)}) } + def to_hash + end + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionTieredBpsPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig do + returns( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig + ) + end + def tiered_bps_config + end + + sig do + params( + _: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig + ) + .returns( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig + ) + end + def tiered_bps_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + tiered_bps_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + tiered_bps_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :tiered_bps + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + tiered_bps_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class TieredBpsConfig < Orb::BaseModel + sig do + returns( + T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig::Tier] + ) + end + def tiers + end + + sig do + params( + _: T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig::Tier] + ) + .returns( + T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig::Tier] + ) + end + def tiers=(_) + end + + sig do + params( + tiers: T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig::Tier] + ) + .void + end + def initialize(tiers:) + end + + sig do + override + .returns( + { + tiers: T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig::Tier] + } + ) + end + def to_hash + end + + class Tier < Orb::BaseModel + sig { returns(Float) } + def bps + end + + sig { params(_: Float).returns(Float) } + def bps=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(T.nilable(String)) } + def maximum_amount + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_maximum + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_maximum=(_) + end + + sig do + params( + bps: Float, + minimum_amount: String, + maximum_amount: T.nilable(String), + per_unit_maximum: T.nilable(String) + ) + .void + end + def initialize(bps:, minimum_amount:, maximum_amount: nil, per_unit_maximum: nil) + end + + sig do + override + .returns( + { + bps: Float, + minimum_amount: String, + maximum_amount: T.nilable(String), + per_unit_maximum: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionBpsPrice < Orb::BaseModel + sig { returns(Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig) } + def bps_config + end + + sig do + params(_: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig) + .returns(Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig) + end + def bps_config=(_) + end + + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + bps_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig, + cadence: Symbol, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + bps_config:, + cadence:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :bps + ) + end + + sig do + override + .returns( + { + bps_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig, + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class BpsConfig < Orb::BaseModel + sig { returns(Float) } + def bps + end + + sig { params(_: Float).returns(Float) } + def bps=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_maximum + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_maximum=(_) + end + + sig { params(bps: Float, per_unit_maximum: T.nilable(String)).void } + def initialize(bps:, per_unit_maximum: nil) + end + + sig { override.returns({bps: Float, per_unit_maximum: T.nilable(String)}) } + def to_hash + end + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionBulkBpsPrice < Orb::BaseModel + sig { returns(Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig) } + def bulk_bps_config + end + + sig do + params(_: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig) + .returns(Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig) + end + def bulk_bps_config=(_) + end + + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + bulk_bps_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig, + cadence: Symbol, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + bulk_bps_config:, + cadence:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :bulk_bps + ) + end + + sig do + override + .returns( + { + bulk_bps_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig, + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class BulkBpsConfig < Orb::BaseModel + sig do + returns( + T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig::Tier] + ) + end + def tiers + end + + sig do + params( + _: T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig::Tier] + ) + .returns( + T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig::Tier] + ) + end + def tiers=(_) + end + + sig do + params( + tiers: T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig::Tier] + ) + .void + end + def initialize(tiers:) + end + + sig do + override + .returns( + { + tiers: T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig::Tier] + } + ) + end + def to_hash + end + + class Tier < Orb::BaseModel + sig { returns(Float) } + def bps + end + + sig { params(_: Float).returns(Float) } + def bps=(_) + end + + sig { returns(T.nilable(String)) } + def maximum_amount + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_maximum + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_maximum=(_) + end + + sig do + params( + bps: Float, + maximum_amount: T.nilable(String), + per_unit_maximum: T.nilable(String) + ).void + end + def initialize(bps:, maximum_amount: nil, per_unit_maximum: nil) + end + + sig do + override.returns( + { + bps: Float, + maximum_amount: T.nilable(String), + per_unit_maximum: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionBulkPrice < Orb::BaseModel + sig { returns(Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig) } + def bulk_config + end + + sig do + params(_: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig) + .returns(Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig) + end + def bulk_config=(_) + end + + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + bulk_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig, + cadence: Symbol, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + bulk_config:, + cadence:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :bulk + ) + end + + sig do + override + .returns( + { + bulk_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig, + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class BulkConfig < Orb::BaseModel + sig do + returns( + T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig::Tier] + ) + end + def tiers + end + + sig do + params( + _: T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig::Tier] + ) + .returns( + T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig::Tier] + ) + end + def tiers=(_) + end + + sig do + params( + tiers: T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig::Tier] + ) + .void + end + def initialize(tiers:) + end + + sig do + override + .returns( + { + tiers: T::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig::Tier] + } + ) + end + def to_hash + end + + class Tier < Orb::BaseModel + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { returns(T.nilable(Float)) } + def maximum_units + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def maximum_units=(_) + end + + sig { params(unit_amount: String, maximum_units: T.nilable(Float)).void } + def initialize(unit_amount:, maximum_units: nil) + end + + sig { override.returns({unit_amount: String, maximum_units: T.nilable(Float)}) } + def to_hash + end + end + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionThresholdTotalAmountPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def threshold_total_amount_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def threshold_total_amount_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + threshold_total_amount_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + threshold_total_amount_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :threshold_total_amount + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + threshold_total_amount_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionTieredPackagePrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def tiered_package_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def tiered_package_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + tiered_package_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + tiered_package_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :tiered_package + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + tiered_package_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionTieredWithMinimumPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def tiered_with_minimum_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def tiered_with_minimum_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + tiered_with_minimum_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + tiered_with_minimum_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :tiered_with_minimum + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + tiered_with_minimum_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionUnitWithPercentPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def unit_with_percent_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def unit_with_percent_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + unit_with_percent_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + unit_with_percent_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :unit_with_percent + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + unit_with_percent_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionPackageWithAllocationPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def package_with_allocation_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def package_with_allocation_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + package_with_allocation_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + package_with_allocation_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :package_with_allocation + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + package_with_allocation_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionTierWithProrationPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def tiered_with_proration_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def tiered_with_proration_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + tiered_with_proration_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + tiered_with_proration_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :tiered_with_proration + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + tiered_with_proration_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionUnitWithProrationPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def unit_with_proration_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def unit_with_proration_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + unit_with_proration_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + unit_with_proration_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :unit_with_proration + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + unit_with_proration_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionGroupedAllocationPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def grouped_allocation_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def grouped_allocation_config=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + grouped_allocation_config: T::Hash[Symbol, T.anything], + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + grouped_allocation_config:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :grouped_allocation + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + grouped_allocation_config: T::Hash[Symbol, T.anything], + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionGroupedWithProratedMinimumPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def grouped_with_prorated_minimum_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def grouped_with_prorated_minimum_config=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + grouped_with_prorated_minimum_config: T::Hash[Symbol, T.anything], + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + grouped_with_prorated_minimum_config:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :grouped_with_prorated_minimum + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + grouped_with_prorated_minimum_config: T::Hash[Symbol, T.anything], + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionBulkWithProrationPrice < Orb::BaseModel + sig { returns(T::Hash[Symbol, T.anything]) } + def bulk_with_proration_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def bulk_with_proration_config=(_) + end + + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + bulk_with_proration_config: T::Hash[Symbol, T.anything], + cadence: Symbol, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + bulk_with_proration_config:, + cadence:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :bulk_with_proration + ) + end + + sig do + override + .returns( + { + bulk_with_proration_config: T::Hash[Symbol, T.anything], + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionScalableMatrixWithUnitPricingPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def scalable_matrix_with_unit_pricing_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def scalable_matrix_with_unit_pricing_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + scalable_matrix_with_unit_pricing_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + scalable_matrix_with_unit_pricing_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :scalable_matrix_with_unit_pricing + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + scalable_matrix_with_unit_pricing_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionScalableMatrixWithTieredPricingPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def scalable_matrix_with_tiered_pricing_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def scalable_matrix_with_tiered_pricing_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + name: String, + scalable_matrix_with_tiered_pricing_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + name:, + scalable_matrix_with_tiered_pricing_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :scalable_matrix_with_tiered_pricing + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + model_type: Symbol, + name: String, + scalable_matrix_with_tiered_pricing_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionCumulativeGroupedBulkPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def cumulative_grouped_bulk_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def cumulative_grouped_bulk_config=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + cumulative_grouped_bulk_config: T::Hash[Symbol, T.anything], + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + cumulative_grouped_bulk_config:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :cumulative_grouped_bulk + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + cumulative_grouped_bulk_config: T::Hash[Symbol, T.anything], + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionMaxGroupTieredPackagePrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def max_group_tiered_package_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def max_group_tiered_package_config=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + max_group_tiered_package_config: T::Hash[Symbol, T.anything], + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + max_group_tiered_package_config:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :max_group_tiered_package + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + max_group_tiered_package_config: T::Hash[Symbol, T.anything], + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionGroupedWithMeteredMinimumPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def grouped_with_metered_minimum_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def grouped_with_metered_minimum_config=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + grouped_with_metered_minimum_config: T::Hash[Symbol, T.anything], + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + grouped_with_metered_minimum_config:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :grouped_with_metered_minimum + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + grouped_with_metered_minimum_config: T::Hash[Symbol, T.anything], + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionMatrixWithDisplayNamePrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def matrix_with_display_name_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def matrix_with_display_name_config=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + item_id: String, + matrix_with_display_name_config: T::Hash[Symbol, T.anything], + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + item_id:, + matrix_with_display_name_config:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :matrix_with_display_name + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + item_id: String, + matrix_with_display_name_config: T::Hash[Symbol, T.anything], + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewSubscriptionGroupedTieredPackagePrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def grouped_tiered_package_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def grouped_tiered_package_config=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def currency + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig { returns(T.nilable(String)) } + def reference_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reference_id=(_) + end + + sig do + params( + cadence: Symbol, + grouped_tiered_package_config: T::Hash[Symbol, T.anything], + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + grouped_tiered_package_config:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + currency: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + reference_id: nil, + model_type: :grouped_tiered_package + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + grouped_tiered_package_config: T::Hash[Symbol, T.anything], + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + currency: T.nilable(String), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice], [Symbol, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice]] + ) + end + private_class_method def self.variants + end + end end end end diff --git a/rbi/lib/orb/models/sub_line_item_grouping_model.rbi b/rbi/lib/orb/models/sub_line_item_grouping_model.rbi deleted file mode 100644 index 20f810f6..00000000 --- a/rbi/lib/orb/models/sub_line_item_grouping_model.rbi +++ /dev/null @@ -1,31 +0,0 @@ -# typed: strong - -module Orb - module Models - class SubLineItemGroupingModel < Orb::BaseModel - sig { returns(String) } - def key - end - - sig { params(_: String).returns(String) } - def key=(_) - end - - sig { returns(T.nilable(String)) } - def value - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def value=(_) - end - - sig { params(key: String, value: T.nilable(String)).void } - def initialize(key:, value:) - end - - sig { override.returns({key: String, value: T.nilable(String)}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/subscription.rbi b/rbi/lib/orb/models/subscription.rbi index cec0134f..51498beb 100644 --- a/rbi/lib/orb/models/subscription.rbi +++ b/rbi/lib/orb/models/subscription.rbi @@ -19,13 +19,13 @@ module Orb def active_plan_phase_order=(_) end - sig { returns(T::Array[Orb::Models::AdjustmentIntervalModel]) } + sig { returns(T::Array[Orb::Models::Subscription::AdjustmentInterval]) } def adjustment_intervals end sig do - params(_: T::Array[Orb::Models::AdjustmentIntervalModel]) - .returns(T::Array[Orb::Models::AdjustmentIntervalModel]) + params(_: T::Array[Orb::Models::Subscription::AdjustmentInterval]) + .returns(T::Array[Orb::Models::Subscription::AdjustmentInterval]) end def adjustment_intervals=(_) end @@ -38,13 +38,13 @@ module Orb def auto_collection=(_) end - sig { returns(Orb::Models::BillingCycleAnchorConfigurationModel) } + sig { returns(Orb::Models::Subscription::BillingCycleAnchorConfiguration) } def billing_cycle_anchor_configuration end sig do - params(_: Orb::Models::BillingCycleAnchorConfigurationModel) - .returns(Orb::Models::BillingCycleAnchorConfigurationModel) + params(_: Orb::Models::Subscription::BillingCycleAnchorConfiguration) + .returns(Orb::Models::Subscription::BillingCycleAnchorConfiguration) end def billing_cycle_anchor_configuration=(_) end @@ -81,11 +81,11 @@ module Orb def current_billing_period_start_date=(_) end - sig { returns(Orb::Models::CustomerModel) } + sig { returns(Orb::Models::Customer) } def customer end - sig { params(_: Orb::Models::CustomerModel).returns(Orb::Models::CustomerModel) } + sig { params(_: Orb::Models::Customer).returns(Orb::Models::Customer) } def customer=(_) end @@ -101,9 +101,9 @@ module Orb returns( T::Array[ T.any( - Orb::Models::AmountDiscountIntervalModel, - Orb::Models::PercentageDiscountIntervalModel, - Orb::Models::UsageDiscountIntervalModel + Orb::Models::Subscription::DiscountInterval::AmountDiscountInterval, + Orb::Models::Subscription::DiscountInterval::PercentageDiscountInterval, + Orb::Models::Subscription::DiscountInterval::UsageDiscountInterval ) ] ) @@ -115,18 +115,18 @@ module Orb params( _: T::Array[ T.any( - Orb::Models::AmountDiscountIntervalModel, - Orb::Models::PercentageDiscountIntervalModel, - Orb::Models::UsageDiscountIntervalModel + Orb::Models::Subscription::DiscountInterval::AmountDiscountInterval, + Orb::Models::Subscription::DiscountInterval::PercentageDiscountInterval, + Orb::Models::Subscription::DiscountInterval::UsageDiscountInterval ) ] ) .returns( T::Array[ T.any( - Orb::Models::AmountDiscountIntervalModel, - Orb::Models::PercentageDiscountIntervalModel, - Orb::Models::UsageDiscountIntervalModel + Orb::Models::Subscription::DiscountInterval::AmountDiscountInterval, + Orb::Models::Subscription::DiscountInterval::PercentageDiscountInterval, + Orb::Models::Subscription::DiscountInterval::UsageDiscountInterval ) ] ) @@ -142,13 +142,13 @@ module Orb def end_date=(_) end - sig { returns(T::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel]) } + sig { returns(T::Array[Orb::Models::Subscription::FixedFeeQuantitySchedule]) } def fixed_fee_quantity_schedule end sig do - params(_: T::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel]) - .returns(T::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel]) + params(_: T::Array[Orb::Models::Subscription::FixedFeeQuantitySchedule]) + .returns(T::Array[Orb::Models::Subscription::FixedFeeQuantitySchedule]) end def fixed_fee_quantity_schedule=(_) end @@ -161,12 +161,13 @@ module Orb def invoicing_threshold=(_) end - sig { returns(T::Array[Orb::Models::MaximumIntervalModel]) } + sig { returns(T::Array[Orb::Models::Subscription::MaximumInterval]) } def maximum_intervals end sig do - params(_: T::Array[Orb::Models::MaximumIntervalModel]).returns(T::Array[Orb::Models::MaximumIntervalModel]) + params(_: T::Array[Orb::Models::Subscription::MaximumInterval]) + .returns(T::Array[Orb::Models::Subscription::MaximumInterval]) end def maximum_intervals=(_) end @@ -179,12 +180,13 @@ module Orb def metadata=(_) end - sig { returns(T::Array[Orb::Models::MinimumIntervalModel]) } + sig { returns(T::Array[Orb::Models::Subscription::MinimumInterval]) } def minimum_intervals end sig do - params(_: T::Array[Orb::Models::MinimumIntervalModel]).returns(T::Array[Orb::Models::MinimumIntervalModel]) + params(_: T::Array[Orb::Models::Subscription::MinimumInterval]) + .returns(T::Array[Orb::Models::Subscription::MinimumInterval]) end def minimum_intervals=(_) end @@ -197,29 +199,32 @@ module Orb def net_terms=(_) end - sig { returns(Orb::Models::PlanModel) } + sig { returns(Orb::Models::Plan) } def plan end - sig { params(_: Orb::Models::PlanModel).returns(Orb::Models::PlanModel) } + sig { params(_: Orb::Models::Plan).returns(Orb::Models::Plan) } def plan=(_) end - sig { returns(T::Array[Orb::Models::PriceIntervalModel]) } + sig { returns(T::Array[Orb::Models::Subscription::PriceInterval]) } def price_intervals end - sig { params(_: T::Array[Orb::Models::PriceIntervalModel]).returns(T::Array[Orb::Models::PriceIntervalModel]) } + sig do + params(_: T::Array[Orb::Models::Subscription::PriceInterval]) + .returns(T::Array[Orb::Models::Subscription::PriceInterval]) + end def price_intervals=(_) end - sig { returns(T.nilable(Orb::Models::CouponRedemptionModel)) } + sig { returns(T.nilable(Orb::Models::Subscription::RedeemedCoupon)) } def redeemed_coupon end sig do - params(_: T.nilable(Orb::Models::CouponRedemptionModel)) - .returns(T.nilable(Orb::Models::CouponRedemptionModel)) + params(_: T.nilable(Orb::Models::Subscription::RedeemedCoupon)) + .returns(T.nilable(Orb::Models::Subscription::RedeemedCoupon)) end def redeemed_coupon=(_) end @@ -240,11 +245,11 @@ module Orb def status=(_) end - sig { returns(Orb::Models::SubscriptionTrialInfoModel) } + sig { returns(Orb::Models::Subscription::TrialInfo) } def trial_info end - sig { params(_: Orb::Models::SubscriptionTrialInfoModel).returns(Orb::Models::SubscriptionTrialInfoModel) } + sig { params(_: Orb::Models::Subscription::TrialInfo).returns(Orb::Models::Subscription::TrialInfo) } def trial_info=(_) end @@ -252,35 +257,35 @@ module Orb params( id: String, active_plan_phase_order: T.nilable(Integer), - adjustment_intervals: T::Array[Orb::Models::AdjustmentIntervalModel], + adjustment_intervals: T::Array[Orb::Models::Subscription::AdjustmentInterval], auto_collection: T.nilable(T::Boolean), - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, + billing_cycle_anchor_configuration: Orb::Models::Subscription::BillingCycleAnchorConfiguration, billing_cycle_day: Integer, created_at: Time, current_billing_period_end_date: T.nilable(Time), current_billing_period_start_date: T.nilable(Time), - customer: Orb::Models::CustomerModel, + customer: Orb::Models::Customer, default_invoice_memo: T.nilable(String), discount_intervals: T::Array[ T.any( - Orb::Models::AmountDiscountIntervalModel, - Orb::Models::PercentageDiscountIntervalModel, - Orb::Models::UsageDiscountIntervalModel + Orb::Models::Subscription::DiscountInterval::AmountDiscountInterval, + Orb::Models::Subscription::DiscountInterval::PercentageDiscountInterval, + Orb::Models::Subscription::DiscountInterval::UsageDiscountInterval ) ], end_date: T.nilable(Time), - fixed_fee_quantity_schedule: T::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel], + fixed_fee_quantity_schedule: T::Array[Orb::Models::Subscription::FixedFeeQuantitySchedule], invoicing_threshold: T.nilable(String), - maximum_intervals: T::Array[Orb::Models::MaximumIntervalModel], + maximum_intervals: T::Array[Orb::Models::Subscription::MaximumInterval], metadata: T::Hash[Symbol, String], - minimum_intervals: T::Array[Orb::Models::MinimumIntervalModel], + minimum_intervals: T::Array[Orb::Models::Subscription::MinimumInterval], net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: T::Array[Orb::Models::PriceIntervalModel], - redeemed_coupon: T.nilable(Orb::Models::CouponRedemptionModel), + plan: Orb::Models::Plan, + price_intervals: T::Array[Orb::Models::Subscription::PriceInterval], + redeemed_coupon: T.nilable(Orb::Models::Subscription::RedeemedCoupon), start_date: Time, status: Symbol, - trial_info: Orb::Models::SubscriptionTrialInfoModel + trial_info: Orb::Models::Subscription::TrialInfo ) .void end @@ -319,54 +324,1528 @@ module Orb { id: String, active_plan_phase_order: T.nilable(Integer), - adjustment_intervals: T::Array[Orb::Models::AdjustmentIntervalModel], + adjustment_intervals: T::Array[Orb::Models::Subscription::AdjustmentInterval], auto_collection: T.nilable(T::Boolean), - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, + billing_cycle_anchor_configuration: Orb::Models::Subscription::BillingCycleAnchorConfiguration, billing_cycle_day: Integer, created_at: Time, current_billing_period_end_date: T.nilable(Time), current_billing_period_start_date: T.nilable(Time), - customer: Orb::Models::CustomerModel, + customer: Orb::Models::Customer, default_invoice_memo: T.nilable(String), discount_intervals: T::Array[ T.any( - Orb::Models::AmountDiscountIntervalModel, - Orb::Models::PercentageDiscountIntervalModel, - Orb::Models::UsageDiscountIntervalModel + Orb::Models::Subscription::DiscountInterval::AmountDiscountInterval, + Orb::Models::Subscription::DiscountInterval::PercentageDiscountInterval, + Orb::Models::Subscription::DiscountInterval::UsageDiscountInterval ) ], end_date: T.nilable(Time), - fixed_fee_quantity_schedule: T::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel], + fixed_fee_quantity_schedule: T::Array[Orb::Models::Subscription::FixedFeeQuantitySchedule], invoicing_threshold: T.nilable(String), - maximum_intervals: T::Array[Orb::Models::MaximumIntervalModel], + maximum_intervals: T::Array[Orb::Models::Subscription::MaximumInterval], metadata: T::Hash[Symbol, String], - minimum_intervals: T::Array[Orb::Models::MinimumIntervalModel], + minimum_intervals: T::Array[Orb::Models::Subscription::MinimumInterval], net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: T::Array[Orb::Models::PriceIntervalModel], - redeemed_coupon: T.nilable(Orb::Models::CouponRedemptionModel), + plan: Orb::Models::Plan, + price_intervals: T::Array[Orb::Models::Subscription::PriceInterval], + redeemed_coupon: T.nilable(Orb::Models::Subscription::RedeemedCoupon), start_date: Time, status: Symbol, - trial_info: Orb::Models::SubscriptionTrialInfoModel + trial_info: Orb::Models::Subscription::TrialInfo } ) end def to_hash end + class AdjustmentInterval < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig do + returns( + T.any( + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + end + def adjustment + end + + sig do + params( + _: T.any( + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + .returns( + T.any( + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + end + def adjustment=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + id: String, + adjustment: T.any( + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ), + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time + ) + .void + end + def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:) + end + + sig do + override + .returns( + { + id: String, + adjustment: T.any( + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ), + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time + } + ) + end + def to_hash + end + + class Adjustment < Orb::Union + abstract! + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float, + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + usage_discount:, + adjustment_type: :usage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float + } + ) + end + def to_hash + end + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + amount_discount:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + adjustment_type: :amount_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + percentage_discount:, + plan_phase_order:, + reason:, + adjustment_type: :percentage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + item_id:, + minimum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :minimum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + maximum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :maximum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + ) + end + private_class_method def self.variants + end + end + end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + sig { returns(Integer) } + def day + end + + sig { params(_: Integer).returns(Integer) } + def day=(_) + end + + sig { returns(T.nilable(Integer)) } + def month + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def month=(_) + end + + sig { returns(T.nilable(Integer)) } + def year + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def year=(_) + end + + sig { params(day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)).void } + def initialize(day:, month: nil, year: nil) + end + + sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) } + def to_hash + end + end + class DiscountInterval < Orb::Union abstract! + class AmountDiscountInterval < Orb::BaseModel + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + amount_discount: String, + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time, + discount_type: Symbol + ) + .void + end + def initialize( + amount_discount:, + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + start_date:, + discount_type: :amount + ) + end + + sig do + override + .returns( + { + amount_discount: String, + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + start_date: Time + } + ) + end + def to_hash + end + end + + class PercentageDiscountInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + percentage_discount: Float, + start_date: Time, + discount_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + percentage_discount:, + start_date:, + discount_type: :percentage + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + percentage_discount: Float, + start_date: Time + } + ) + end + def to_hash + end + end + + class UsageDiscountInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time, + usage_discount: Float, + discount_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + start_date:, + usage_discount:, + discount_type: :usage + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + start_date: Time, + usage_discount: Float + } + ) + end + def to_hash + end + end + sig do override .returns( - [[Symbol, Orb::Models::AmountDiscountIntervalModel], [Symbol, Orb::Models::PercentageDiscountIntervalModel], [Symbol, Orb::Models::UsageDiscountIntervalModel]] + [[Symbol, Orb::Models::Subscription::DiscountInterval::AmountDiscountInterval], [Symbol, Orb::Models::Subscription::DiscountInterval::PercentageDiscountInterval], [Symbol, Orb::Models::Subscription::DiscountInterval::UsageDiscountInterval]] ) end private_class_method def self.variants end end + class FixedFeeQuantitySchedule < Orb::BaseModel + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(Float) } + def quantity + end + + sig { params(_: Float).returns(Float) } + def quantity=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { params(end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time).void } + def initialize(end_date:, price_id:, quantity:, start_date:) + end + + sig do + override.returns({end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time}) + end + def to_hash + end + end + + class MaximumInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + maximum_amount: String, + start_date: Time + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + maximum_amount:, + start_date: + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + maximum_amount: String, + start_date: Time + } + ) + end + def to_hash + end + end + + class MinimumInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + minimum_amount: String, + start_date: Time + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + minimum_amount:, + start_date: + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + minimum_amount: String, + start_date: Time + } + ) + end + def to_hash + end + end + + class PriceInterval < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Integer) } + def billing_cycle_day + end + + sig { params(_: Integer).returns(Integer) } + def billing_cycle_day=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_end_date=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_start_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_start_date=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(T.nilable(String)) } + def filter + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def filter=(_) + end + + sig { returns(T.nilable(T::Array[Orb::Models::Subscription::PriceInterval::FixedFeeQuantityTransition])) } + def fixed_fee_quantity_transitions + end + + sig do + params(_: T.nilable(T::Array[Orb::Models::Subscription::PriceInterval::FixedFeeQuantityTransition])) + .returns(T.nilable(T::Array[Orb::Models::Subscription::PriceInterval::FixedFeeQuantityTransition])) + end + def fixed_fee_quantity_transitions=(_) + end + + sig do + returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price + end + + sig do + params( + _: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + .returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(T.nilable(T::Array[String])) } + def usage_customer_ids + end + + sig { params(_: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def usage_customer_ids=(_) + end + + sig do + params( + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + end_date: T.nilable(Time), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable(T::Array[Orb::Models::Subscription::PriceInterval::FixedFeeQuantityTransition]), + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + start_date: Time, + usage_customer_ids: T.nilable(T::Array[String]) + ) + .void + end + def initialize( + id:, + billing_cycle_day:, + current_billing_period_end_date:, + current_billing_period_start_date:, + end_date:, + filter:, + fixed_fee_quantity_transitions:, + price:, + start_date:, + usage_customer_ids: + ) + end + + sig do + override + .returns( + { + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + end_date: T.nilable(Time), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable(T::Array[Orb::Models::Subscription::PriceInterval::FixedFeeQuantityTransition]), + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + start_date: Time, + usage_customer_ids: T.nilable(T::Array[String]) + } + ) + end + def to_hash + end + + class FixedFeeQuantityTransition < Orb::BaseModel + sig { returns(Time) } + def effective_date + end + + sig { params(_: Time).returns(Time) } + def effective_date=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(Integer) } + def quantity + end + + sig { params(_: Integer).returns(Integer) } + def quantity=(_) + end + + sig { params(effective_date: Time, price_id: String, quantity: Integer).void } + def initialize(effective_date:, price_id:, quantity:) + end + + sig { override.returns({effective_date: Time, price_id: String, quantity: Integer}) } + def to_hash + end + end + end + + class RedeemedCoupon < Orb::BaseModel + sig { returns(String) } + def coupon_id + end + + sig { params(_: String).returns(String) } + def coupon_id=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { params(coupon_id: String, end_date: T.nilable(Time), start_date: Time).void } + def initialize(coupon_id:, end_date:, start_date:) + end + + sig { override.returns({coupon_id: String, end_date: T.nilable(Time), start_date: Time}) } + def to_hash + end + end + class Status < Orb::Enum abstract! @@ -378,6 +1857,24 @@ module Orb def self.values end end + + class TrialInfo < Orb::BaseModel + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { params(end_date: T.nilable(Time)).void } + def initialize(end_date:) + end + + sig { override.returns({end_date: T.nilable(Time)}) } + def to_hash + end + end end end end diff --git a/rbi/lib/orb/models/subscription_cancel_response.rbi b/rbi/lib/orb/models/subscription_cancel_response.rbi new file mode 100644 index 00000000..b9a4fd28 --- /dev/null +++ b/rbi/lib/orb/models/subscription_cancel_response.rbi @@ -0,0 +1,1891 @@ +# typed: strong + +module Orb + module Models + class SubscriptionCancelResponse < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Integer)) } + def active_plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def active_plan_phase_order=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionCancelResponse::AdjustmentInterval]) } + def adjustment_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionCancelResponse::AdjustmentInterval]) + .returns(T::Array[Orb::Models::SubscriptionCancelResponse::AdjustmentInterval]) + end + def adjustment_intervals=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def auto_collection + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def auto_collection=(_) + end + + sig { returns(Orb::Models::SubscriptionCancelResponse::BillingCycleAnchorConfiguration) } + def billing_cycle_anchor_configuration + end + + sig do + params(_: Orb::Models::SubscriptionCancelResponse::BillingCycleAnchorConfiguration) + .returns(Orb::Models::SubscriptionCancelResponse::BillingCycleAnchorConfiguration) + end + def billing_cycle_anchor_configuration=(_) + end + + sig { returns(Integer) } + def billing_cycle_day + end + + sig { params(_: Integer).returns(Integer) } + def billing_cycle_day=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_end_date=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_start_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_start_date=(_) + end + + sig { returns(Orb::Models::Customer) } + def customer + end + + sig { params(_: Orb::Models::Customer).returns(Orb::Models::Customer) } + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def default_invoice_memo + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def default_invoice_memo=(_) + end + + sig do + returns( + T::Array[ + T.any( + Orb::Models::SubscriptionCancelResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionCancelResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionCancelResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + end + def discount_intervals + end + + sig do + params( + _: T::Array[ + T.any( + Orb::Models::SubscriptionCancelResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionCancelResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionCancelResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + .returns( + T::Array[ + T.any( + Orb::Models::SubscriptionCancelResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionCancelResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionCancelResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + end + def discount_intervals=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionCancelResponse::FixedFeeQuantitySchedule]) } + def fixed_fee_quantity_schedule + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionCancelResponse::FixedFeeQuantitySchedule]) + .returns(T::Array[Orb::Models::SubscriptionCancelResponse::FixedFeeQuantitySchedule]) + end + def fixed_fee_quantity_schedule=(_) + end + + sig { returns(T.nilable(String)) } + def invoicing_threshold + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoicing_threshold=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionCancelResponse::MaximumInterval]) } + def maximum_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionCancelResponse::MaximumInterval]) + .returns(T::Array[Orb::Models::SubscriptionCancelResponse::MaximumInterval]) + end + def maximum_intervals=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionCancelResponse::MinimumInterval]) } + def minimum_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionCancelResponse::MinimumInterval]) + .returns(T::Array[Orb::Models::SubscriptionCancelResponse::MinimumInterval]) + end + def minimum_intervals=(_) + end + + sig { returns(Integer) } + def net_terms + end + + sig { params(_: Integer).returns(Integer) } + def net_terms=(_) + end + + sig { returns(Orb::Models::Plan) } + def plan + end + + sig { params(_: Orb::Models::Plan).returns(Orb::Models::Plan) } + def plan=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionCancelResponse::PriceInterval]) } + def price_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionCancelResponse::PriceInterval]) + .returns(T::Array[Orb::Models::SubscriptionCancelResponse::PriceInterval]) + end + def price_intervals=(_) + end + + sig { returns(T.nilable(Orb::Models::SubscriptionCancelResponse::RedeemedCoupon)) } + def redeemed_coupon + end + + sig do + params(_: T.nilable(Orb::Models::SubscriptionCancelResponse::RedeemedCoupon)) + .returns(T.nilable(Orb::Models::SubscriptionCancelResponse::RedeemedCoupon)) + end + def redeemed_coupon=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(Symbol) } + def status + end + + sig { params(_: Symbol).returns(Symbol) } + def status=(_) + end + + sig { returns(Orb::Models::SubscriptionCancelResponse::TrialInfo) } + def trial_info + end + + sig do + params(_: Orb::Models::SubscriptionCancelResponse::TrialInfo) + .returns(Orb::Models::SubscriptionCancelResponse::TrialInfo) + end + def trial_info=(_) + end + + sig do + params( + id: String, + active_plan_phase_order: T.nilable(Integer), + adjustment_intervals: T::Array[Orb::Models::SubscriptionCancelResponse::AdjustmentInterval], + auto_collection: T.nilable(T::Boolean), + billing_cycle_anchor_configuration: Orb::Models::SubscriptionCancelResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + customer: Orb::Models::Customer, + default_invoice_memo: T.nilable(String), + discount_intervals: T::Array[ + T.any( + Orb::Models::SubscriptionCancelResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionCancelResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionCancelResponse::DiscountInterval::UsageDiscountInterval + ) + ], + end_date: T.nilable(Time), + fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionCancelResponse::FixedFeeQuantitySchedule], + invoicing_threshold: T.nilable(String), + maximum_intervals: T::Array[Orb::Models::SubscriptionCancelResponse::MaximumInterval], + metadata: T::Hash[Symbol, String], + minimum_intervals: T::Array[Orb::Models::SubscriptionCancelResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: T::Array[Orb::Models::SubscriptionCancelResponse::PriceInterval], + redeemed_coupon: T.nilable(Orb::Models::SubscriptionCancelResponse::RedeemedCoupon), + start_date: Time, + status: Symbol, + trial_info: Orb::Models::SubscriptionCancelResponse::TrialInfo + ) + .void + end + def initialize( + id:, + active_plan_phase_order:, + adjustment_intervals:, + auto_collection:, + billing_cycle_anchor_configuration:, + billing_cycle_day:, + created_at:, + current_billing_period_end_date:, + current_billing_period_start_date:, + customer:, + default_invoice_memo:, + discount_intervals:, + end_date:, + fixed_fee_quantity_schedule:, + invoicing_threshold:, + maximum_intervals:, + metadata:, + minimum_intervals:, + net_terms:, + plan:, + price_intervals:, + redeemed_coupon:, + start_date:, + status:, + trial_info: + ) + end + + sig do + override + .returns( + { + id: String, + active_plan_phase_order: T.nilable(Integer), + adjustment_intervals: T::Array[Orb::Models::SubscriptionCancelResponse::AdjustmentInterval], + auto_collection: T.nilable(T::Boolean), + billing_cycle_anchor_configuration: Orb::Models::SubscriptionCancelResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + customer: Orb::Models::Customer, + default_invoice_memo: T.nilable(String), + discount_intervals: T::Array[ + T.any( + Orb::Models::SubscriptionCancelResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionCancelResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionCancelResponse::DiscountInterval::UsageDiscountInterval + ) + ], + end_date: T.nilable(Time), + fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionCancelResponse::FixedFeeQuantitySchedule], + invoicing_threshold: T.nilable(String), + maximum_intervals: T::Array[Orb::Models::SubscriptionCancelResponse::MaximumInterval], + metadata: T::Hash[Symbol, String], + minimum_intervals: T::Array[Orb::Models::SubscriptionCancelResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: T::Array[Orb::Models::SubscriptionCancelResponse::PriceInterval], + redeemed_coupon: T.nilable(Orb::Models::SubscriptionCancelResponse::RedeemedCoupon), + start_date: Time, + status: Symbol, + trial_info: Orb::Models::SubscriptionCancelResponse::TrialInfo + } + ) + end + def to_hash + end + + class AdjustmentInterval < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig do + returns( + T.any( + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + end + def adjustment + end + + sig do + params( + _: T.any( + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + .returns( + T.any( + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + end + def adjustment=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + id: String, + adjustment: T.any( + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ), + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time + ) + .void + end + def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:) + end + + sig do + override + .returns( + { + id: String, + adjustment: T.any( + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ), + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time + } + ) + end + def to_hash + end + + class Adjustment < Orb::Union + abstract! + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float, + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + usage_discount:, + adjustment_type: :usage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float + } + ) + end + def to_hash + end + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + amount_discount:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + adjustment_type: :amount_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + percentage_discount:, + plan_phase_order:, + reason:, + adjustment_type: :percentage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + item_id:, + minimum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :minimum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + maximum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :maximum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + ) + end + private_class_method def self.variants + end + end + end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + sig { returns(Integer) } + def day + end + + sig { params(_: Integer).returns(Integer) } + def day=(_) + end + + sig { returns(T.nilable(Integer)) } + def month + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def month=(_) + end + + sig { returns(T.nilable(Integer)) } + def year + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def year=(_) + end + + sig { params(day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)).void } + def initialize(day:, month: nil, year: nil) + end + + sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) } + def to_hash + end + end + + class DiscountInterval < Orb::Union + abstract! + + class AmountDiscountInterval < Orb::BaseModel + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + amount_discount: String, + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time, + discount_type: Symbol + ) + .void + end + def initialize( + amount_discount:, + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + start_date:, + discount_type: :amount + ) + end + + sig do + override + .returns( + { + amount_discount: String, + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + start_date: Time + } + ) + end + def to_hash + end + end + + class PercentageDiscountInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + percentage_discount: Float, + start_date: Time, + discount_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + percentage_discount:, + start_date:, + discount_type: :percentage + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + percentage_discount: Float, + start_date: Time + } + ) + end + def to_hash + end + end + + class UsageDiscountInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time, + usage_discount: Float, + discount_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + start_date:, + usage_discount:, + discount_type: :usage + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + start_date: Time, + usage_discount: Float + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::SubscriptionCancelResponse::DiscountInterval::AmountDiscountInterval], [Symbol, Orb::Models::SubscriptionCancelResponse::DiscountInterval::PercentageDiscountInterval], [Symbol, Orb::Models::SubscriptionCancelResponse::DiscountInterval::UsageDiscountInterval]] + ) + end + private_class_method def self.variants + end + end + + class FixedFeeQuantitySchedule < Orb::BaseModel + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(Float) } + def quantity + end + + sig { params(_: Float).returns(Float) } + def quantity=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { params(end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time).void } + def initialize(end_date:, price_id:, quantity:, start_date:) + end + + sig do + override.returns({end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time}) + end + def to_hash + end + end + + class MaximumInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + maximum_amount: String, + start_date: Time + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + maximum_amount:, + start_date: + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + maximum_amount: String, + start_date: Time + } + ) + end + def to_hash + end + end + + class MinimumInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + minimum_amount: String, + start_date: Time + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + minimum_amount:, + start_date: + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + minimum_amount: String, + start_date: Time + } + ) + end + def to_hash + end + end + + class PriceInterval < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Integer) } + def billing_cycle_day + end + + sig { params(_: Integer).returns(Integer) } + def billing_cycle_day=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_end_date=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_start_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_start_date=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(T.nilable(String)) } + def filter + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def filter=(_) + end + + sig do + returns( + T.nilable(T::Array[Orb::Models::SubscriptionCancelResponse::PriceInterval::FixedFeeQuantityTransition]) + ) + end + def fixed_fee_quantity_transitions + end + + sig do + params( + _: T.nilable(T::Array[Orb::Models::SubscriptionCancelResponse::PriceInterval::FixedFeeQuantityTransition]) + ) + .returns( + T.nilable(T::Array[Orb::Models::SubscriptionCancelResponse::PriceInterval::FixedFeeQuantityTransition]) + ) + end + def fixed_fee_quantity_transitions=(_) + end + + sig do + returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price + end + + sig do + params( + _: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + .returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(T.nilable(T::Array[String])) } + def usage_customer_ids + end + + sig { params(_: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def usage_customer_ids=(_) + end + + sig do + params( + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + end_date: T.nilable(Time), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable(T::Array[Orb::Models::SubscriptionCancelResponse::PriceInterval::FixedFeeQuantityTransition]), + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + start_date: Time, + usage_customer_ids: T.nilable(T::Array[String]) + ) + .void + end + def initialize( + id:, + billing_cycle_day:, + current_billing_period_end_date:, + current_billing_period_start_date:, + end_date:, + filter:, + fixed_fee_quantity_transitions:, + price:, + start_date:, + usage_customer_ids: + ) + end + + sig do + override + .returns( + { + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + end_date: T.nilable(Time), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable(T::Array[Orb::Models::SubscriptionCancelResponse::PriceInterval::FixedFeeQuantityTransition]), + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + start_date: Time, + usage_customer_ids: T.nilable(T::Array[String]) + } + ) + end + def to_hash + end + + class FixedFeeQuantityTransition < Orb::BaseModel + sig { returns(Time) } + def effective_date + end + + sig { params(_: Time).returns(Time) } + def effective_date=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(Integer) } + def quantity + end + + sig { params(_: Integer).returns(Integer) } + def quantity=(_) + end + + sig { params(effective_date: Time, price_id: String, quantity: Integer).void } + def initialize(effective_date:, price_id:, quantity:) + end + + sig { override.returns({effective_date: Time, price_id: String, quantity: Integer}) } + def to_hash + end + end + end + + class RedeemedCoupon < Orb::BaseModel + sig { returns(String) } + def coupon_id + end + + sig { params(_: String).returns(String) } + def coupon_id=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { params(coupon_id: String, end_date: T.nilable(Time), start_date: Time).void } + def initialize(coupon_id:, end_date:, start_date:) + end + + sig { override.returns({coupon_id: String, end_date: T.nilable(Time), start_date: Time}) } + def to_hash + end + end + + class Status < Orb::Enum + abstract! + + ACTIVE = :active + ENDED = :ended + UPCOMING = :upcoming + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class TrialInfo < Orb::BaseModel + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { params(end_date: T.nilable(Time)).void } + def initialize(end_date:) + end + + sig { override.returns({end_date: T.nilable(Time)}) } + def to_hash + end + end + end + end +end diff --git a/rbi/lib/orb/models/subscription_create_params.rbi b/rbi/lib/orb/models/subscription_create_params.rbi index 5c8c03ff..74b71afa 100644 --- a/rbi/lib/orb/models/subscription_create_params.rbi +++ b/rbi/lib/orb/models/subscription_create_params.rbi @@ -52,13 +52,13 @@ module Orb def aws_region=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleAnchorConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::SubscriptionCreateParams::BillingCycleAnchorConfiguration)) } def billing_cycle_anchor_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleAnchorConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleAnchorConfigurationModel)) + params(_: T.nilable(Orb::Models::SubscriptionCreateParams::BillingCycleAnchorConfiguration)) + .returns(T.nilable(Orb::Models::SubscriptionCreateParams::BillingCycleAnchorConfiguration)) end def billing_cycle_anchor_configuration=(_) end @@ -285,7 +285,7 @@ module Orb align_billing_with_subscription_start_date: T::Boolean, auto_collection: T.nilable(T::Boolean), aws_region: T.nilable(String), - billing_cycle_anchor_configuration: T.nilable(Orb::Models::BillingCycleAnchorConfigurationModel), + billing_cycle_anchor_configuration: T.nilable(Orb::Models::SubscriptionCreateParams::BillingCycleAnchorConfiguration), coupon_redemption_code: T.nilable(String), credits_overage_rate: T.nilable(Float), customer_id: T.nilable(String), @@ -360,7 +360,7 @@ module Orb align_billing_with_subscription_start_date: T::Boolean, auto_collection: T.nilable(T::Boolean), aws_region: T.nilable(String), - billing_cycle_anchor_configuration: T.nilable(Orb::Models::BillingCycleAnchorConfigurationModel), + billing_cycle_anchor_configuration: T.nilable(Orb::Models::SubscriptionCreateParams::BillingCycleAnchorConfiguration), coupon_redemption_code: T.nilable(String), credits_overage_rate: T.nilable(Float), customer_id: T.nilable(String), @@ -393,6 +393,40 @@ module Orb def to_hash end + class BillingCycleAnchorConfiguration < Orb::BaseModel + sig { returns(Integer) } + def day + end + + sig { params(_: Integer).returns(Integer) } + def day=(_) + end + + sig { returns(T.nilable(Integer)) } + def month + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def month=(_) + end + + sig { returns(T.nilable(Integer)) } + def year + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def year=(_) + end + + sig { params(day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)).void } + def initialize(day:, month: nil, year: nil) + end + + sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) } + def to_hash + end + end + class ExternalMarketplace < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/subscription_create_response.rbi b/rbi/lib/orb/models/subscription_create_response.rbi new file mode 100644 index 00000000..d6bb12d3 --- /dev/null +++ b/rbi/lib/orb/models/subscription_create_response.rbi @@ -0,0 +1,1891 @@ +# typed: strong + +module Orb + module Models + class SubscriptionCreateResponse < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Integer)) } + def active_plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def active_plan_phase_order=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionCreateResponse::AdjustmentInterval]) } + def adjustment_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionCreateResponse::AdjustmentInterval]) + .returns(T::Array[Orb::Models::SubscriptionCreateResponse::AdjustmentInterval]) + end + def adjustment_intervals=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def auto_collection + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def auto_collection=(_) + end + + sig { returns(Orb::Models::SubscriptionCreateResponse::BillingCycleAnchorConfiguration) } + def billing_cycle_anchor_configuration + end + + sig do + params(_: Orb::Models::SubscriptionCreateResponse::BillingCycleAnchorConfiguration) + .returns(Orb::Models::SubscriptionCreateResponse::BillingCycleAnchorConfiguration) + end + def billing_cycle_anchor_configuration=(_) + end + + sig { returns(Integer) } + def billing_cycle_day + end + + sig { params(_: Integer).returns(Integer) } + def billing_cycle_day=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_end_date=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_start_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_start_date=(_) + end + + sig { returns(Orb::Models::Customer) } + def customer + end + + sig { params(_: Orb::Models::Customer).returns(Orb::Models::Customer) } + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def default_invoice_memo + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def default_invoice_memo=(_) + end + + sig do + returns( + T::Array[ + T.any( + Orb::Models::SubscriptionCreateResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionCreateResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionCreateResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + end + def discount_intervals + end + + sig do + params( + _: T::Array[ + T.any( + Orb::Models::SubscriptionCreateResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionCreateResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionCreateResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + .returns( + T::Array[ + T.any( + Orb::Models::SubscriptionCreateResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionCreateResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionCreateResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + end + def discount_intervals=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionCreateResponse::FixedFeeQuantitySchedule]) } + def fixed_fee_quantity_schedule + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionCreateResponse::FixedFeeQuantitySchedule]) + .returns(T::Array[Orb::Models::SubscriptionCreateResponse::FixedFeeQuantitySchedule]) + end + def fixed_fee_quantity_schedule=(_) + end + + sig { returns(T.nilable(String)) } + def invoicing_threshold + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoicing_threshold=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionCreateResponse::MaximumInterval]) } + def maximum_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionCreateResponse::MaximumInterval]) + .returns(T::Array[Orb::Models::SubscriptionCreateResponse::MaximumInterval]) + end + def maximum_intervals=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionCreateResponse::MinimumInterval]) } + def minimum_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionCreateResponse::MinimumInterval]) + .returns(T::Array[Orb::Models::SubscriptionCreateResponse::MinimumInterval]) + end + def minimum_intervals=(_) + end + + sig { returns(Integer) } + def net_terms + end + + sig { params(_: Integer).returns(Integer) } + def net_terms=(_) + end + + sig { returns(Orb::Models::Plan) } + def plan + end + + sig { params(_: Orb::Models::Plan).returns(Orb::Models::Plan) } + def plan=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionCreateResponse::PriceInterval]) } + def price_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionCreateResponse::PriceInterval]) + .returns(T::Array[Orb::Models::SubscriptionCreateResponse::PriceInterval]) + end + def price_intervals=(_) + end + + sig { returns(T.nilable(Orb::Models::SubscriptionCreateResponse::RedeemedCoupon)) } + def redeemed_coupon + end + + sig do + params(_: T.nilable(Orb::Models::SubscriptionCreateResponse::RedeemedCoupon)) + .returns(T.nilable(Orb::Models::SubscriptionCreateResponse::RedeemedCoupon)) + end + def redeemed_coupon=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(Symbol) } + def status + end + + sig { params(_: Symbol).returns(Symbol) } + def status=(_) + end + + sig { returns(Orb::Models::SubscriptionCreateResponse::TrialInfo) } + def trial_info + end + + sig do + params(_: Orb::Models::SubscriptionCreateResponse::TrialInfo) + .returns(Orb::Models::SubscriptionCreateResponse::TrialInfo) + end + def trial_info=(_) + end + + sig do + params( + id: String, + active_plan_phase_order: T.nilable(Integer), + adjustment_intervals: T::Array[Orb::Models::SubscriptionCreateResponse::AdjustmentInterval], + auto_collection: T.nilable(T::Boolean), + billing_cycle_anchor_configuration: Orb::Models::SubscriptionCreateResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + customer: Orb::Models::Customer, + default_invoice_memo: T.nilable(String), + discount_intervals: T::Array[ + T.any( + Orb::Models::SubscriptionCreateResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionCreateResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionCreateResponse::DiscountInterval::UsageDiscountInterval + ) + ], + end_date: T.nilable(Time), + fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionCreateResponse::FixedFeeQuantitySchedule], + invoicing_threshold: T.nilable(String), + maximum_intervals: T::Array[Orb::Models::SubscriptionCreateResponse::MaximumInterval], + metadata: T::Hash[Symbol, String], + minimum_intervals: T::Array[Orb::Models::SubscriptionCreateResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: T::Array[Orb::Models::SubscriptionCreateResponse::PriceInterval], + redeemed_coupon: T.nilable(Orb::Models::SubscriptionCreateResponse::RedeemedCoupon), + start_date: Time, + status: Symbol, + trial_info: Orb::Models::SubscriptionCreateResponse::TrialInfo + ) + .void + end + def initialize( + id:, + active_plan_phase_order:, + adjustment_intervals:, + auto_collection:, + billing_cycle_anchor_configuration:, + billing_cycle_day:, + created_at:, + current_billing_period_end_date:, + current_billing_period_start_date:, + customer:, + default_invoice_memo:, + discount_intervals:, + end_date:, + fixed_fee_quantity_schedule:, + invoicing_threshold:, + maximum_intervals:, + metadata:, + minimum_intervals:, + net_terms:, + plan:, + price_intervals:, + redeemed_coupon:, + start_date:, + status:, + trial_info: + ) + end + + sig do + override + .returns( + { + id: String, + active_plan_phase_order: T.nilable(Integer), + adjustment_intervals: T::Array[Orb::Models::SubscriptionCreateResponse::AdjustmentInterval], + auto_collection: T.nilable(T::Boolean), + billing_cycle_anchor_configuration: Orb::Models::SubscriptionCreateResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + customer: Orb::Models::Customer, + default_invoice_memo: T.nilable(String), + discount_intervals: T::Array[ + T.any( + Orb::Models::SubscriptionCreateResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionCreateResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionCreateResponse::DiscountInterval::UsageDiscountInterval + ) + ], + end_date: T.nilable(Time), + fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionCreateResponse::FixedFeeQuantitySchedule], + invoicing_threshold: T.nilable(String), + maximum_intervals: T::Array[Orb::Models::SubscriptionCreateResponse::MaximumInterval], + metadata: T::Hash[Symbol, String], + minimum_intervals: T::Array[Orb::Models::SubscriptionCreateResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: T::Array[Orb::Models::SubscriptionCreateResponse::PriceInterval], + redeemed_coupon: T.nilable(Orb::Models::SubscriptionCreateResponse::RedeemedCoupon), + start_date: Time, + status: Symbol, + trial_info: Orb::Models::SubscriptionCreateResponse::TrialInfo + } + ) + end + def to_hash + end + + class AdjustmentInterval < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig do + returns( + T.any( + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + end + def adjustment + end + + sig do + params( + _: T.any( + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + .returns( + T.any( + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + end + def adjustment=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + id: String, + adjustment: T.any( + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ), + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time + ) + .void + end + def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:) + end + + sig do + override + .returns( + { + id: String, + adjustment: T.any( + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ), + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time + } + ) + end + def to_hash + end + + class Adjustment < Orb::Union + abstract! + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float, + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + usage_discount:, + adjustment_type: :usage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float + } + ) + end + def to_hash + end + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + amount_discount:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + adjustment_type: :amount_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + percentage_discount:, + plan_phase_order:, + reason:, + adjustment_type: :percentage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + item_id:, + minimum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :minimum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + maximum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :maximum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + ) + end + private_class_method def self.variants + end + end + end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + sig { returns(Integer) } + def day + end + + sig { params(_: Integer).returns(Integer) } + def day=(_) + end + + sig { returns(T.nilable(Integer)) } + def month + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def month=(_) + end + + sig { returns(T.nilable(Integer)) } + def year + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def year=(_) + end + + sig { params(day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)).void } + def initialize(day:, month: nil, year: nil) + end + + sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) } + def to_hash + end + end + + class DiscountInterval < Orb::Union + abstract! + + class AmountDiscountInterval < Orb::BaseModel + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + amount_discount: String, + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time, + discount_type: Symbol + ) + .void + end + def initialize( + amount_discount:, + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + start_date:, + discount_type: :amount + ) + end + + sig do + override + .returns( + { + amount_discount: String, + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + start_date: Time + } + ) + end + def to_hash + end + end + + class PercentageDiscountInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + percentage_discount: Float, + start_date: Time, + discount_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + percentage_discount:, + start_date:, + discount_type: :percentage + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + percentage_discount: Float, + start_date: Time + } + ) + end + def to_hash + end + end + + class UsageDiscountInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time, + usage_discount: Float, + discount_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + start_date:, + usage_discount:, + discount_type: :usage + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + start_date: Time, + usage_discount: Float + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::SubscriptionCreateResponse::DiscountInterval::AmountDiscountInterval], [Symbol, Orb::Models::SubscriptionCreateResponse::DiscountInterval::PercentageDiscountInterval], [Symbol, Orb::Models::SubscriptionCreateResponse::DiscountInterval::UsageDiscountInterval]] + ) + end + private_class_method def self.variants + end + end + + class FixedFeeQuantitySchedule < Orb::BaseModel + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(Float) } + def quantity + end + + sig { params(_: Float).returns(Float) } + def quantity=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { params(end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time).void } + def initialize(end_date:, price_id:, quantity:, start_date:) + end + + sig do + override.returns({end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time}) + end + def to_hash + end + end + + class MaximumInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + maximum_amount: String, + start_date: Time + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + maximum_amount:, + start_date: + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + maximum_amount: String, + start_date: Time + } + ) + end + def to_hash + end + end + + class MinimumInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + minimum_amount: String, + start_date: Time + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + minimum_amount:, + start_date: + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + minimum_amount: String, + start_date: Time + } + ) + end + def to_hash + end + end + + class PriceInterval < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Integer) } + def billing_cycle_day + end + + sig { params(_: Integer).returns(Integer) } + def billing_cycle_day=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_end_date=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_start_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_start_date=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(T.nilable(String)) } + def filter + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def filter=(_) + end + + sig do + returns( + T.nilable(T::Array[Orb::Models::SubscriptionCreateResponse::PriceInterval::FixedFeeQuantityTransition]) + ) + end + def fixed_fee_quantity_transitions + end + + sig do + params( + _: T.nilable(T::Array[Orb::Models::SubscriptionCreateResponse::PriceInterval::FixedFeeQuantityTransition]) + ) + .returns( + T.nilable(T::Array[Orb::Models::SubscriptionCreateResponse::PriceInterval::FixedFeeQuantityTransition]) + ) + end + def fixed_fee_quantity_transitions=(_) + end + + sig do + returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price + end + + sig do + params( + _: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + .returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(T.nilable(T::Array[String])) } + def usage_customer_ids + end + + sig { params(_: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def usage_customer_ids=(_) + end + + sig do + params( + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + end_date: T.nilable(Time), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable(T::Array[Orb::Models::SubscriptionCreateResponse::PriceInterval::FixedFeeQuantityTransition]), + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + start_date: Time, + usage_customer_ids: T.nilable(T::Array[String]) + ) + .void + end + def initialize( + id:, + billing_cycle_day:, + current_billing_period_end_date:, + current_billing_period_start_date:, + end_date:, + filter:, + fixed_fee_quantity_transitions:, + price:, + start_date:, + usage_customer_ids: + ) + end + + sig do + override + .returns( + { + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + end_date: T.nilable(Time), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable(T::Array[Orb::Models::SubscriptionCreateResponse::PriceInterval::FixedFeeQuantityTransition]), + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + start_date: Time, + usage_customer_ids: T.nilable(T::Array[String]) + } + ) + end + def to_hash + end + + class FixedFeeQuantityTransition < Orb::BaseModel + sig { returns(Time) } + def effective_date + end + + sig { params(_: Time).returns(Time) } + def effective_date=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(Integer) } + def quantity + end + + sig { params(_: Integer).returns(Integer) } + def quantity=(_) + end + + sig { params(effective_date: Time, price_id: String, quantity: Integer).void } + def initialize(effective_date:, price_id:, quantity:) + end + + sig { override.returns({effective_date: Time, price_id: String, quantity: Integer}) } + def to_hash + end + end + end + + class RedeemedCoupon < Orb::BaseModel + sig { returns(String) } + def coupon_id + end + + sig { params(_: String).returns(String) } + def coupon_id=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { params(coupon_id: String, end_date: T.nilable(Time), start_date: Time).void } + def initialize(coupon_id:, end_date:, start_date:) + end + + sig { override.returns({coupon_id: String, end_date: T.nilable(Time), start_date: Time}) } + def to_hash + end + end + + class Status < Orb::Enum + abstract! + + ACTIVE = :active + ENDED = :ended + UPCOMING = :upcoming + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class TrialInfo < Orb::BaseModel + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { params(end_date: T.nilable(Time)).void } + def initialize(end_date:) + end + + sig { override.returns({end_date: T.nilable(Time)}) } + def to_hash + end + end + end + end +end diff --git a/rbi/lib/orb/models/subscription_fetch_costs_response.rbi b/rbi/lib/orb/models/subscription_fetch_costs_response.rbi index 5583630a..eba2a42a 100644 --- a/rbi/lib/orb/models/subscription_fetch_costs_response.rbi +++ b/rbi/lib/orb/models/subscription_fetch_costs_response.rbi @@ -3,21 +3,323 @@ module Orb module Models class SubscriptionFetchCostsResponse < Orb::BaseModel - sig { returns(T::Array[Orb::Models::AggregatedCostModel]) } + sig { returns(T::Array[Orb::Models::SubscriptionFetchCostsResponse::Data]) } def data end - sig { params(_: T::Array[Orb::Models::AggregatedCostModel]).returns(T::Array[Orb::Models::AggregatedCostModel]) } + sig do + params(_: T::Array[Orb::Models::SubscriptionFetchCostsResponse::Data]) + .returns(T::Array[Orb::Models::SubscriptionFetchCostsResponse::Data]) + end def data=(_) end - sig { params(data: T::Array[Orb::Models::AggregatedCostModel]).void } + sig { params(data: T::Array[Orb::Models::SubscriptionFetchCostsResponse::Data]).void } def initialize(data:) end - sig { override.returns({data: T::Array[Orb::Models::AggregatedCostModel]}) } + sig { override.returns({data: T::Array[Orb::Models::SubscriptionFetchCostsResponse::Data]}) } def to_hash end + + class Data < Orb::BaseModel + sig { returns(T::Array[Orb::Models::SubscriptionFetchCostsResponse::Data::PerPriceCost]) } + def per_price_costs + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionFetchCostsResponse::Data::PerPriceCost]) + .returns(T::Array[Orb::Models::SubscriptionFetchCostsResponse::Data::PerPriceCost]) + end + def per_price_costs=(_) + end + + sig { returns(String) } + def subtotal + end + + sig { params(_: String).returns(String) } + def subtotal=(_) + end + + sig { returns(Time) } + def timeframe_end + end + + sig { params(_: Time).returns(Time) } + def timeframe_end=(_) + end + + sig { returns(Time) } + def timeframe_start + end + + sig { params(_: Time).returns(Time) } + def timeframe_start=(_) + end + + sig { returns(String) } + def total + end + + sig { params(_: String).returns(String) } + def total=(_) + end + + sig do + params( + per_price_costs: T::Array[Orb::Models::SubscriptionFetchCostsResponse::Data::PerPriceCost], + subtotal: String, + timeframe_end: Time, + timeframe_start: Time, + total: String + ) + .void + end + def initialize(per_price_costs:, subtotal:, timeframe_end:, timeframe_start:, total:) + end + + sig do + override + .returns( + { + per_price_costs: T::Array[Orb::Models::SubscriptionFetchCostsResponse::Data::PerPriceCost], + subtotal: String, + timeframe_end: Time, + timeframe_start: Time, + total: String + } + ) + end + def to_hash + end + + class PerPriceCost < Orb::BaseModel + sig do + returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price + end + + sig do + params( + _: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + .returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(String) } + def subtotal + end + + sig { params(_: String).returns(String) } + def subtotal=(_) + end + + sig { returns(String) } + def total + end + + sig { params(_: String).returns(String) } + def total=(_) + end + + sig { returns(T.nilable(Float)) } + def quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def quantity=(_) + end + + sig do + params( + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + price_id: String, + subtotal: String, + total: String, + quantity: T.nilable(Float) + ) + .void + end + def initialize(price:, price_id:, subtotal:, total:, quantity: nil) + end + + sig do + override + .returns( + { + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + price_id: String, + subtotal: String, + total: String, + quantity: T.nilable(Float) + } + ) + end + def to_hash + end + end + end end end end diff --git a/rbi/lib/orb/models/subscription_fetch_schedule_response.rbi b/rbi/lib/orb/models/subscription_fetch_schedule_response.rbi index fabcc69f..4f69a369 100644 --- a/rbi/lib/orb/models/subscription_fetch_schedule_response.rbi +++ b/rbi/lib/orb/models/subscription_fetch_schedule_response.rbi @@ -19,11 +19,14 @@ module Orb def end_date=(_) end - sig { returns(Orb::Models::PlanMinifiedModel) } + sig { returns(Orb::Models::SubscriptionFetchScheduleResponse::Plan) } def plan end - sig { params(_: Orb::Models::PlanMinifiedModel).returns(Orb::Models::PlanMinifiedModel) } + sig do + params(_: Orb::Models::SubscriptionFetchScheduleResponse::Plan) + .returns(Orb::Models::SubscriptionFetchScheduleResponse::Plan) + end def plan=(_) end @@ -39,7 +42,7 @@ module Orb params( created_at: Time, end_date: T.nilable(Time), - plan: Orb::Models::PlanMinifiedModel, + plan: Orb::Models::SubscriptionFetchScheduleResponse::Plan, start_date: Time ) .void @@ -50,11 +53,60 @@ module Orb sig do override .returns( - {created_at: Time, end_date: T.nilable(Time), plan: Orb::Models::PlanMinifiedModel, start_date: Time} + { + created_at: Time, + end_date: T.nilable(Time), + plan: Orb::Models::SubscriptionFetchScheduleResponse::Plan, + start_date: Time + } ) end def to_hash end + + class Plan < Orb::BaseModel + sig { returns(T.nilable(String)) } + def id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def id=(_) + end + + sig { returns(T.nilable(String)) } + def external_plan_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_plan_id=(_) + end + + sig { returns(T.nilable(String)) } + def name + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def name=(_) + end + + sig do + params(id: T.nilable(String), external_plan_id: T.nilable(String), name: T.nilable(String)).void + end + def initialize(id:, external_plan_id:, name:) + end + + sig do + override.returns( + { + id: T.nilable(String), + external_plan_id: T.nilable(String), + name: T.nilable(String) + } + ) + end + def to_hash + end + end end end end diff --git a/rbi/lib/orb/models/subscription_minified_model.rbi b/rbi/lib/orb/models/subscription_minified_model.rbi deleted file mode 100644 index fd2d49b5..00000000 --- a/rbi/lib/orb/models/subscription_minified_model.rbi +++ /dev/null @@ -1,23 +0,0 @@ -# typed: strong - -module Orb - module Models - class SubscriptionMinifiedModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { params(id: String).void } - def initialize(id:) - end - - sig { override.returns({id: String}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/subscription_model.rbi b/rbi/lib/orb/models/subscription_model.rbi deleted file mode 100644 index aaa56650..00000000 --- a/rbi/lib/orb/models/subscription_model.rbi +++ /dev/null @@ -1,383 +0,0 @@ -# typed: strong - -module Orb - module Models - class SubscriptionModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(T.nilable(Integer)) } - def active_plan_phase_order - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def active_plan_phase_order=(_) - end - - sig { returns(T::Array[Orb::Models::AdjustmentIntervalModel]) } - def adjustment_intervals - end - - sig do - params(_: T::Array[Orb::Models::AdjustmentIntervalModel]) - .returns(T::Array[Orb::Models::AdjustmentIntervalModel]) - end - def adjustment_intervals=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def auto_collection - end - - sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } - def auto_collection=(_) - end - - sig { returns(Orb::Models::BillingCycleAnchorConfigurationModel) } - def billing_cycle_anchor_configuration - end - - sig do - params(_: Orb::Models::BillingCycleAnchorConfigurationModel) - .returns(Orb::Models::BillingCycleAnchorConfigurationModel) - end - def billing_cycle_anchor_configuration=(_) - end - - sig { returns(Integer) } - def billing_cycle_day - end - - sig { params(_: Integer).returns(Integer) } - def billing_cycle_day=(_) - end - - sig { returns(Time) } - def created_at - end - - sig { params(_: Time).returns(Time) } - def created_at=(_) - end - - sig { returns(T.nilable(Time)) } - def current_billing_period_end_date - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def current_billing_period_end_date=(_) - end - - sig { returns(T.nilable(Time)) } - def current_billing_period_start_date - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def current_billing_period_start_date=(_) - end - - sig { returns(Orb::Models::CustomerModel) } - def customer - end - - sig { params(_: Orb::Models::CustomerModel).returns(Orb::Models::CustomerModel) } - def customer=(_) - end - - sig { returns(T.nilable(String)) } - def default_invoice_memo - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def default_invoice_memo=(_) - end - - sig do - returns( - T::Array[ - T.any( - Orb::Models::AmountDiscountIntervalModel, - Orb::Models::PercentageDiscountIntervalModel, - Orb::Models::UsageDiscountIntervalModel - ) - ] - ) - end - def discount_intervals - end - - sig do - params( - _: T::Array[ - T.any( - Orb::Models::AmountDiscountIntervalModel, - Orb::Models::PercentageDiscountIntervalModel, - Orb::Models::UsageDiscountIntervalModel - ) - ] - ) - .returns( - T::Array[ - T.any( - Orb::Models::AmountDiscountIntervalModel, - Orb::Models::PercentageDiscountIntervalModel, - Orb::Models::UsageDiscountIntervalModel - ) - ] - ) - end - def discount_intervals=(_) - end - - sig { returns(T.nilable(Time)) } - def end_date - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def end_date=(_) - end - - sig { returns(T::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel]) } - def fixed_fee_quantity_schedule - end - - sig do - params(_: T::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel]) - .returns(T::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel]) - end - def fixed_fee_quantity_schedule=(_) - end - - sig { returns(T.nilable(String)) } - def invoicing_threshold - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def invoicing_threshold=(_) - end - - sig { returns(T::Array[Orb::Models::MaximumIntervalModel]) } - def maximum_intervals - end - - sig do - params(_: T::Array[Orb::Models::MaximumIntervalModel]).returns(T::Array[Orb::Models::MaximumIntervalModel]) - end - def maximum_intervals=(_) - end - - sig { returns(T::Hash[Symbol, String]) } - def metadata - end - - sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } - def metadata=(_) - end - - sig { returns(T::Array[Orb::Models::MinimumIntervalModel]) } - def minimum_intervals - end - - sig do - params(_: T::Array[Orb::Models::MinimumIntervalModel]).returns(T::Array[Orb::Models::MinimumIntervalModel]) - end - def minimum_intervals=(_) - end - - sig { returns(Integer) } - def net_terms - end - - sig { params(_: Integer).returns(Integer) } - def net_terms=(_) - end - - sig { returns(Orb::Models::PlanModel) } - def plan - end - - sig { params(_: Orb::Models::PlanModel).returns(Orb::Models::PlanModel) } - def plan=(_) - end - - sig { returns(T::Array[Orb::Models::PriceIntervalModel]) } - def price_intervals - end - - sig { params(_: T::Array[Orb::Models::PriceIntervalModel]).returns(T::Array[Orb::Models::PriceIntervalModel]) } - def price_intervals=(_) - end - - sig { returns(T.nilable(Orb::Models::CouponRedemptionModel)) } - def redeemed_coupon - end - - sig do - params(_: T.nilable(Orb::Models::CouponRedemptionModel)) - .returns(T.nilable(Orb::Models::CouponRedemptionModel)) - end - def redeemed_coupon=(_) - end - - sig { returns(Time) } - def start_date - end - - sig { params(_: Time).returns(Time) } - def start_date=(_) - end - - sig { returns(Symbol) } - def status - end - - sig { params(_: Symbol).returns(Symbol) } - def status=(_) - end - - sig { returns(Orb::Models::SubscriptionTrialInfoModel) } - def trial_info - end - - sig { params(_: Orb::Models::SubscriptionTrialInfoModel).returns(Orb::Models::SubscriptionTrialInfoModel) } - def trial_info=(_) - end - - sig do - params( - id: String, - active_plan_phase_order: T.nilable(Integer), - adjustment_intervals: T::Array[Orb::Models::AdjustmentIntervalModel], - auto_collection: T.nilable(T::Boolean), - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, - billing_cycle_day: Integer, - created_at: Time, - current_billing_period_end_date: T.nilable(Time), - current_billing_period_start_date: T.nilable(Time), - customer: Orb::Models::CustomerModel, - default_invoice_memo: T.nilable(String), - discount_intervals: T::Array[ - T.any( - Orb::Models::AmountDiscountIntervalModel, - Orb::Models::PercentageDiscountIntervalModel, - Orb::Models::UsageDiscountIntervalModel - ) - ], - end_date: T.nilable(Time), - fixed_fee_quantity_schedule: T::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel], - invoicing_threshold: T.nilable(String), - maximum_intervals: T::Array[Orb::Models::MaximumIntervalModel], - metadata: T::Hash[Symbol, String], - minimum_intervals: T::Array[Orb::Models::MinimumIntervalModel], - net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: T::Array[Orb::Models::PriceIntervalModel], - redeemed_coupon: T.nilable(Orb::Models::CouponRedemptionModel), - start_date: Time, - status: Symbol, - trial_info: Orb::Models::SubscriptionTrialInfoModel - ) - .void - end - def initialize( - id:, - active_plan_phase_order:, - adjustment_intervals:, - auto_collection:, - billing_cycle_anchor_configuration:, - billing_cycle_day:, - created_at:, - current_billing_period_end_date:, - current_billing_period_start_date:, - customer:, - default_invoice_memo:, - discount_intervals:, - end_date:, - fixed_fee_quantity_schedule:, - invoicing_threshold:, - maximum_intervals:, - metadata:, - minimum_intervals:, - net_terms:, - plan:, - price_intervals:, - redeemed_coupon:, - start_date:, - status:, - trial_info: - ) - end - - sig do - override - .returns( - { - id: String, - active_plan_phase_order: T.nilable(Integer), - adjustment_intervals: T::Array[Orb::Models::AdjustmentIntervalModel], - auto_collection: T.nilable(T::Boolean), - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, - billing_cycle_day: Integer, - created_at: Time, - current_billing_period_end_date: T.nilable(Time), - current_billing_period_start_date: T.nilable(Time), - customer: Orb::Models::CustomerModel, - default_invoice_memo: T.nilable(String), - discount_intervals: T::Array[ - T.any( - Orb::Models::AmountDiscountIntervalModel, - Orb::Models::PercentageDiscountIntervalModel, - Orb::Models::UsageDiscountIntervalModel - ) - ], - end_date: T.nilable(Time), - fixed_fee_quantity_schedule: T::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel], - invoicing_threshold: T.nilable(String), - maximum_intervals: T::Array[Orb::Models::MaximumIntervalModel], - metadata: T::Hash[Symbol, String], - minimum_intervals: T::Array[Orb::Models::MinimumIntervalModel], - net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: T::Array[Orb::Models::PriceIntervalModel], - redeemed_coupon: T.nilable(Orb::Models::CouponRedemptionModel), - start_date: Time, - status: Symbol, - trial_info: Orb::Models::SubscriptionTrialInfoModel - } - ) - end - def to_hash - end - - class DiscountInterval < Orb::Union - abstract! - - sig do - override - .returns( - [[Symbol, Orb::Models::AmountDiscountIntervalModel], [Symbol, Orb::Models::PercentageDiscountIntervalModel], [Symbol, Orb::Models::UsageDiscountIntervalModel]] - ) - end - private_class_method def self.variants - end - end - - class Status < Orb::Enum - abstract! - - ACTIVE = :active - ENDED = :ended - UPCOMING = :upcoming - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end -end diff --git a/rbi/lib/orb/models/subscription_price_intervals_params.rbi b/rbi/lib/orb/models/subscription_price_intervals_params.rbi index edc01c43..534c5fc1 100644 --- a/rbi/lib/orb/models/subscription_price_intervals_params.rbi +++ b/rbi/lib/orb/models/subscription_price_intervals_params.rbi @@ -104,13 +104,13 @@ module Orb def start_date=(_) end - sig { returns(T.nilable(Orb::Models::NewAllocationPriceModel)) } + sig { returns(T.nilable(Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice)) } def allocation_price end sig do - params(_: T.nilable(Orb::Models::NewAllocationPriceModel)) - .returns(T.nilable(Orb::Models::NewAllocationPriceModel)) + params(_: T.nilable(Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice)) + .returns(T.nilable(Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice)) end def allocation_price=(_) end @@ -182,13 +182,21 @@ module Orb def filter=(_) end - sig { returns(T.nilable(T::Array[Orb::Models::PriceIntervalFixedFeeQuantityTransitionModel])) } + sig do + returns( + T.nilable(T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::FixedFeeQuantityTransition]) + ) + end def fixed_fee_quantity_transitions end sig do - params(_: T.nilable(T::Array[Orb::Models::PriceIntervalFixedFeeQuantityTransitionModel])) - .returns(T.nilable(T::Array[Orb::Models::PriceIntervalFixedFeeQuantityTransitionModel])) + params( + _: T.nilable(T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::FixedFeeQuantityTransition]) + ) + .returns( + T.nilable(T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::FixedFeeQuantityTransition]) + ) end def fixed_fee_quantity_transitions=(_) end @@ -213,34 +221,34 @@ module Orb returns( T.nilable( T.any( - Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice ) ) ) @@ -252,68 +260,68 @@ module Orb params( _: T.nilable( T.any( - Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice ) ) ) .returns( T.nilable( T.any( - Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice ) ) ) @@ -340,7 +348,7 @@ module Orb sig do params( start_date: T.any(Time, Symbol), - allocation_price: T.nilable(Orb::Models::NewAllocationPriceModel), + allocation_price: T.nilable(Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice), discounts: T.nilable( T::Array[ T.any( @@ -353,39 +361,39 @@ module Orb end_date: T.nilable(T.any(Time, Symbol)), external_price_id: T.nilable(String), filter: T.nilable(String), - fixed_fee_quantity_transitions: T.nilable(T::Array[Orb::Models::PriceIntervalFixedFeeQuantityTransitionModel]), + fixed_fee_quantity_transitions: T.nilable(T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::FixedFeeQuantityTransition]), maximum_amount: T.nilable(Float), minimum_amount: T.nilable(Float), price: T.nilable( T.any( - Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice ) ), price_id: T.nilable(String), @@ -414,7 +422,7 @@ module Orb .returns( { start_date: T.any(Time, Symbol), - allocation_price: T.nilable(Orb::Models::NewAllocationPriceModel), + allocation_price: T.nilable(Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice), discounts: T.nilable( T::Array[ T.any( @@ -427,39 +435,39 @@ module Orb end_date: T.nilable(T.any(Time, Symbol)), external_price_id: T.nilable(String), filter: T.nilable(String), - fixed_fee_quantity_transitions: T.nilable(T::Array[Orb::Models::PriceIntervalFixedFeeQuantityTransitionModel]), + fixed_fee_quantity_transitions: T.nilable(T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::FixedFeeQuantityTransition]), maximum_amount: T.nilable(Float), minimum_amount: T.nilable(Float), price: T.nilable( T.any( - Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice, - Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice, - Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice, + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice ) ), price_id: T.nilable(String), @@ -478,6 +486,78 @@ module Orb end end + class AllocationPrice < Orb::BaseModel + sig { returns(String) } + def amount + end + + sig { params(_: String).returns(String) } + def amount=(_) + end + + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(T::Boolean) } + def expires_at_end_of_cadence + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def expires_at_end_of_cadence=(_) + end + + sig do + params( + amount: String, + cadence: Symbol, + currency: String, + expires_at_end_of_cadence: T::Boolean + ).void + end + def initialize(amount:, cadence:, currency:, expires_at_end_of_cadence:) + end + + sig do + override + .returns({ + amount: String, + cadence: Symbol, + currency: String, + expires_at_end_of_cadence: T::Boolean + }) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + class Discount < Orb::Union abstract! @@ -576,220 +656,10267 @@ module Orb private_class_method def self.variants end end - end - class AddAdjustment < Orb::BaseModel - sig do - returns( - T.any( - Orb::Models::NewAdjustmentModel::NewPercentageDiscount, - Orb::Models::NewAdjustmentModel::NewUsageDiscount, - Orb::Models::NewAdjustmentModel::NewAmountDiscount, - Orb::Models::NewAdjustmentModel::NewMinimum, - Orb::Models::NewAdjustmentModel::NewMaximum - ) - ) - end - def adjustment - end + class FixedFeeQuantityTransition < Orb::BaseModel + sig { returns(Time) } + def effective_date + end - sig do - params( - _: T.any( - Orb::Models::NewAdjustmentModel::NewPercentageDiscount, - Orb::Models::NewAdjustmentModel::NewUsageDiscount, - Orb::Models::NewAdjustmentModel::NewAmountDiscount, - Orb::Models::NewAdjustmentModel::NewMinimum, - Orb::Models::NewAdjustmentModel::NewMaximum - ) - ) - .returns( - T.any( - Orb::Models::NewAdjustmentModel::NewPercentageDiscount, - Orb::Models::NewAdjustmentModel::NewUsageDiscount, - Orb::Models::NewAdjustmentModel::NewAmountDiscount, - Orb::Models::NewAdjustmentModel::NewMinimum, - Orb::Models::NewAdjustmentModel::NewMaximum - ) - ) - end - def adjustment=(_) - end + sig { params(_: Time).returns(Time) } + def effective_date=(_) + end - sig { returns(T.any(Time, Symbol)) } - def start_date - end + sig { returns(Integer) } + def quantity + end - sig { params(_: T.any(Time, Symbol)).returns(T.any(Time, Symbol)) } - def start_date=(_) - end + sig { params(_: Integer).returns(Integer) } + def quantity=(_) + end - sig { returns(T.nilable(T.any(Time, Symbol))) } - def end_date - end + sig { params(effective_date: Time, quantity: Integer).void } + def initialize(effective_date:, quantity:) + end - sig { params(_: T.nilable(T.any(Time, Symbol))).returns(T.nilable(T.any(Time, Symbol))) } - def end_date=(_) + sig { override.returns({effective_date: Time, quantity: Integer}) } + def to_hash + end end - sig do - params( - adjustment: T.any( - Orb::Models::NewAdjustmentModel::NewPercentageDiscount, - Orb::Models::NewAdjustmentModel::NewUsageDiscount, - Orb::Models::NewAdjustmentModel::NewAmountDiscount, - Orb::Models::NewAdjustmentModel::NewMinimum, - Orb::Models::NewAdjustmentModel::NewMaximum - ), - start_date: T.any(Time, Symbol), - end_date: T.nilable(T.any(Time, Symbol)) - ) - .void - end - def initialize(adjustment:, start_date:, end_date: nil) - end + class Price < Orb::Union + abstract! - sig do - override - .returns( - { - adjustment: T.any( - Orb::Models::NewAdjustmentModel::NewPercentageDiscount, - Orb::Models::NewAdjustmentModel::NewUsageDiscount, - Orb::Models::NewAdjustmentModel::NewAmountDiscount, - Orb::Models::NewAdjustmentModel::NewMinimum, - Orb::Models::NewAdjustmentModel::NewMaximum - ), - start_date: T.any(Time, Symbol), - end_date: T.nilable(T.any(Time, Symbol)) - } - ) - end - def to_hash - end + class NewFloatingUnitPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end - class StartDate < Orb::Union - abstract! + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end - sig { override.returns([[NilClass, Time], [NilClass, Symbol]]) } - private_class_method def self.variants - end - end + sig { returns(String) } + def currency + end - class EndDate < Orb::Union - abstract! + sig { params(_: String).returns(String) } + def currency=(_) + end - sig { override.returns([[NilClass, Time], [NilClass, Symbol]]) } - private_class_method def self.variants - end - end - end + sig { returns(String) } + def item_id + end - class Edit < Orb::BaseModel - sig { returns(String) } - def price_interval_id - end + sig { params(_: String).returns(String) } + def item_id=(_) + end - sig { params(_: String).returns(String) } - def price_interval_id=(_) - end + sig { returns(Symbol) } + def model_type + end - sig { returns(T.nilable(Integer)) } - def billing_cycle_day - end + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def billing_cycle_day=(_) - end + sig { returns(String) } + def name + end - sig { returns(T.nilable(T.any(Time, Symbol))) } - def end_date - end + sig { params(_: String).returns(String) } + def name=(_) + end - sig { params(_: T.nilable(T.any(Time, Symbol))).returns(T.nilable(T.any(Time, Symbol))) } - def end_date=(_) - end + sig { returns(Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::UnitConfig) } + def unit_config + end - sig { returns(T.nilable(String)) } - def filter - end + sig do + params(_: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::UnitConfig) + .returns(Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::UnitConfig) + end + def unit_config=(_) + end - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def filter=(_) - end + sig { returns(T.nilable(String)) } + def billable_metric_id + end - sig { returns(T.nilable(T::Array[Orb::Models::PriceIntervalFixedFeeQuantityTransitionModel])) } - def fixed_fee_quantity_transitions - end + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end - sig do - params(_: T.nilable(T::Array[Orb::Models::PriceIntervalFixedFeeQuantityTransitionModel])) - .returns(T.nilable(T::Array[Orb::Models::PriceIntervalFixedFeeQuantityTransitionModel])) - end - def fixed_fee_quantity_transitions=(_) - end + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end - sig { returns(T.nilable(T.any(Time, Symbol))) } - def start_date - end + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end - sig { params(_: T.any(Time, Symbol)).returns(T.any(Time, Symbol)) } - def start_date=(_) - end + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end - sig { returns(T.nilable(T::Array[String])) } - def usage_customer_ids - end + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end - sig { params(_: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } - def usage_customer_ids=(_) - end + sig { returns(T.nilable(Float)) } + def conversion_rate + end - sig do - params( - price_interval_id: String, - billing_cycle_day: T.nilable(Integer), - end_date: T.nilable(T.any(Time, Symbol)), - filter: T.nilable(String), - fixed_fee_quantity_transitions: T.nilable(T::Array[Orb::Models::PriceIntervalFixedFeeQuantityTransitionModel]), - start_date: T.any(Time, Symbol), - usage_customer_ids: T.nilable(T::Array[String]) - ) - .void - end - def initialize( - price_interval_id:, - billing_cycle_day: nil, - end_date: nil, - filter: nil, - fixed_fee_quantity_transitions: nil, - start_date: nil, - usage_customer_ids: nil - ) - end + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end - sig do - override - .returns( - { - price_interval_id: String, - billing_cycle_day: T.nilable(Integer), - end_date: T.nilable(T.any(Time, Symbol)), - filter: T.nilable(String), - fixed_fee_quantity_transitions: T.nilable(T::Array[Orb::Models::PriceIntervalFixedFeeQuantityTransitionModel]), - start_date: T.any(Time, Symbol), - usage_customer_ids: T.nilable(T::Array[String]) - } - ) - end - def to_hash - end + sig { returns(T.nilable(String)) } + def external_price_id + end - class EndDate < Orb::Union - abstract! + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end - sig { override.returns([[NilClass, Time], [NilClass, Symbol]]) } - private_class_method def self.variants + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + currency: String, + item_id: String, + name: String, + unit_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::UnitConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + currency:, + item_id:, + name:, + unit_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :unit + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + currency: String, + item_id: String, + model_type: Symbol, + name: String, + unit_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::UnitConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class UnitConfig < Orb::BaseModel + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { params(unit_amount: String).void } + def initialize(unit_amount:) + end + + sig { override.returns({unit_amount: String}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingPackagePrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::PackageConfig) } + def package_config + end + + sig do + params( + _: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::PackageConfig + ) + .returns(Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::PackageConfig) + end + def package_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + currency: String, + item_id: String, + name: String, + package_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::PackageConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + currency:, + item_id:, + name:, + package_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :package + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + currency: String, + item_id: String, + model_type: Symbol, + name: String, + package_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::PackageConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class PackageConfig < Orb::BaseModel + sig { returns(String) } + def package_amount + end + + sig { params(_: String).returns(String) } + def package_amount=(_) + end + + sig { returns(Integer) } + def package_size + end + + sig { params(_: Integer).returns(Integer) } + def package_size=(_) + end + + sig { params(package_amount: String, package_size: Integer).void } + def initialize(package_amount:, package_size:) + end + + sig { override.returns({package_amount: String, package_size: Integer}) } + def to_hash + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingMatrixPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::MatrixConfig) } + def matrix_config + end + + sig do + params(_: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::MatrixConfig) + .returns(Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::MatrixConfig) + end + def matrix_config=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + currency: String, + item_id: String, + matrix_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::MatrixConfig, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + currency:, + item_id:, + matrix_config:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :matrix + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + currency: String, + item_id: String, + matrix_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::MatrixConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class MatrixConfig < Orb::BaseModel + sig { returns(String) } + def default_unit_amount + end + + sig { params(_: String).returns(String) } + def default_unit_amount=(_) + end + + sig { returns(T::Array[T.nilable(String)]) } + def dimensions + end + + sig { params(_: T::Array[T.nilable(String)]).returns(T::Array[T.nilable(String)]) } + def dimensions=(_) + end + + sig do + returns( + T::Array[ + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::MatrixConfig::MatrixValue + ] + ) + end + def matrix_values + end + + sig do + params( + _: T::Array[ + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::MatrixConfig::MatrixValue + ] + ) + .returns( + T::Array[ + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::MatrixConfig::MatrixValue + ] + ) + end + def matrix_values=(_) + end + + sig do + params( + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + matrix_values: T::Array[ + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::MatrixConfig::MatrixValue + ] + ) + .void + end + def initialize(default_unit_amount:, dimensions:, matrix_values:) + end + + sig do + override + .returns( + { + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + matrix_values: T::Array[ + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::MatrixConfig::MatrixValue + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::BaseModel + sig { returns(T::Array[T.nilable(String)]) } + def dimension_values + end + + sig { params(_: T::Array[T.nilable(String)]).returns(T::Array[T.nilable(String)]) } + def dimension_values=(_) + end + + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { params(dimension_values: T::Array[T.nilable(String)], unit_amount: String).void } + def initialize(dimension_values:, unit_amount:) + end + + sig { override.returns({dimension_values: T::Array[T.nilable(String)], unit_amount: String}) } + def to_hash + end + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingMatrixWithAllocationPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig do + returns( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::MatrixWithAllocationConfig + ) + end + def matrix_with_allocation_config + end + + sig do + params( + _: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::MatrixWithAllocationConfig + ) + .returns( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::MatrixWithAllocationConfig + ) + end + def matrix_with_allocation_config=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + currency: String, + item_id: String, + matrix_with_allocation_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::MatrixWithAllocationConfig, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + currency:, + item_id:, + matrix_with_allocation_config:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :matrix_with_allocation + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + currency: String, + item_id: String, + matrix_with_allocation_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::MatrixWithAllocationConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class MatrixWithAllocationConfig < Orb::BaseModel + sig { returns(Float) } + def allocation + end + + sig { params(_: Float).returns(Float) } + def allocation=(_) + end + + sig { returns(String) } + def default_unit_amount + end + + sig { params(_: String).returns(String) } + def default_unit_amount=(_) + end + + sig { returns(T::Array[T.nilable(String)]) } + def dimensions + end + + sig { params(_: T::Array[T.nilable(String)]).returns(T::Array[T.nilable(String)]) } + def dimensions=(_) + end + + sig do + returns( + T::Array[ + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::MatrixWithAllocationConfig::MatrixValue + ] + ) + end + def matrix_values + end + + sig do + params( + _: T::Array[ + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::MatrixWithAllocationConfig::MatrixValue + ] + ) + .returns( + T::Array[ + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::MatrixWithAllocationConfig::MatrixValue + ] + ) + end + def matrix_values=(_) + end + + sig do + params( + allocation: Float, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + matrix_values: T::Array[ + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::MatrixWithAllocationConfig::MatrixValue + ] + ) + .void + end + def initialize(allocation:, default_unit_amount:, dimensions:, matrix_values:) + end + + sig do + override + .returns( + { + allocation: Float, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + matrix_values: T::Array[ + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::MatrixWithAllocationConfig::MatrixValue + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::BaseModel + sig { returns(T::Array[T.nilable(String)]) } + def dimension_values + end + + sig { params(_: T::Array[T.nilable(String)]).returns(T::Array[T.nilable(String)]) } + def dimension_values=(_) + end + + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { params(dimension_values: T::Array[T.nilable(String)], unit_amount: String).void } + def initialize(dimension_values:, unit_amount:) + end + + sig { override.returns({dimension_values: T::Array[T.nilable(String)], unit_amount: String}) } + def to_hash + end + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingTieredPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::TieredConfig) } + def tiered_config + end + + sig do + params(_: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::TieredConfig) + .returns(Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::TieredConfig) + end + def tiered_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + currency: String, + item_id: String, + name: String, + tiered_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::TieredConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + currency:, + item_id:, + name:, + tiered_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :tiered + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + currency: String, + item_id: String, + model_type: Symbol, + name: String, + tiered_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::TieredConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class TieredConfig < Orb::BaseModel + sig do + returns( + T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::TieredConfig::Tier] + ) + end + def tiers + end + + sig do + params( + _: T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::TieredConfig::Tier] + ) + .returns( + T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::TieredConfig::Tier] + ) + end + def tiers=(_) + end + + sig do + params( + tiers: T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::TieredConfig::Tier] + ) + .void + end + def initialize(tiers:) + end + + sig do + override + .returns( + { + tiers: T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::TieredConfig::Tier] + } + ) + end + def to_hash + end + + class Tier < Orb::BaseModel + sig { returns(Float) } + def first_unit + end + + sig { params(_: Float).returns(Float) } + def first_unit=(_) + end + + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { returns(T.nilable(Float)) } + def last_unit + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def last_unit=(_) + end + + sig { params(first_unit: Float, unit_amount: String, last_unit: T.nilable(Float)).void } + def initialize(first_unit:, unit_amount:, last_unit: nil) + end + + sig do + override.returns({first_unit: Float, unit_amount: String, last_unit: T.nilable(Float)}) + end + def to_hash + end + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingTieredBpsPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig do + returns( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::TieredBpsConfig + ) + end + def tiered_bps_config + end + + sig do + params( + _: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::TieredBpsConfig + ) + .returns( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::TieredBpsConfig + ) + end + def tiered_bps_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + currency: String, + item_id: String, + name: String, + tiered_bps_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::TieredBpsConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + currency:, + item_id:, + name:, + tiered_bps_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :tiered_bps + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + currency: String, + item_id: String, + model_type: Symbol, + name: String, + tiered_bps_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::TieredBpsConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class TieredBpsConfig < Orb::BaseModel + sig do + returns( + T::Array[ + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::TieredBpsConfig::Tier + ] + ) + end + def tiers + end + + sig do + params( + _: T::Array[ + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::TieredBpsConfig::Tier + ] + ) + .returns( + T::Array[ + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::TieredBpsConfig::Tier + ] + ) + end + def tiers=(_) + end + + sig do + params( + tiers: T::Array[ + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::TieredBpsConfig::Tier + ] + ) + .void + end + def initialize(tiers:) + end + + sig do + override + .returns( + { + tiers: T::Array[ + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::TieredBpsConfig::Tier + ] + } + ) + end + def to_hash + end + + class Tier < Orb::BaseModel + sig { returns(Float) } + def bps + end + + sig { params(_: Float).returns(Float) } + def bps=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(T.nilable(String)) } + def maximum_amount + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_maximum + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_maximum=(_) + end + + sig do + params( + bps: Float, + minimum_amount: String, + maximum_amount: T.nilable(String), + per_unit_maximum: T.nilable(String) + ) + .void + end + def initialize(bps:, minimum_amount:, maximum_amount: nil, per_unit_maximum: nil) + end + + sig do + override + .returns( + { + bps: Float, + minimum_amount: String, + maximum_amount: T.nilable(String), + per_unit_maximum: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingBpsPrice < Orb::BaseModel + sig { returns(Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BpsConfig) } + def bps_config + end + + sig do + params(_: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BpsConfig) + .returns(Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BpsConfig) + end + def bps_config=(_) + end + + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + bps_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BpsConfig, + cadence: Symbol, + currency: String, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + bps_config:, + cadence:, + currency:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :bps + ) + end + + sig do + override + .returns( + { + bps_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BpsConfig, + cadence: Symbol, + currency: String, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class BpsConfig < Orb::BaseModel + sig { returns(Float) } + def bps + end + + sig { params(_: Float).returns(Float) } + def bps=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_maximum + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_maximum=(_) + end + + sig { params(bps: Float, per_unit_maximum: T.nilable(String)).void } + def initialize(bps:, per_unit_maximum: nil) + end + + sig { override.returns({bps: Float, per_unit_maximum: T.nilable(String)}) } + def to_hash + end + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingBulkBpsPrice < Orb::BaseModel + sig { returns(Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig) } + def bulk_bps_config + end + + sig do + params( + _: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig + ) + .returns(Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig) + end + def bulk_bps_config=(_) + end + + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + bulk_bps_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig, + cadence: Symbol, + currency: String, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + bulk_bps_config:, + cadence:, + currency:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :bulk_bps + ) + end + + sig do + override + .returns( + { + bulk_bps_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig, + cadence: Symbol, + currency: String, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class BulkBpsConfig < Orb::BaseModel + sig do + returns( + T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig::Tier] + ) + end + def tiers + end + + sig do + params( + _: T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig::Tier] + ) + .returns( + T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig::Tier] + ) + end + def tiers=(_) + end + + sig do + params( + tiers: T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig::Tier] + ) + .void + end + def initialize(tiers:) + end + + sig do + override + .returns( + { + tiers: T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig::Tier] + } + ) + end + def to_hash + end + + class Tier < Orb::BaseModel + sig { returns(Float) } + def bps + end + + sig { params(_: Float).returns(Float) } + def bps=(_) + end + + sig { returns(T.nilable(String)) } + def maximum_amount + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(String)) } + def per_unit_maximum + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def per_unit_maximum=(_) + end + + sig do + params( + bps: Float, + maximum_amount: T.nilable(String), + per_unit_maximum: T.nilable(String) + ).void + end + def initialize(bps:, maximum_amount: nil, per_unit_maximum: nil) + end + + sig do + override.returns( + { + bps: Float, + maximum_amount: T.nilable(String), + per_unit_maximum: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingBulkPrice < Orb::BaseModel + sig { returns(Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig) } + def bulk_config + end + + sig do + params(_: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig) + .returns(Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig) + end + def bulk_config=(_) + end + + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + bulk_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig, + cadence: Symbol, + currency: String, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + bulk_config:, + cadence:, + currency:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :bulk + ) + end + + sig do + override + .returns( + { + bulk_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig, + cadence: Symbol, + currency: String, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class BulkConfig < Orb::BaseModel + sig do + returns( + T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig::Tier] + ) + end + def tiers + end + + sig do + params( + _: T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig::Tier] + ) + .returns( + T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig::Tier] + ) + end + def tiers=(_) + end + + sig do + params( + tiers: T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig::Tier] + ) + .void + end + def initialize(tiers:) + end + + sig do + override + .returns( + { + tiers: T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig::Tier] + } + ) + end + def to_hash + end + + class Tier < Orb::BaseModel + sig { returns(String) } + def unit_amount + end + + sig { params(_: String).returns(String) } + def unit_amount=(_) + end + + sig { returns(T.nilable(Float)) } + def maximum_units + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def maximum_units=(_) + end + + sig { params(unit_amount: String, maximum_units: T.nilable(Float)).void } + def initialize(unit_amount:, maximum_units: nil) + end + + sig { override.returns({unit_amount: String, maximum_units: T.nilable(Float)}) } + def to_hash + end + end + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingThresholdTotalAmountPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def threshold_total_amount_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def threshold_total_amount_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + currency: String, + item_id: String, + name: String, + threshold_total_amount_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + currency:, + item_id:, + name:, + threshold_total_amount_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :threshold_total_amount + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + currency: String, + item_id: String, + model_type: Symbol, + name: String, + threshold_total_amount_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingTieredPackagePrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def tiered_package_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def tiered_package_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + currency: String, + item_id: String, + name: String, + tiered_package_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + currency:, + item_id:, + name:, + tiered_package_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :tiered_package + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + currency: String, + item_id: String, + model_type: Symbol, + name: String, + tiered_package_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingGroupedTieredPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def grouped_tiered_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def grouped_tiered_config=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + currency: String, + grouped_tiered_config: T::Hash[Symbol, T.anything], + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + currency:, + grouped_tiered_config:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :grouped_tiered + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + currency: String, + grouped_tiered_config: T::Hash[Symbol, T.anything], + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingMaxGroupTieredPackagePrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def max_group_tiered_package_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def max_group_tiered_package_config=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + currency: String, + item_id: String, + max_group_tiered_package_config: T::Hash[Symbol, T.anything], + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + currency:, + item_id:, + max_group_tiered_package_config:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :max_group_tiered_package + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + currency: String, + item_id: String, + max_group_tiered_package_config: T::Hash[Symbol, T.anything], + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingTieredWithMinimumPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def tiered_with_minimum_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def tiered_with_minimum_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + currency: String, + item_id: String, + name: String, + tiered_with_minimum_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + currency:, + item_id:, + name:, + tiered_with_minimum_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :tiered_with_minimum + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + currency: String, + item_id: String, + model_type: Symbol, + name: String, + tiered_with_minimum_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingPackageWithAllocationPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def package_with_allocation_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def package_with_allocation_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + currency: String, + item_id: String, + name: String, + package_with_allocation_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + currency:, + item_id:, + name:, + package_with_allocation_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :package_with_allocation + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + currency: String, + item_id: String, + model_type: Symbol, + name: String, + package_with_allocation_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingTieredPackageWithMinimumPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def tiered_package_with_minimum_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def tiered_package_with_minimum_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + currency: String, + item_id: String, + name: String, + tiered_package_with_minimum_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + currency:, + item_id:, + name:, + tiered_package_with_minimum_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :tiered_package_with_minimum + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + currency: String, + item_id: String, + model_type: Symbol, + name: String, + tiered_package_with_minimum_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingUnitWithPercentPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def unit_with_percent_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def unit_with_percent_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + currency: String, + item_id: String, + name: String, + unit_with_percent_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + currency:, + item_id:, + name:, + unit_with_percent_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :unit_with_percent + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + currency: String, + item_id: String, + model_type: Symbol, + name: String, + unit_with_percent_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingTieredWithProrationPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def tiered_with_proration_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def tiered_with_proration_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + currency: String, + item_id: String, + name: String, + tiered_with_proration_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + currency:, + item_id:, + name:, + tiered_with_proration_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :tiered_with_proration + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + currency: String, + item_id: String, + model_type: Symbol, + name: String, + tiered_with_proration_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingUnitWithProrationPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def unit_with_proration_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def unit_with_proration_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + currency: String, + item_id: String, + name: String, + unit_with_proration_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + currency:, + item_id:, + name:, + unit_with_proration_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :unit_with_proration + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + currency: String, + item_id: String, + model_type: Symbol, + name: String, + unit_with_proration_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingGroupedAllocationPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def grouped_allocation_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def grouped_allocation_config=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + currency: String, + grouped_allocation_config: T::Hash[Symbol, T.anything], + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + currency:, + grouped_allocation_config:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :grouped_allocation + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + currency: String, + grouped_allocation_config: T::Hash[Symbol, T.anything], + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingGroupedWithProratedMinimumPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def grouped_with_prorated_minimum_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def grouped_with_prorated_minimum_config=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + currency: String, + grouped_with_prorated_minimum_config: T::Hash[Symbol, T.anything], + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + currency:, + grouped_with_prorated_minimum_config:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :grouped_with_prorated_minimum + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + currency: String, + grouped_with_prorated_minimum_config: T::Hash[Symbol, T.anything], + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingGroupedWithMeteredMinimumPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def grouped_with_metered_minimum_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def grouped_with_metered_minimum_config=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + currency: String, + grouped_with_metered_minimum_config: T::Hash[Symbol, T.anything], + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + currency:, + grouped_with_metered_minimum_config:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :grouped_with_metered_minimum + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + currency: String, + grouped_with_metered_minimum_config: T::Hash[Symbol, T.anything], + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingMatrixWithDisplayNamePrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def matrix_with_display_name_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def matrix_with_display_name_config=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + currency: String, + item_id: String, + matrix_with_display_name_config: T::Hash[Symbol, T.anything], + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + currency:, + item_id:, + matrix_with_display_name_config:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :matrix_with_display_name + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + currency: String, + item_id: String, + matrix_with_display_name_config: T::Hash[Symbol, T.anything], + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingBulkWithProrationPrice < Orb::BaseModel + sig { returns(T::Hash[Symbol, T.anything]) } + def bulk_with_proration_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def bulk_with_proration_config=(_) + end + + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + bulk_with_proration_config: T::Hash[Symbol, T.anything], + cadence: Symbol, + currency: String, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + bulk_with_proration_config:, + cadence:, + currency:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :bulk_with_proration + ) + end + + sig do + override + .returns( + { + bulk_with_proration_config: T::Hash[Symbol, T.anything], + cadence: Symbol, + currency: String, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingGroupedTieredPackagePrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def grouped_tiered_package_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def grouped_tiered_package_config=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + currency: String, + grouped_tiered_package_config: T::Hash[Symbol, T.anything], + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + currency:, + grouped_tiered_package_config:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :grouped_tiered_package + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + currency: String, + grouped_tiered_package_config: T::Hash[Symbol, T.anything], + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingScalableMatrixWithUnitPricingPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def scalable_matrix_with_unit_pricing_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def scalable_matrix_with_unit_pricing_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + currency: String, + item_id: String, + name: String, + scalable_matrix_with_unit_pricing_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + currency:, + item_id:, + name:, + scalable_matrix_with_unit_pricing_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :scalable_matrix_with_unit_pricing + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + currency: String, + item_id: String, + model_type: Symbol, + name: String, + scalable_matrix_with_unit_pricing_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingScalableMatrixWithTieredPricingPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def scalable_matrix_with_tiered_pricing_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def scalable_matrix_with_tiered_pricing_config=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + currency: String, + item_id: String, + name: String, + scalable_matrix_with_tiered_pricing_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + currency:, + item_id:, + name:, + scalable_matrix_with_tiered_pricing_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :scalable_matrix_with_tiered_pricing + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + currency: String, + item_id: String, + model_type: Symbol, + name: String, + scalable_matrix_with_tiered_pricing_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + class NewFloatingCumulativeGroupedBulkPrice < Orb::BaseModel + sig { returns(Symbol) } + def cadence + end + + sig { params(_: Symbol).returns(Symbol) } + def cadence=(_) + end + + sig { returns(T::Hash[Symbol, T.anything]) } + def cumulative_grouped_bulk_config + end + + sig { params(_: T::Hash[Symbol, T.anything]).returns(T::Hash[Symbol, T.anything]) } + def cumulative_grouped_bulk_config=(_) + end + + sig { returns(String) } + def currency + end + + sig { params(_: String).returns(String) } + def currency=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(Symbol) } + def model_type + end + + sig { params(_: Symbol).returns(Symbol) } + def model_type=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { returns(T.nilable(String)) } + def billable_metric_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def billable_metric_id=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def billed_in_advance + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def billed_in_advance=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::BillingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::BillingCycleConfiguration + ) + ) + end + def billing_cycle_configuration=(_) + end + + sig { returns(T.nilable(Float)) } + def conversion_rate + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def conversion_rate=(_) + end + + sig { returns(T.nilable(String)) } + def external_price_id + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def external_price_id=(_) + end + + sig { returns(T.nilable(Float)) } + def fixed_price_quantity + end + + sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } + def fixed_price_quantity=(_) + end + + sig { returns(T.nilable(String)) } + def invoice_grouping_key + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoice_grouping_key=(_) + end + + sig do + returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration + end + + sig do + params( + _: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::InvoicingCycleConfiguration + ) + ) + .returns( + T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::InvoicingCycleConfiguration + ) + ) + end + def invoicing_cycle_configuration=(_) + end + + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + def metadata + end + + sig do + params(_: T.nilable(T::Hash[Symbol, T.nilable(String)])) + .returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) + end + def metadata=(_) + end + + sig do + params( + cadence: Symbol, + cumulative_grouped_bulk_config: T::Hash[Symbol, T.anything], + currency: String, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ) + .void + end + def initialize( + cadence:, + cumulative_grouped_bulk_config:, + currency:, + item_id:, + name:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + model_type: :cumulative_grouped_bulk + ) + end + + sig do + override + .returns( + { + cadence: Symbol, + cumulative_grouped_bulk_config: T::Hash[Symbol, T.anything], + currency: String, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::BillingCycleConfiguration + ), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable( + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::InvoicingCycleConfiguration + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + class Cadence < Orb::Enum + abstract! + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class BillingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + + class InvoicingCycleConfiguration < Orb::BaseModel + sig { returns(Integer) } + def duration + end + + sig { params(_: Integer).returns(Integer) } + def duration=(_) + end + + sig { returns(Symbol) } + def duration_unit + end + + sig { params(_: Symbol).returns(Symbol) } + def duration_unit=(_) + end + + sig { params(duration: Integer, duration_unit: Symbol).void } + def initialize(duration:, duration_unit:) + end + + sig { override.returns({duration: Integer, duration_unit: Symbol}) } + def to_hash + end + + class DurationUnit < Orb::Enum + abstract! + + DAY = :day + MONTH = :month + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice]] + ) + end + private_class_method def self.variants + end + end + end + + class AddAdjustment < Orb::BaseModel + sig do + returns( + T.any( + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewPercentageDiscount, + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewUsageDiscount, + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewAmountDiscount, + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMinimum, + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMaximum + ) + ) + end + def adjustment + end + + sig do + params( + _: T.any( + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewPercentageDiscount, + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewUsageDiscount, + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewAmountDiscount, + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMinimum, + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMaximum + ) + ) + .returns( + T.any( + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewPercentageDiscount, + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewUsageDiscount, + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewAmountDiscount, + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMinimum, + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMaximum + ) + ) + end + def adjustment=(_) + end + + sig { returns(T.any(Time, Symbol)) } + def start_date + end + + sig { params(_: T.any(Time, Symbol)).returns(T.any(Time, Symbol)) } + def start_date=(_) + end + + sig { returns(T.nilable(T.any(Time, Symbol))) } + def end_date + end + + sig { params(_: T.nilable(T.any(Time, Symbol))).returns(T.nilable(T.any(Time, Symbol))) } + def end_date=(_) + end + + sig do + params( + adjustment: T.any( + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewPercentageDiscount, + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewUsageDiscount, + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewAmountDiscount, + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMinimum, + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMaximum + ), + start_date: T.any(Time, Symbol), + end_date: T.nilable(T.any(Time, Symbol)) + ) + .void + end + def initialize(adjustment:, start_date:, end_date: nil) + end + + sig do + override + .returns( + { + adjustment: T.any( + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewPercentageDiscount, + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewUsageDiscount, + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewAmountDiscount, + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMinimum, + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMaximum + ), + start_date: T.any(Time, Symbol), + end_date: T.nilable(T.any(Time, Symbol)) + } + ) + end + def to_hash + end + + class Adjustment < Orb::Union + abstract! + + class NewPercentageDiscount < Orb::BaseModel + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + percentage_discount: Float, + is_invoice_level: T::Boolean, + adjustment_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + percentage_discount:, + is_invoice_level: nil, + adjustment_type: :percentage_discount + ) + end + + sig do + override + .returns( + { + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + percentage_discount: Float, + is_invoice_level: T::Boolean + } + ) + end + def to_hash + end + end + + class NewUsageDiscount < Orb::BaseModel + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + usage_discount: Float, + is_invoice_level: T::Boolean, + adjustment_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + usage_discount:, + is_invoice_level: nil, + adjustment_type: :usage_discount + ) + end + + sig do + override + .returns( + { + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + usage_discount: Float, + is_invoice_level: T::Boolean + } + ) + end + def to_hash + end + end + + class NewAmountDiscount < Orb::BaseModel + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig do + params( + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + adjustment_type: Symbol + ) + .void + end + def initialize( + amount_discount:, + applies_to_price_ids:, + is_invoice_level: nil, + adjustment_type: :amount_discount + ) + end + + sig do + override + .returns( + { + adjustment_type: Symbol, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean + } + ) + end + def to_hash + end + end + + class NewMinimum < Orb::BaseModel + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + item_id: String, + minimum_amount: String, + is_invoice_level: T::Boolean, + adjustment_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + item_id:, + minimum_amount:, + is_invoice_level: nil, + adjustment_type: :minimum + ) + end + + sig do + override + .returns( + { + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + item_id: String, + minimum_amount: String, + is_invoice_level: T::Boolean + } + ) + end + def to_hash + end + end + + class NewMaximum < Orb::BaseModel + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + maximum_amount: String, + is_invoice_level: T::Boolean, + adjustment_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + maximum_amount:, + is_invoice_level: nil, + adjustment_type: :maximum + ) + end + + sig do + override + .returns( + { + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + maximum_amount: String, + is_invoice_level: T::Boolean + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewPercentageDiscount], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewUsageDiscount], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewAmountDiscount], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMinimum], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMaximum]] + ) + end + private_class_method def self.variants + end + end + + class StartDate < Orb::Union + abstract! + + sig { override.returns([[NilClass, Time], [NilClass, Symbol]]) } + private_class_method def self.variants + end + end + + class EndDate < Orb::Union + abstract! + + sig { override.returns([[NilClass, Time], [NilClass, Symbol]]) } + private_class_method def self.variants + end + end + end + + class Edit < Orb::BaseModel + sig { returns(String) } + def price_interval_id + end + + sig { params(_: String).returns(String) } + def price_interval_id=(_) + end + + sig { returns(T.nilable(Integer)) } + def billing_cycle_day + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def billing_cycle_day=(_) + end + + sig { returns(T.nilable(T.any(Time, Symbol))) } + def end_date + end + + sig { params(_: T.nilable(T.any(Time, Symbol))).returns(T.nilable(T.any(Time, Symbol))) } + def end_date=(_) + end + + sig { returns(T.nilable(String)) } + def filter + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def filter=(_) + end + + sig do + returns( + T.nilable(T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Edit::FixedFeeQuantityTransition]) + ) + end + def fixed_fee_quantity_transitions + end + + sig do + params( + _: T.nilable(T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Edit::FixedFeeQuantityTransition]) + ) + .returns( + T.nilable(T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Edit::FixedFeeQuantityTransition]) + ) + end + def fixed_fee_quantity_transitions=(_) + end + + sig { returns(T.nilable(T.any(Time, Symbol))) } + def start_date + end + + sig { params(_: T.any(Time, Symbol)).returns(T.any(Time, Symbol)) } + def start_date=(_) + end + + sig { returns(T.nilable(T::Array[String])) } + def usage_customer_ids + end + + sig { params(_: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def usage_customer_ids=(_) + end + + sig do + params( + price_interval_id: String, + billing_cycle_day: T.nilable(Integer), + end_date: T.nilable(T.any(Time, Symbol)), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable(T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Edit::FixedFeeQuantityTransition]), + start_date: T.any(Time, Symbol), + usage_customer_ids: T.nilable(T::Array[String]) + ) + .void + end + def initialize( + price_interval_id:, + billing_cycle_day: nil, + end_date: nil, + filter: nil, + fixed_fee_quantity_transitions: nil, + start_date: nil, + usage_customer_ids: nil + ) + end + + sig do + override + .returns( + { + price_interval_id: String, + billing_cycle_day: T.nilable(Integer), + end_date: T.nilable(T.any(Time, Symbol)), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable(T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Edit::FixedFeeQuantityTransition]), + start_date: T.any(Time, Symbol), + usage_customer_ids: T.nilable(T::Array[String]) + } + ) + end + def to_hash + end + + class EndDate < Orb::Union + abstract! + + sig { override.returns([[NilClass, Time], [NilClass, Symbol]]) } + private_class_method def self.variants + end + end + + class FixedFeeQuantityTransition < Orb::BaseModel + sig { returns(Time) } + def effective_date + end + + sig { params(_: Time).returns(Time) } + def effective_date=(_) + end + + sig { returns(Integer) } + def quantity + end + + sig { params(_: Integer).returns(Integer) } + def quantity=(_) + end + + sig { params(effective_date: Time, quantity: Integer).void } + def initialize(effective_date:, quantity:) + end + + sig { override.returns({effective_date: Time, quantity: Integer}) } + def to_hash end end diff --git a/rbi/lib/orb/models/subscription_price_intervals_response.rbi b/rbi/lib/orb/models/subscription_price_intervals_response.rbi new file mode 100644 index 00000000..1e9e264f --- /dev/null +++ b/rbi/lib/orb/models/subscription_price_intervals_response.rbi @@ -0,0 +1,1901 @@ +# typed: strong + +module Orb + module Models + class SubscriptionPriceIntervalsResponse < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Integer)) } + def active_plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def active_plan_phase_order=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval]) } + def adjustment_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval]) + .returns(T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval]) + end + def adjustment_intervals=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def auto_collection + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def auto_collection=(_) + end + + sig { returns(Orb::Models::SubscriptionPriceIntervalsResponse::BillingCycleAnchorConfiguration) } + def billing_cycle_anchor_configuration + end + + sig do + params(_: Orb::Models::SubscriptionPriceIntervalsResponse::BillingCycleAnchorConfiguration) + .returns(Orb::Models::SubscriptionPriceIntervalsResponse::BillingCycleAnchorConfiguration) + end + def billing_cycle_anchor_configuration=(_) + end + + sig { returns(Integer) } + def billing_cycle_day + end + + sig { params(_: Integer).returns(Integer) } + def billing_cycle_day=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_end_date=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_start_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_start_date=(_) + end + + sig { returns(Orb::Models::Customer) } + def customer + end + + sig { params(_: Orb::Models::Customer).returns(Orb::Models::Customer) } + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def default_invoice_memo + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def default_invoice_memo=(_) + end + + sig do + returns( + T::Array[ + T.any( + Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + end + def discount_intervals + end + + sig do + params( + _: T::Array[ + T.any( + Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + .returns( + T::Array[ + T.any( + Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + end + def discount_intervals=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::FixedFeeQuantitySchedule]) } + def fixed_fee_quantity_schedule + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::FixedFeeQuantitySchedule]) + .returns(T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::FixedFeeQuantitySchedule]) + end + def fixed_fee_quantity_schedule=(_) + end + + sig { returns(T.nilable(String)) } + def invoicing_threshold + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoicing_threshold=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::MaximumInterval]) } + def maximum_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::MaximumInterval]) + .returns(T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::MaximumInterval]) + end + def maximum_intervals=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::MinimumInterval]) } + def minimum_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::MinimumInterval]) + .returns(T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::MinimumInterval]) + end + def minimum_intervals=(_) + end + + sig { returns(Integer) } + def net_terms + end + + sig { params(_: Integer).returns(Integer) } + def net_terms=(_) + end + + sig { returns(Orb::Models::Plan) } + def plan + end + + sig { params(_: Orb::Models::Plan).returns(Orb::Models::Plan) } + def plan=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval]) } + def price_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval]) + .returns(T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval]) + end + def price_intervals=(_) + end + + sig { returns(T.nilable(Orb::Models::SubscriptionPriceIntervalsResponse::RedeemedCoupon)) } + def redeemed_coupon + end + + sig do + params(_: T.nilable(Orb::Models::SubscriptionPriceIntervalsResponse::RedeemedCoupon)) + .returns(T.nilable(Orb::Models::SubscriptionPriceIntervalsResponse::RedeemedCoupon)) + end + def redeemed_coupon=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(Symbol) } + def status + end + + sig { params(_: Symbol).returns(Symbol) } + def status=(_) + end + + sig { returns(Orb::Models::SubscriptionPriceIntervalsResponse::TrialInfo) } + def trial_info + end + + sig do + params(_: Orb::Models::SubscriptionPriceIntervalsResponse::TrialInfo) + .returns(Orb::Models::SubscriptionPriceIntervalsResponse::TrialInfo) + end + def trial_info=(_) + end + + sig do + params( + id: String, + active_plan_phase_order: T.nilable(Integer), + adjustment_intervals: T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval], + auto_collection: T.nilable(T::Boolean), + billing_cycle_anchor_configuration: Orb::Models::SubscriptionPriceIntervalsResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + customer: Orb::Models::Customer, + default_invoice_memo: T.nilable(String), + discount_intervals: T::Array[ + T.any( + Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::UsageDiscountInterval + ) + ], + end_date: T.nilable(Time), + fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::FixedFeeQuantitySchedule], + invoicing_threshold: T.nilable(String), + maximum_intervals: T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::MaximumInterval], + metadata: T::Hash[Symbol, String], + minimum_intervals: T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval], + redeemed_coupon: T.nilable(Orb::Models::SubscriptionPriceIntervalsResponse::RedeemedCoupon), + start_date: Time, + status: Symbol, + trial_info: Orb::Models::SubscriptionPriceIntervalsResponse::TrialInfo + ) + .void + end + def initialize( + id:, + active_plan_phase_order:, + adjustment_intervals:, + auto_collection:, + billing_cycle_anchor_configuration:, + billing_cycle_day:, + created_at:, + current_billing_period_end_date:, + current_billing_period_start_date:, + customer:, + default_invoice_memo:, + discount_intervals:, + end_date:, + fixed_fee_quantity_schedule:, + invoicing_threshold:, + maximum_intervals:, + metadata:, + minimum_intervals:, + net_terms:, + plan:, + price_intervals:, + redeemed_coupon:, + start_date:, + status:, + trial_info: + ) + end + + sig do + override + .returns( + { + id: String, + active_plan_phase_order: T.nilable(Integer), + adjustment_intervals: T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval], + auto_collection: T.nilable(T::Boolean), + billing_cycle_anchor_configuration: Orb::Models::SubscriptionPriceIntervalsResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + customer: Orb::Models::Customer, + default_invoice_memo: T.nilable(String), + discount_intervals: T::Array[ + T.any( + Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::UsageDiscountInterval + ) + ], + end_date: T.nilable(Time), + fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::FixedFeeQuantitySchedule], + invoicing_threshold: T.nilable(String), + maximum_intervals: T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::MaximumInterval], + metadata: T::Hash[Symbol, String], + minimum_intervals: T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval], + redeemed_coupon: T.nilable(Orb::Models::SubscriptionPriceIntervalsResponse::RedeemedCoupon), + start_date: Time, + status: Symbol, + trial_info: Orb::Models::SubscriptionPriceIntervalsResponse::TrialInfo + } + ) + end + def to_hash + end + + class AdjustmentInterval < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig do + returns( + T.any( + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + end + def adjustment + end + + sig do + params( + _: T.any( + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + .returns( + T.any( + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + end + def adjustment=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + id: String, + adjustment: T.any( + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ), + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time + ) + .void + end + def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:) + end + + sig do + override + .returns( + { + id: String, + adjustment: T.any( + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ), + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time + } + ) + end + def to_hash + end + + class Adjustment < Orb::Union + abstract! + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float, + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + usage_discount:, + adjustment_type: :usage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float + } + ) + end + def to_hash + end + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + amount_discount:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + adjustment_type: :amount_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + percentage_discount:, + plan_phase_order:, + reason:, + adjustment_type: :percentage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + item_id:, + minimum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :minimum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + maximum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :maximum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + ) + end + private_class_method def self.variants + end + end + end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + sig { returns(Integer) } + def day + end + + sig { params(_: Integer).returns(Integer) } + def day=(_) + end + + sig { returns(T.nilable(Integer)) } + def month + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def month=(_) + end + + sig { returns(T.nilable(Integer)) } + def year + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def year=(_) + end + + sig { params(day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)).void } + def initialize(day:, month: nil, year: nil) + end + + sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) } + def to_hash + end + end + + class DiscountInterval < Orb::Union + abstract! + + class AmountDiscountInterval < Orb::BaseModel + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + amount_discount: String, + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time, + discount_type: Symbol + ) + .void + end + def initialize( + amount_discount:, + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + start_date:, + discount_type: :amount + ) + end + + sig do + override + .returns( + { + amount_discount: String, + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + start_date: Time + } + ) + end + def to_hash + end + end + + class PercentageDiscountInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + percentage_discount: Float, + start_date: Time, + discount_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + percentage_discount:, + start_date:, + discount_type: :percentage + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + percentage_discount: Float, + start_date: Time + } + ) + end + def to_hash + end + end + + class UsageDiscountInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time, + usage_discount: Float, + discount_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + start_date:, + usage_discount:, + discount_type: :usage + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + start_date: Time, + usage_discount: Float + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::AmountDiscountInterval], [Symbol, Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::PercentageDiscountInterval], [Symbol, Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::UsageDiscountInterval]] + ) + end + private_class_method def self.variants + end + end + + class FixedFeeQuantitySchedule < Orb::BaseModel + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(Float) } + def quantity + end + + sig { params(_: Float).returns(Float) } + def quantity=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { params(end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time).void } + def initialize(end_date:, price_id:, quantity:, start_date:) + end + + sig do + override.returns({end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time}) + end + def to_hash + end + end + + class MaximumInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + maximum_amount: String, + start_date: Time + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + maximum_amount:, + start_date: + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + maximum_amount: String, + start_date: Time + } + ) + end + def to_hash + end + end + + class MinimumInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + minimum_amount: String, + start_date: Time + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + minimum_amount:, + start_date: + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + minimum_amount: String, + start_date: Time + } + ) + end + def to_hash + end + end + + class PriceInterval < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Integer) } + def billing_cycle_day + end + + sig { params(_: Integer).returns(Integer) } + def billing_cycle_day=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_end_date=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_start_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_start_date=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(T.nilable(String)) } + def filter + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def filter=(_) + end + + sig do + returns( + T.nilable( + T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval::FixedFeeQuantityTransition] + ) + ) + end + def fixed_fee_quantity_transitions + end + + sig do + params( + _: T.nilable( + T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval::FixedFeeQuantityTransition] + ) + ) + .returns( + T.nilable( + T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval::FixedFeeQuantityTransition] + ) + ) + end + def fixed_fee_quantity_transitions=(_) + end + + sig do + returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price + end + + sig do + params( + _: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + .returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(T.nilable(T::Array[String])) } + def usage_customer_ids + end + + sig { params(_: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def usage_customer_ids=(_) + end + + sig do + params( + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + end_date: T.nilable(Time), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable( + T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval::FixedFeeQuantityTransition] + ), + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + start_date: Time, + usage_customer_ids: T.nilable(T::Array[String]) + ) + .void + end + def initialize( + id:, + billing_cycle_day:, + current_billing_period_end_date:, + current_billing_period_start_date:, + end_date:, + filter:, + fixed_fee_quantity_transitions:, + price:, + start_date:, + usage_customer_ids: + ) + end + + sig do + override + .returns( + { + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + end_date: T.nilable(Time), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable( + T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval::FixedFeeQuantityTransition] + ), + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + start_date: Time, + usage_customer_ids: T.nilable(T::Array[String]) + } + ) + end + def to_hash + end + + class FixedFeeQuantityTransition < Orb::BaseModel + sig { returns(Time) } + def effective_date + end + + sig { params(_: Time).returns(Time) } + def effective_date=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(Integer) } + def quantity + end + + sig { params(_: Integer).returns(Integer) } + def quantity=(_) + end + + sig { params(effective_date: Time, price_id: String, quantity: Integer).void } + def initialize(effective_date:, price_id:, quantity:) + end + + sig { override.returns({effective_date: Time, price_id: String, quantity: Integer}) } + def to_hash + end + end + end + + class RedeemedCoupon < Orb::BaseModel + sig { returns(String) } + def coupon_id + end + + sig { params(_: String).returns(String) } + def coupon_id=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { params(coupon_id: String, end_date: T.nilable(Time), start_date: Time).void } + def initialize(coupon_id:, end_date:, start_date:) + end + + sig { override.returns({coupon_id: String, end_date: T.nilable(Time), start_date: Time}) } + def to_hash + end + end + + class Status < Orb::Enum + abstract! + + ACTIVE = :active + ENDED = :ended + UPCOMING = :upcoming + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class TrialInfo < Orb::BaseModel + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { params(end_date: T.nilable(Time)).void } + def initialize(end_date:) + end + + sig { override.returns({end_date: T.nilable(Time)}) } + def to_hash + end + end + end + end +end diff --git a/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi b/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi index c921ea51..3031d752 100644 --- a/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi +++ b/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi @@ -60,13 +60,13 @@ module Orb def billing_cycle_alignment=(_) end - sig { returns(T.nilable(Orb::Models::BillingCycleAnchorConfigurationModel)) } + sig { returns(T.nilable(Orb::Models::SubscriptionSchedulePlanChangeParams::BillingCycleAnchorConfiguration)) } def billing_cycle_anchor_configuration end sig do - params(_: T.nilable(Orb::Models::BillingCycleAnchorConfigurationModel)) - .returns(T.nilable(Orb::Models::BillingCycleAnchorConfigurationModel)) + params(_: T.nilable(Orb::Models::SubscriptionSchedulePlanChangeParams::BillingCycleAnchorConfiguration)) + .returns(T.nilable(Orb::Models::SubscriptionSchedulePlanChangeParams::BillingCycleAnchorConfiguration)) end def billing_cycle_anchor_configuration=(_) end @@ -243,7 +243,7 @@ module Orb align_billing_with_plan_change_date: T.nilable(T::Boolean), auto_collection: T.nilable(T::Boolean), billing_cycle_alignment: T.nilable(Symbol), - billing_cycle_anchor_configuration: T.nilable(Orb::Models::BillingCycleAnchorConfigurationModel), + billing_cycle_anchor_configuration: T.nilable(Orb::Models::SubscriptionSchedulePlanChangeParams::BillingCycleAnchorConfiguration), change_date: T.nilable(Time), coupon_redemption_code: T.nilable(String), credits_overage_rate: T.nilable(Float), @@ -308,7 +308,7 @@ module Orb align_billing_with_plan_change_date: T.nilable(T::Boolean), auto_collection: T.nilable(T::Boolean), billing_cycle_alignment: T.nilable(Symbol), - billing_cycle_anchor_configuration: T.nilable(Orb::Models::BillingCycleAnchorConfigurationModel), + billing_cycle_anchor_configuration: T.nilable(Orb::Models::SubscriptionSchedulePlanChangeParams::BillingCycleAnchorConfiguration), change_date: T.nilable(Time), coupon_redemption_code: T.nilable(String), credits_overage_rate: T.nilable(Float), @@ -358,6 +358,40 @@ module Orb def self.values end end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + sig { returns(Integer) } + def day + end + + sig { params(_: Integer).returns(Integer) } + def day=(_) + end + + sig { returns(T.nilable(Integer)) } + def month + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def month=(_) + end + + sig { returns(T.nilable(Integer)) } + def year + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def year=(_) + end + + sig { params(day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)).void } + def initialize(day:, month: nil, year: nil) + end + + sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) } + def to_hash + end + end end end end diff --git a/rbi/lib/orb/models/subscription_schedule_plan_change_response.rbi b/rbi/lib/orb/models/subscription_schedule_plan_change_response.rbi new file mode 100644 index 00000000..2eaa9e89 --- /dev/null +++ b/rbi/lib/orb/models/subscription_schedule_plan_change_response.rbi @@ -0,0 +1,1901 @@ +# typed: strong + +module Orb + module Models + class SubscriptionSchedulePlanChangeResponse < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Integer)) } + def active_plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def active_plan_phase_order=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval]) } + def adjustment_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval]) + .returns(T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval]) + end + def adjustment_intervals=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def auto_collection + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def auto_collection=(_) + end + + sig { returns(Orb::Models::SubscriptionSchedulePlanChangeResponse::BillingCycleAnchorConfiguration) } + def billing_cycle_anchor_configuration + end + + sig do + params(_: Orb::Models::SubscriptionSchedulePlanChangeResponse::BillingCycleAnchorConfiguration) + .returns(Orb::Models::SubscriptionSchedulePlanChangeResponse::BillingCycleAnchorConfiguration) + end + def billing_cycle_anchor_configuration=(_) + end + + sig { returns(Integer) } + def billing_cycle_day + end + + sig { params(_: Integer).returns(Integer) } + def billing_cycle_day=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_end_date=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_start_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_start_date=(_) + end + + sig { returns(Orb::Models::Customer) } + def customer + end + + sig { params(_: Orb::Models::Customer).returns(Orb::Models::Customer) } + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def default_invoice_memo + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def default_invoice_memo=(_) + end + + sig do + returns( + T::Array[ + T.any( + Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + end + def discount_intervals + end + + sig do + params( + _: T::Array[ + T.any( + Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + .returns( + T::Array[ + T.any( + Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + end + def discount_intervals=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::FixedFeeQuantitySchedule]) } + def fixed_fee_quantity_schedule + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::FixedFeeQuantitySchedule]) + .returns(T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::FixedFeeQuantitySchedule]) + end + def fixed_fee_quantity_schedule=(_) + end + + sig { returns(T.nilable(String)) } + def invoicing_threshold + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoicing_threshold=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::MaximumInterval]) } + def maximum_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::MaximumInterval]) + .returns(T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::MaximumInterval]) + end + def maximum_intervals=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::MinimumInterval]) } + def minimum_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::MinimumInterval]) + .returns(T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::MinimumInterval]) + end + def minimum_intervals=(_) + end + + sig { returns(Integer) } + def net_terms + end + + sig { params(_: Integer).returns(Integer) } + def net_terms=(_) + end + + sig { returns(Orb::Models::Plan) } + def plan + end + + sig { params(_: Orb::Models::Plan).returns(Orb::Models::Plan) } + def plan=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval]) } + def price_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval]) + .returns(T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval]) + end + def price_intervals=(_) + end + + sig { returns(T.nilable(Orb::Models::SubscriptionSchedulePlanChangeResponse::RedeemedCoupon)) } + def redeemed_coupon + end + + sig do + params(_: T.nilable(Orb::Models::SubscriptionSchedulePlanChangeResponse::RedeemedCoupon)) + .returns(T.nilable(Orb::Models::SubscriptionSchedulePlanChangeResponse::RedeemedCoupon)) + end + def redeemed_coupon=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(Symbol) } + def status + end + + sig { params(_: Symbol).returns(Symbol) } + def status=(_) + end + + sig { returns(Orb::Models::SubscriptionSchedulePlanChangeResponse::TrialInfo) } + def trial_info + end + + sig do + params(_: Orb::Models::SubscriptionSchedulePlanChangeResponse::TrialInfo) + .returns(Orb::Models::SubscriptionSchedulePlanChangeResponse::TrialInfo) + end + def trial_info=(_) + end + + sig do + params( + id: String, + active_plan_phase_order: T.nilable(Integer), + adjustment_intervals: T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval], + auto_collection: T.nilable(T::Boolean), + billing_cycle_anchor_configuration: Orb::Models::SubscriptionSchedulePlanChangeResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + customer: Orb::Models::Customer, + default_invoice_memo: T.nilable(String), + discount_intervals: T::Array[ + T.any( + Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::UsageDiscountInterval + ) + ], + end_date: T.nilable(Time), + fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::FixedFeeQuantitySchedule], + invoicing_threshold: T.nilable(String), + maximum_intervals: T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::MaximumInterval], + metadata: T::Hash[Symbol, String], + minimum_intervals: T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval], + redeemed_coupon: T.nilable(Orb::Models::SubscriptionSchedulePlanChangeResponse::RedeemedCoupon), + start_date: Time, + status: Symbol, + trial_info: Orb::Models::SubscriptionSchedulePlanChangeResponse::TrialInfo + ) + .void + end + def initialize( + id:, + active_plan_phase_order:, + adjustment_intervals:, + auto_collection:, + billing_cycle_anchor_configuration:, + billing_cycle_day:, + created_at:, + current_billing_period_end_date:, + current_billing_period_start_date:, + customer:, + default_invoice_memo:, + discount_intervals:, + end_date:, + fixed_fee_quantity_schedule:, + invoicing_threshold:, + maximum_intervals:, + metadata:, + minimum_intervals:, + net_terms:, + plan:, + price_intervals:, + redeemed_coupon:, + start_date:, + status:, + trial_info: + ) + end + + sig do + override + .returns( + { + id: String, + active_plan_phase_order: T.nilable(Integer), + adjustment_intervals: T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval], + auto_collection: T.nilable(T::Boolean), + billing_cycle_anchor_configuration: Orb::Models::SubscriptionSchedulePlanChangeResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + customer: Orb::Models::Customer, + default_invoice_memo: T.nilable(String), + discount_intervals: T::Array[ + T.any( + Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::UsageDiscountInterval + ) + ], + end_date: T.nilable(Time), + fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::FixedFeeQuantitySchedule], + invoicing_threshold: T.nilable(String), + maximum_intervals: T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::MaximumInterval], + metadata: T::Hash[Symbol, String], + minimum_intervals: T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval], + redeemed_coupon: T.nilable(Orb::Models::SubscriptionSchedulePlanChangeResponse::RedeemedCoupon), + start_date: Time, + status: Symbol, + trial_info: Orb::Models::SubscriptionSchedulePlanChangeResponse::TrialInfo + } + ) + end + def to_hash + end + + class AdjustmentInterval < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig do + returns( + T.any( + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + end + def adjustment + end + + sig do + params( + _: T.any( + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + .returns( + T.any( + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + end + def adjustment=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + id: String, + adjustment: T.any( + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ), + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time + ) + .void + end + def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:) + end + + sig do + override + .returns( + { + id: String, + adjustment: T.any( + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ), + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time + } + ) + end + def to_hash + end + + class Adjustment < Orb::Union + abstract! + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float, + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + usage_discount:, + adjustment_type: :usage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float + } + ) + end + def to_hash + end + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + amount_discount:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + adjustment_type: :amount_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + percentage_discount:, + plan_phase_order:, + reason:, + adjustment_type: :percentage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + item_id:, + minimum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :minimum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + maximum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :maximum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + ) + end + private_class_method def self.variants + end + end + end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + sig { returns(Integer) } + def day + end + + sig { params(_: Integer).returns(Integer) } + def day=(_) + end + + sig { returns(T.nilable(Integer)) } + def month + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def month=(_) + end + + sig { returns(T.nilable(Integer)) } + def year + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def year=(_) + end + + sig { params(day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)).void } + def initialize(day:, month: nil, year: nil) + end + + sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) } + def to_hash + end + end + + class DiscountInterval < Orb::Union + abstract! + + class AmountDiscountInterval < Orb::BaseModel + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + amount_discount: String, + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time, + discount_type: Symbol + ) + .void + end + def initialize( + amount_discount:, + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + start_date:, + discount_type: :amount + ) + end + + sig do + override + .returns( + { + amount_discount: String, + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + start_date: Time + } + ) + end + def to_hash + end + end + + class PercentageDiscountInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + percentage_discount: Float, + start_date: Time, + discount_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + percentage_discount:, + start_date:, + discount_type: :percentage + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + percentage_discount: Float, + start_date: Time + } + ) + end + def to_hash + end + end + + class UsageDiscountInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time, + usage_discount: Float, + discount_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + start_date:, + usage_discount:, + discount_type: :usage + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + start_date: Time, + usage_discount: Float + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::AmountDiscountInterval], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::PercentageDiscountInterval], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::UsageDiscountInterval]] + ) + end + private_class_method def self.variants + end + end + + class FixedFeeQuantitySchedule < Orb::BaseModel + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(Float) } + def quantity + end + + sig { params(_: Float).returns(Float) } + def quantity=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { params(end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time).void } + def initialize(end_date:, price_id:, quantity:, start_date:) + end + + sig do + override.returns({end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time}) + end + def to_hash + end + end + + class MaximumInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + maximum_amount: String, + start_date: Time + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + maximum_amount:, + start_date: + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + maximum_amount: String, + start_date: Time + } + ) + end + def to_hash + end + end + + class MinimumInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + minimum_amount: String, + start_date: Time + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + minimum_amount:, + start_date: + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + minimum_amount: String, + start_date: Time + } + ) + end + def to_hash + end + end + + class PriceInterval < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Integer) } + def billing_cycle_day + end + + sig { params(_: Integer).returns(Integer) } + def billing_cycle_day=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_end_date=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_start_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_start_date=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(T.nilable(String)) } + def filter + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def filter=(_) + end + + sig do + returns( + T.nilable( + T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval::FixedFeeQuantityTransition] + ) + ) + end + def fixed_fee_quantity_transitions + end + + sig do + params( + _: T.nilable( + T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval::FixedFeeQuantityTransition] + ) + ) + .returns( + T.nilable( + T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval::FixedFeeQuantityTransition] + ) + ) + end + def fixed_fee_quantity_transitions=(_) + end + + sig do + returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price + end + + sig do + params( + _: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + .returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(T.nilable(T::Array[String])) } + def usage_customer_ids + end + + sig { params(_: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def usage_customer_ids=(_) + end + + sig do + params( + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + end_date: T.nilable(Time), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable( + T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval::FixedFeeQuantityTransition] + ), + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + start_date: Time, + usage_customer_ids: T.nilable(T::Array[String]) + ) + .void + end + def initialize( + id:, + billing_cycle_day:, + current_billing_period_end_date:, + current_billing_period_start_date:, + end_date:, + filter:, + fixed_fee_quantity_transitions:, + price:, + start_date:, + usage_customer_ids: + ) + end + + sig do + override + .returns( + { + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + end_date: T.nilable(Time), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable( + T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval::FixedFeeQuantityTransition] + ), + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + start_date: Time, + usage_customer_ids: T.nilable(T::Array[String]) + } + ) + end + def to_hash + end + + class FixedFeeQuantityTransition < Orb::BaseModel + sig { returns(Time) } + def effective_date + end + + sig { params(_: Time).returns(Time) } + def effective_date=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(Integer) } + def quantity + end + + sig { params(_: Integer).returns(Integer) } + def quantity=(_) + end + + sig { params(effective_date: Time, price_id: String, quantity: Integer).void } + def initialize(effective_date:, price_id:, quantity:) + end + + sig { override.returns({effective_date: Time, price_id: String, quantity: Integer}) } + def to_hash + end + end + end + + class RedeemedCoupon < Orb::BaseModel + sig { returns(String) } + def coupon_id + end + + sig { params(_: String).returns(String) } + def coupon_id=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { params(coupon_id: String, end_date: T.nilable(Time), start_date: Time).void } + def initialize(coupon_id:, end_date:, start_date:) + end + + sig { override.returns({coupon_id: String, end_date: T.nilable(Time), start_date: Time}) } + def to_hash + end + end + + class Status < Orb::Enum + abstract! + + ACTIVE = :active + ENDED = :ended + UPCOMING = :upcoming + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class TrialInfo < Orb::BaseModel + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { params(end_date: T.nilable(Time)).void } + def initialize(end_date:) + end + + sig { override.returns({end_date: T.nilable(Time)}) } + def to_hash + end + end + end + end +end diff --git a/rbi/lib/orb/models/subscription_trial_info_model.rbi b/rbi/lib/orb/models/subscription_trial_info_model.rbi deleted file mode 100644 index d82a8ebd..00000000 --- a/rbi/lib/orb/models/subscription_trial_info_model.rbi +++ /dev/null @@ -1,23 +0,0 @@ -# typed: strong - -module Orb - module Models - class SubscriptionTrialInfoModel < Orb::BaseModel - sig { returns(T.nilable(Time)) } - def end_date - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def end_date=(_) - end - - sig { params(end_date: T.nilable(Time)).void } - def initialize(end_date:) - end - - sig { override.returns({end_date: T.nilable(Time)}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/subscription_trigger_phase_response.rbi b/rbi/lib/orb/models/subscription_trigger_phase_response.rbi new file mode 100644 index 00000000..ad6f1688 --- /dev/null +++ b/rbi/lib/orb/models/subscription_trigger_phase_response.rbi @@ -0,0 +1,1901 @@ +# typed: strong + +module Orb + module Models + class SubscriptionTriggerPhaseResponse < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Integer)) } + def active_plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def active_plan_phase_order=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval]) } + def adjustment_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval]) + .returns(T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval]) + end + def adjustment_intervals=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def auto_collection + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def auto_collection=(_) + end + + sig { returns(Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration) } + def billing_cycle_anchor_configuration + end + + sig do + params(_: Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration) + .returns(Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration) + end + def billing_cycle_anchor_configuration=(_) + end + + sig { returns(Integer) } + def billing_cycle_day + end + + sig { params(_: Integer).returns(Integer) } + def billing_cycle_day=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_end_date=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_start_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_start_date=(_) + end + + sig { returns(Orb::Models::Customer) } + def customer + end + + sig { params(_: Orb::Models::Customer).returns(Orb::Models::Customer) } + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def default_invoice_memo + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def default_invoice_memo=(_) + end + + sig do + returns( + T::Array[ + T.any( + Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + end + def discount_intervals + end + + sig do + params( + _: T::Array[ + T.any( + Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + .returns( + T::Array[ + T.any( + Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + end + def discount_intervals=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::FixedFeeQuantitySchedule]) } + def fixed_fee_quantity_schedule + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::FixedFeeQuantitySchedule]) + .returns(T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::FixedFeeQuantitySchedule]) + end + def fixed_fee_quantity_schedule=(_) + end + + sig { returns(T.nilable(String)) } + def invoicing_threshold + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoicing_threshold=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::MaximumInterval]) } + def maximum_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::MaximumInterval]) + .returns(T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::MaximumInterval]) + end + def maximum_intervals=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::MinimumInterval]) } + def minimum_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::MinimumInterval]) + .returns(T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::MinimumInterval]) + end + def minimum_intervals=(_) + end + + sig { returns(Integer) } + def net_terms + end + + sig { params(_: Integer).returns(Integer) } + def net_terms=(_) + end + + sig { returns(Orb::Models::Plan) } + def plan + end + + sig { params(_: Orb::Models::Plan).returns(Orb::Models::Plan) } + def plan=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval]) } + def price_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval]) + .returns(T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval]) + end + def price_intervals=(_) + end + + sig { returns(T.nilable(Orb::Models::SubscriptionTriggerPhaseResponse::RedeemedCoupon)) } + def redeemed_coupon + end + + sig do + params(_: T.nilable(Orb::Models::SubscriptionTriggerPhaseResponse::RedeemedCoupon)) + .returns(T.nilable(Orb::Models::SubscriptionTriggerPhaseResponse::RedeemedCoupon)) + end + def redeemed_coupon=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(Symbol) } + def status + end + + sig { params(_: Symbol).returns(Symbol) } + def status=(_) + end + + sig { returns(Orb::Models::SubscriptionTriggerPhaseResponse::TrialInfo) } + def trial_info + end + + sig do + params(_: Orb::Models::SubscriptionTriggerPhaseResponse::TrialInfo) + .returns(Orb::Models::SubscriptionTriggerPhaseResponse::TrialInfo) + end + def trial_info=(_) + end + + sig do + params( + id: String, + active_plan_phase_order: T.nilable(Integer), + adjustment_intervals: T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval], + auto_collection: T.nilable(T::Boolean), + billing_cycle_anchor_configuration: Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + customer: Orb::Models::Customer, + default_invoice_memo: T.nilable(String), + discount_intervals: T::Array[ + T.any( + Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::UsageDiscountInterval + ) + ], + end_date: T.nilable(Time), + fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::FixedFeeQuantitySchedule], + invoicing_threshold: T.nilable(String), + maximum_intervals: T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::MaximumInterval], + metadata: T::Hash[Symbol, String], + minimum_intervals: T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval], + redeemed_coupon: T.nilable(Orb::Models::SubscriptionTriggerPhaseResponse::RedeemedCoupon), + start_date: Time, + status: Symbol, + trial_info: Orb::Models::SubscriptionTriggerPhaseResponse::TrialInfo + ) + .void + end + def initialize( + id:, + active_plan_phase_order:, + adjustment_intervals:, + auto_collection:, + billing_cycle_anchor_configuration:, + billing_cycle_day:, + created_at:, + current_billing_period_end_date:, + current_billing_period_start_date:, + customer:, + default_invoice_memo:, + discount_intervals:, + end_date:, + fixed_fee_quantity_schedule:, + invoicing_threshold:, + maximum_intervals:, + metadata:, + minimum_intervals:, + net_terms:, + plan:, + price_intervals:, + redeemed_coupon:, + start_date:, + status:, + trial_info: + ) + end + + sig do + override + .returns( + { + id: String, + active_plan_phase_order: T.nilable(Integer), + adjustment_intervals: T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval], + auto_collection: T.nilable(T::Boolean), + billing_cycle_anchor_configuration: Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + customer: Orb::Models::Customer, + default_invoice_memo: T.nilable(String), + discount_intervals: T::Array[ + T.any( + Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::UsageDiscountInterval + ) + ], + end_date: T.nilable(Time), + fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::FixedFeeQuantitySchedule], + invoicing_threshold: T.nilable(String), + maximum_intervals: T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::MaximumInterval], + metadata: T::Hash[Symbol, String], + minimum_intervals: T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval], + redeemed_coupon: T.nilable(Orb::Models::SubscriptionTriggerPhaseResponse::RedeemedCoupon), + start_date: Time, + status: Symbol, + trial_info: Orb::Models::SubscriptionTriggerPhaseResponse::TrialInfo + } + ) + end + def to_hash + end + + class AdjustmentInterval < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig do + returns( + T.any( + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + end + def adjustment + end + + sig do + params( + _: T.any( + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + .returns( + T.any( + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + end + def adjustment=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + id: String, + adjustment: T.any( + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ), + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time + ) + .void + end + def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:) + end + + sig do + override + .returns( + { + id: String, + adjustment: T.any( + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ), + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time + } + ) + end + def to_hash + end + + class Adjustment < Orb::Union + abstract! + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float, + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + usage_discount:, + adjustment_type: :usage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float + } + ) + end + def to_hash + end + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + amount_discount:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + adjustment_type: :amount_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + percentage_discount:, + plan_phase_order:, + reason:, + adjustment_type: :percentage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + item_id:, + minimum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :minimum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + maximum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :maximum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + ) + end + private_class_method def self.variants + end + end + end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + sig { returns(Integer) } + def day + end + + sig { params(_: Integer).returns(Integer) } + def day=(_) + end + + sig { returns(T.nilable(Integer)) } + def month + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def month=(_) + end + + sig { returns(T.nilable(Integer)) } + def year + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def year=(_) + end + + sig { params(day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)).void } + def initialize(day:, month: nil, year: nil) + end + + sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) } + def to_hash + end + end + + class DiscountInterval < Orb::Union + abstract! + + class AmountDiscountInterval < Orb::BaseModel + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + amount_discount: String, + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time, + discount_type: Symbol + ) + .void + end + def initialize( + amount_discount:, + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + start_date:, + discount_type: :amount + ) + end + + sig do + override + .returns( + { + amount_discount: String, + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + start_date: Time + } + ) + end + def to_hash + end + end + + class PercentageDiscountInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + percentage_discount: Float, + start_date: Time, + discount_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + percentage_discount:, + start_date:, + discount_type: :percentage + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + percentage_discount: Float, + start_date: Time + } + ) + end + def to_hash + end + end + + class UsageDiscountInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time, + usage_discount: Float, + discount_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + start_date:, + usage_discount:, + discount_type: :usage + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + start_date: Time, + usage_discount: Float + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::AmountDiscountInterval], [Symbol, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::PercentageDiscountInterval], [Symbol, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::UsageDiscountInterval]] + ) + end + private_class_method def self.variants + end + end + + class FixedFeeQuantitySchedule < Orb::BaseModel + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(Float) } + def quantity + end + + sig { params(_: Float).returns(Float) } + def quantity=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { params(end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time).void } + def initialize(end_date:, price_id:, quantity:, start_date:) + end + + sig do + override.returns({end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time}) + end + def to_hash + end + end + + class MaximumInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + maximum_amount: String, + start_date: Time + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + maximum_amount:, + start_date: + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + maximum_amount: String, + start_date: Time + } + ) + end + def to_hash + end + end + + class MinimumInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + minimum_amount: String, + start_date: Time + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + minimum_amount:, + start_date: + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + minimum_amount: String, + start_date: Time + } + ) + end + def to_hash + end + end + + class PriceInterval < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Integer) } + def billing_cycle_day + end + + sig { params(_: Integer).returns(Integer) } + def billing_cycle_day=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_end_date=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_start_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_start_date=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(T.nilable(String)) } + def filter + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def filter=(_) + end + + sig do + returns( + T.nilable( + T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval::FixedFeeQuantityTransition] + ) + ) + end + def fixed_fee_quantity_transitions + end + + sig do + params( + _: T.nilable( + T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval::FixedFeeQuantityTransition] + ) + ) + .returns( + T.nilable( + T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval::FixedFeeQuantityTransition] + ) + ) + end + def fixed_fee_quantity_transitions=(_) + end + + sig do + returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price + end + + sig do + params( + _: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + .returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(T.nilable(T::Array[String])) } + def usage_customer_ids + end + + sig { params(_: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def usage_customer_ids=(_) + end + + sig do + params( + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + end_date: T.nilable(Time), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable( + T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval::FixedFeeQuantityTransition] + ), + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + start_date: Time, + usage_customer_ids: T.nilable(T::Array[String]) + ) + .void + end + def initialize( + id:, + billing_cycle_day:, + current_billing_period_end_date:, + current_billing_period_start_date:, + end_date:, + filter:, + fixed_fee_quantity_transitions:, + price:, + start_date:, + usage_customer_ids: + ) + end + + sig do + override + .returns( + { + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + end_date: T.nilable(Time), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable( + T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval::FixedFeeQuantityTransition] + ), + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + start_date: Time, + usage_customer_ids: T.nilable(T::Array[String]) + } + ) + end + def to_hash + end + + class FixedFeeQuantityTransition < Orb::BaseModel + sig { returns(Time) } + def effective_date + end + + sig { params(_: Time).returns(Time) } + def effective_date=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(Integer) } + def quantity + end + + sig { params(_: Integer).returns(Integer) } + def quantity=(_) + end + + sig { params(effective_date: Time, price_id: String, quantity: Integer).void } + def initialize(effective_date:, price_id:, quantity:) + end + + sig { override.returns({effective_date: Time, price_id: String, quantity: Integer}) } + def to_hash + end + end + end + + class RedeemedCoupon < Orb::BaseModel + sig { returns(String) } + def coupon_id + end + + sig { params(_: String).returns(String) } + def coupon_id=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { params(coupon_id: String, end_date: T.nilable(Time), start_date: Time).void } + def initialize(coupon_id:, end_date:, start_date:) + end + + sig { override.returns({coupon_id: String, end_date: T.nilable(Time), start_date: Time}) } + def to_hash + end + end + + class Status < Orb::Enum + abstract! + + ACTIVE = :active + ENDED = :ended + UPCOMING = :upcoming + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class TrialInfo < Orb::BaseModel + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { params(end_date: T.nilable(Time)).void } + def initialize(end_date:) + end + + sig { override.returns({end_date: T.nilable(Time)}) } + def to_hash + end + end + end + end +end diff --git a/rbi/lib/orb/models/subscription_unschedule_cancellation_response.rbi b/rbi/lib/orb/models/subscription_unschedule_cancellation_response.rbi new file mode 100644 index 00000000..de69b795 --- /dev/null +++ b/rbi/lib/orb/models/subscription_unschedule_cancellation_response.rbi @@ -0,0 +1,1901 @@ +# typed: strong + +module Orb + module Models + class SubscriptionUnscheduleCancellationResponse < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Integer)) } + def active_plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def active_plan_phase_order=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval]) } + def adjustment_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval]) + .returns(T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval]) + end + def adjustment_intervals=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def auto_collection + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def auto_collection=(_) + end + + sig { returns(Orb::Models::SubscriptionUnscheduleCancellationResponse::BillingCycleAnchorConfiguration) } + def billing_cycle_anchor_configuration + end + + sig do + params(_: Orb::Models::SubscriptionUnscheduleCancellationResponse::BillingCycleAnchorConfiguration) + .returns(Orb::Models::SubscriptionUnscheduleCancellationResponse::BillingCycleAnchorConfiguration) + end + def billing_cycle_anchor_configuration=(_) + end + + sig { returns(Integer) } + def billing_cycle_day + end + + sig { params(_: Integer).returns(Integer) } + def billing_cycle_day=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_end_date=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_start_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_start_date=(_) + end + + sig { returns(Orb::Models::Customer) } + def customer + end + + sig { params(_: Orb::Models::Customer).returns(Orb::Models::Customer) } + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def default_invoice_memo + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def default_invoice_memo=(_) + end + + sig do + returns( + T::Array[ + T.any( + Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + end + def discount_intervals + end + + sig do + params( + _: T::Array[ + T.any( + Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + .returns( + T::Array[ + T.any( + Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + end + def discount_intervals=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::FixedFeeQuantitySchedule]) } + def fixed_fee_quantity_schedule + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::FixedFeeQuantitySchedule]) + .returns(T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::FixedFeeQuantitySchedule]) + end + def fixed_fee_quantity_schedule=(_) + end + + sig { returns(T.nilable(String)) } + def invoicing_threshold + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoicing_threshold=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::MaximumInterval]) } + def maximum_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::MaximumInterval]) + .returns(T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::MaximumInterval]) + end + def maximum_intervals=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::MinimumInterval]) } + def minimum_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::MinimumInterval]) + .returns(T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::MinimumInterval]) + end + def minimum_intervals=(_) + end + + sig { returns(Integer) } + def net_terms + end + + sig { params(_: Integer).returns(Integer) } + def net_terms=(_) + end + + sig { returns(Orb::Models::Plan) } + def plan + end + + sig { params(_: Orb::Models::Plan).returns(Orb::Models::Plan) } + def plan=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval]) } + def price_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval]) + .returns(T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval]) + end + def price_intervals=(_) + end + + sig { returns(T.nilable(Orb::Models::SubscriptionUnscheduleCancellationResponse::RedeemedCoupon)) } + def redeemed_coupon + end + + sig do + params(_: T.nilable(Orb::Models::SubscriptionUnscheduleCancellationResponse::RedeemedCoupon)) + .returns(T.nilable(Orb::Models::SubscriptionUnscheduleCancellationResponse::RedeemedCoupon)) + end + def redeemed_coupon=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(Symbol) } + def status + end + + sig { params(_: Symbol).returns(Symbol) } + def status=(_) + end + + sig { returns(Orb::Models::SubscriptionUnscheduleCancellationResponse::TrialInfo) } + def trial_info + end + + sig do + params(_: Orb::Models::SubscriptionUnscheduleCancellationResponse::TrialInfo) + .returns(Orb::Models::SubscriptionUnscheduleCancellationResponse::TrialInfo) + end + def trial_info=(_) + end + + sig do + params( + id: String, + active_plan_phase_order: T.nilable(Integer), + adjustment_intervals: T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval], + auto_collection: T.nilable(T::Boolean), + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUnscheduleCancellationResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + customer: Orb::Models::Customer, + default_invoice_memo: T.nilable(String), + discount_intervals: T::Array[ + T.any( + Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::UsageDiscountInterval + ) + ], + end_date: T.nilable(Time), + fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::FixedFeeQuantitySchedule], + invoicing_threshold: T.nilable(String), + maximum_intervals: T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::MaximumInterval], + metadata: T::Hash[Symbol, String], + minimum_intervals: T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval], + redeemed_coupon: T.nilable(Orb::Models::SubscriptionUnscheduleCancellationResponse::RedeemedCoupon), + start_date: Time, + status: Symbol, + trial_info: Orb::Models::SubscriptionUnscheduleCancellationResponse::TrialInfo + ) + .void + end + def initialize( + id:, + active_plan_phase_order:, + adjustment_intervals:, + auto_collection:, + billing_cycle_anchor_configuration:, + billing_cycle_day:, + created_at:, + current_billing_period_end_date:, + current_billing_period_start_date:, + customer:, + default_invoice_memo:, + discount_intervals:, + end_date:, + fixed_fee_quantity_schedule:, + invoicing_threshold:, + maximum_intervals:, + metadata:, + minimum_intervals:, + net_terms:, + plan:, + price_intervals:, + redeemed_coupon:, + start_date:, + status:, + trial_info: + ) + end + + sig do + override + .returns( + { + id: String, + active_plan_phase_order: T.nilable(Integer), + adjustment_intervals: T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval], + auto_collection: T.nilable(T::Boolean), + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUnscheduleCancellationResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + customer: Orb::Models::Customer, + default_invoice_memo: T.nilable(String), + discount_intervals: T::Array[ + T.any( + Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::UsageDiscountInterval + ) + ], + end_date: T.nilable(Time), + fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::FixedFeeQuantitySchedule], + invoicing_threshold: T.nilable(String), + maximum_intervals: T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::MaximumInterval], + metadata: T::Hash[Symbol, String], + minimum_intervals: T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval], + redeemed_coupon: T.nilable(Orb::Models::SubscriptionUnscheduleCancellationResponse::RedeemedCoupon), + start_date: Time, + status: Symbol, + trial_info: Orb::Models::SubscriptionUnscheduleCancellationResponse::TrialInfo + } + ) + end + def to_hash + end + + class AdjustmentInterval < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig do + returns( + T.any( + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + end + def adjustment + end + + sig do + params( + _: T.any( + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + .returns( + T.any( + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + end + def adjustment=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + id: String, + adjustment: T.any( + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ), + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time + ) + .void + end + def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:) + end + + sig do + override + .returns( + { + id: String, + adjustment: T.any( + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ), + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time + } + ) + end + def to_hash + end + + class Adjustment < Orb::Union + abstract! + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float, + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + usage_discount:, + adjustment_type: :usage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float + } + ) + end + def to_hash + end + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + amount_discount:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + adjustment_type: :amount_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + percentage_discount:, + plan_phase_order:, + reason:, + adjustment_type: :percentage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + item_id:, + minimum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :minimum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + maximum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :maximum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + ) + end + private_class_method def self.variants + end + end + end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + sig { returns(Integer) } + def day + end + + sig { params(_: Integer).returns(Integer) } + def day=(_) + end + + sig { returns(T.nilable(Integer)) } + def month + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def month=(_) + end + + sig { returns(T.nilable(Integer)) } + def year + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def year=(_) + end + + sig { params(day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)).void } + def initialize(day:, month: nil, year: nil) + end + + sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) } + def to_hash + end + end + + class DiscountInterval < Orb::Union + abstract! + + class AmountDiscountInterval < Orb::BaseModel + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + amount_discount: String, + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time, + discount_type: Symbol + ) + .void + end + def initialize( + amount_discount:, + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + start_date:, + discount_type: :amount + ) + end + + sig do + override + .returns( + { + amount_discount: String, + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + start_date: Time + } + ) + end + def to_hash + end + end + + class PercentageDiscountInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + percentage_discount: Float, + start_date: Time, + discount_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + percentage_discount:, + start_date:, + discount_type: :percentage + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + percentage_discount: Float, + start_date: Time + } + ) + end + def to_hash + end + end + + class UsageDiscountInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time, + usage_discount: Float, + discount_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + start_date:, + usage_discount:, + discount_type: :usage + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + start_date: Time, + usage_discount: Float + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::AmountDiscountInterval], [Symbol, Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::PercentageDiscountInterval], [Symbol, Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::UsageDiscountInterval]] + ) + end + private_class_method def self.variants + end + end + + class FixedFeeQuantitySchedule < Orb::BaseModel + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(Float) } + def quantity + end + + sig { params(_: Float).returns(Float) } + def quantity=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { params(end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time).void } + def initialize(end_date:, price_id:, quantity:, start_date:) + end + + sig do + override.returns({end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time}) + end + def to_hash + end + end + + class MaximumInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + maximum_amount: String, + start_date: Time + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + maximum_amount:, + start_date: + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + maximum_amount: String, + start_date: Time + } + ) + end + def to_hash + end + end + + class MinimumInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + minimum_amount: String, + start_date: Time + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + minimum_amount:, + start_date: + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + minimum_amount: String, + start_date: Time + } + ) + end + def to_hash + end + end + + class PriceInterval < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Integer) } + def billing_cycle_day + end + + sig { params(_: Integer).returns(Integer) } + def billing_cycle_day=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_end_date=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_start_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_start_date=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(T.nilable(String)) } + def filter + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def filter=(_) + end + + sig do + returns( + T.nilable( + T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval::FixedFeeQuantityTransition] + ) + ) + end + def fixed_fee_quantity_transitions + end + + sig do + params( + _: T.nilable( + T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval::FixedFeeQuantityTransition] + ) + ) + .returns( + T.nilable( + T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval::FixedFeeQuantityTransition] + ) + ) + end + def fixed_fee_quantity_transitions=(_) + end + + sig do + returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price + end + + sig do + params( + _: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + .returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(T.nilable(T::Array[String])) } + def usage_customer_ids + end + + sig { params(_: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def usage_customer_ids=(_) + end + + sig do + params( + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + end_date: T.nilable(Time), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable( + T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval::FixedFeeQuantityTransition] + ), + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + start_date: Time, + usage_customer_ids: T.nilable(T::Array[String]) + ) + .void + end + def initialize( + id:, + billing_cycle_day:, + current_billing_period_end_date:, + current_billing_period_start_date:, + end_date:, + filter:, + fixed_fee_quantity_transitions:, + price:, + start_date:, + usage_customer_ids: + ) + end + + sig do + override + .returns( + { + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + end_date: T.nilable(Time), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable( + T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval::FixedFeeQuantityTransition] + ), + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + start_date: Time, + usage_customer_ids: T.nilable(T::Array[String]) + } + ) + end + def to_hash + end + + class FixedFeeQuantityTransition < Orb::BaseModel + sig { returns(Time) } + def effective_date + end + + sig { params(_: Time).returns(Time) } + def effective_date=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(Integer) } + def quantity + end + + sig { params(_: Integer).returns(Integer) } + def quantity=(_) + end + + sig { params(effective_date: Time, price_id: String, quantity: Integer).void } + def initialize(effective_date:, price_id:, quantity:) + end + + sig { override.returns({effective_date: Time, price_id: String, quantity: Integer}) } + def to_hash + end + end + end + + class RedeemedCoupon < Orb::BaseModel + sig { returns(String) } + def coupon_id + end + + sig { params(_: String).returns(String) } + def coupon_id=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { params(coupon_id: String, end_date: T.nilable(Time), start_date: Time).void } + def initialize(coupon_id:, end_date:, start_date:) + end + + sig { override.returns({coupon_id: String, end_date: T.nilable(Time), start_date: Time}) } + def to_hash + end + end + + class Status < Orb::Enum + abstract! + + ACTIVE = :active + ENDED = :ended + UPCOMING = :upcoming + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class TrialInfo < Orb::BaseModel + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { params(end_date: T.nilable(Time)).void } + def initialize(end_date:) + end + + sig { override.returns({end_date: T.nilable(Time)}) } + def to_hash + end + end + end + end +end diff --git a/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi b/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi new file mode 100644 index 00000000..610a10a2 --- /dev/null +++ b/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi @@ -0,0 +1,1929 @@ +# typed: strong + +module Orb + module Models + class SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Integer)) } + def active_plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def active_plan_phase_order=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval]) } + def adjustment_intervals + end + + sig do + params( + _: T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval] + ) + .returns(T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval]) + end + def adjustment_intervals=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def auto_collection + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def auto_collection=(_) + end + + sig do + returns( + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::BillingCycleAnchorConfiguration + ) + end + def billing_cycle_anchor_configuration + end + + sig do + params( + _: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::BillingCycleAnchorConfiguration + ) + .returns( + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::BillingCycleAnchorConfiguration + ) + end + def billing_cycle_anchor_configuration=(_) + end + + sig { returns(Integer) } + def billing_cycle_day + end + + sig { params(_: Integer).returns(Integer) } + def billing_cycle_day=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_end_date=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_start_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_start_date=(_) + end + + sig { returns(Orb::Models::Customer) } + def customer + end + + sig { params(_: Orb::Models::Customer).returns(Orb::Models::Customer) } + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def default_invoice_memo + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def default_invoice_memo=(_) + end + + sig do + returns( + T::Array[ + T.any( + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + end + def discount_intervals + end + + sig do + params( + _: T::Array[ + T.any( + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + .returns( + T::Array[ + T.any( + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + end + def discount_intervals=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig do + returns( + T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::FixedFeeQuantitySchedule] + ) + end + def fixed_fee_quantity_schedule + end + + sig do + params( + _: T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::FixedFeeQuantitySchedule] + ) + .returns( + T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::FixedFeeQuantitySchedule] + ) + end + def fixed_fee_quantity_schedule=(_) + end + + sig { returns(T.nilable(String)) } + def invoicing_threshold + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoicing_threshold=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MaximumInterval]) } + def maximum_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MaximumInterval]) + .returns(T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MaximumInterval]) + end + def maximum_intervals=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MinimumInterval]) } + def minimum_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MinimumInterval]) + .returns(T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MinimumInterval]) + end + def minimum_intervals=(_) + end + + sig { returns(Integer) } + def net_terms + end + + sig { params(_: Integer).returns(Integer) } + def net_terms=(_) + end + + sig { returns(Orb::Models::Plan) } + def plan + end + + sig { params(_: Orb::Models::Plan).returns(Orb::Models::Plan) } + def plan=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval]) } + def price_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval]) + .returns(T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval]) + end + def price_intervals=(_) + end + + sig { returns(T.nilable(Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::RedeemedCoupon)) } + def redeemed_coupon + end + + sig do + params(_: T.nilable(Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::RedeemedCoupon)) + .returns(T.nilable(Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::RedeemedCoupon)) + end + def redeemed_coupon=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(Symbol) } + def status + end + + sig { params(_: Symbol).returns(Symbol) } + def status=(_) + end + + sig { returns(Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::TrialInfo) } + def trial_info + end + + sig do + params(_: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::TrialInfo) + .returns(Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::TrialInfo) + end + def trial_info=(_) + end + + sig do + params( + id: String, + active_plan_phase_order: T.nilable(Integer), + adjustment_intervals: T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval], + auto_collection: T.nilable(T::Boolean), + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + customer: Orb::Models::Customer, + default_invoice_memo: T.nilable(String), + discount_intervals: T::Array[ + T.any( + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::UsageDiscountInterval + ) + ], + end_date: T.nilable(Time), + fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::FixedFeeQuantitySchedule], + invoicing_threshold: T.nilable(String), + maximum_intervals: T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MaximumInterval], + metadata: T::Hash[Symbol, String], + minimum_intervals: T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval], + redeemed_coupon: T.nilable(Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::RedeemedCoupon), + start_date: Time, + status: Symbol, + trial_info: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::TrialInfo + ) + .void + end + def initialize( + id:, + active_plan_phase_order:, + adjustment_intervals:, + auto_collection:, + billing_cycle_anchor_configuration:, + billing_cycle_day:, + created_at:, + current_billing_period_end_date:, + current_billing_period_start_date:, + customer:, + default_invoice_memo:, + discount_intervals:, + end_date:, + fixed_fee_quantity_schedule:, + invoicing_threshold:, + maximum_intervals:, + metadata:, + minimum_intervals:, + net_terms:, + plan:, + price_intervals:, + redeemed_coupon:, + start_date:, + status:, + trial_info: + ) + end + + sig do + override + .returns( + { + id: String, + active_plan_phase_order: T.nilable(Integer), + adjustment_intervals: T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval], + auto_collection: T.nilable(T::Boolean), + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + customer: Orb::Models::Customer, + default_invoice_memo: T.nilable(String), + discount_intervals: T::Array[ + T.any( + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::UsageDiscountInterval + ) + ], + end_date: T.nilable(Time), + fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::FixedFeeQuantitySchedule], + invoicing_threshold: T.nilable(String), + maximum_intervals: T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MaximumInterval], + metadata: T::Hash[Symbol, String], + minimum_intervals: T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval], + redeemed_coupon: T.nilable(Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::RedeemedCoupon), + start_date: Time, + status: Symbol, + trial_info: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::TrialInfo + } + ) + end + def to_hash + end + + class AdjustmentInterval < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig do + returns( + T.any( + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + end + def adjustment + end + + sig do + params( + _: T.any( + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + .returns( + T.any( + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + end + def adjustment=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + id: String, + adjustment: T.any( + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ), + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time + ) + .void + end + def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:) + end + + sig do + override + .returns( + { + id: String, + adjustment: T.any( + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ), + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time + } + ) + end + def to_hash + end + + class Adjustment < Orb::Union + abstract! + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float, + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + usage_discount:, + adjustment_type: :usage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float + } + ) + end + def to_hash + end + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + amount_discount:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + adjustment_type: :amount_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + percentage_discount:, + plan_phase_order:, + reason:, + adjustment_type: :percentage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + item_id:, + minimum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :minimum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + maximum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :maximum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + ) + end + private_class_method def self.variants + end + end + end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + sig { returns(Integer) } + def day + end + + sig { params(_: Integer).returns(Integer) } + def day=(_) + end + + sig { returns(T.nilable(Integer)) } + def month + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def month=(_) + end + + sig { returns(T.nilable(Integer)) } + def year + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def year=(_) + end + + sig { params(day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)).void } + def initialize(day:, month: nil, year: nil) + end + + sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) } + def to_hash + end + end + + class DiscountInterval < Orb::Union + abstract! + + class AmountDiscountInterval < Orb::BaseModel + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + amount_discount: String, + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time, + discount_type: Symbol + ) + .void + end + def initialize( + amount_discount:, + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + start_date:, + discount_type: :amount + ) + end + + sig do + override + .returns( + { + amount_discount: String, + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + start_date: Time + } + ) + end + def to_hash + end + end + + class PercentageDiscountInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + percentage_discount: Float, + start_date: Time, + discount_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + percentage_discount:, + start_date:, + discount_type: :percentage + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + percentage_discount: Float, + start_date: Time + } + ) + end + def to_hash + end + end + + class UsageDiscountInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time, + usage_discount: Float, + discount_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + start_date:, + usage_discount:, + discount_type: :usage + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + start_date: Time, + usage_discount: Float + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::AmountDiscountInterval], [Symbol, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::PercentageDiscountInterval], [Symbol, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::UsageDiscountInterval]] + ) + end + private_class_method def self.variants + end + end + + class FixedFeeQuantitySchedule < Orb::BaseModel + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(Float) } + def quantity + end + + sig { params(_: Float).returns(Float) } + def quantity=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { params(end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time).void } + def initialize(end_date:, price_id:, quantity:, start_date:) + end + + sig do + override.returns({end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time}) + end + def to_hash + end + end + + class MaximumInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + maximum_amount: String, + start_date: Time + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + maximum_amount:, + start_date: + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + maximum_amount: String, + start_date: Time + } + ) + end + def to_hash + end + end + + class MinimumInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + minimum_amount: String, + start_date: Time + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + minimum_amount:, + start_date: + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + minimum_amount: String, + start_date: Time + } + ) + end + def to_hash + end + end + + class PriceInterval < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Integer) } + def billing_cycle_day + end + + sig { params(_: Integer).returns(Integer) } + def billing_cycle_day=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_end_date=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_start_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_start_date=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(T.nilable(String)) } + def filter + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def filter=(_) + end + + sig do + returns( + T.nilable( + T::Array[ + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval::FixedFeeQuantityTransition + ] + ) + ) + end + def fixed_fee_quantity_transitions + end + + sig do + params( + _: T.nilable( + T::Array[ + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval::FixedFeeQuantityTransition + ] + ) + ) + .returns( + T.nilable( + T::Array[ + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval::FixedFeeQuantityTransition + ] + ) + ) + end + def fixed_fee_quantity_transitions=(_) + end + + sig do + returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price + end + + sig do + params( + _: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + .returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(T.nilable(T::Array[String])) } + def usage_customer_ids + end + + sig { params(_: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def usage_customer_ids=(_) + end + + sig do + params( + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + end_date: T.nilable(Time), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable( + T::Array[ + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval::FixedFeeQuantityTransition + ] + ), + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + start_date: Time, + usage_customer_ids: T.nilable(T::Array[String]) + ) + .void + end + def initialize( + id:, + billing_cycle_day:, + current_billing_period_end_date:, + current_billing_period_start_date:, + end_date:, + filter:, + fixed_fee_quantity_transitions:, + price:, + start_date:, + usage_customer_ids: + ) + end + + sig do + override + .returns( + { + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + end_date: T.nilable(Time), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable( + T::Array[ + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval::FixedFeeQuantityTransition + ] + ), + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + start_date: Time, + usage_customer_ids: T.nilable(T::Array[String]) + } + ) + end + def to_hash + end + + class FixedFeeQuantityTransition < Orb::BaseModel + sig { returns(Time) } + def effective_date + end + + sig { params(_: Time).returns(Time) } + def effective_date=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(Integer) } + def quantity + end + + sig { params(_: Integer).returns(Integer) } + def quantity=(_) + end + + sig { params(effective_date: Time, price_id: String, quantity: Integer).void } + def initialize(effective_date:, price_id:, quantity:) + end + + sig { override.returns({effective_date: Time, price_id: String, quantity: Integer}) } + def to_hash + end + end + end + + class RedeemedCoupon < Orb::BaseModel + sig { returns(String) } + def coupon_id + end + + sig { params(_: String).returns(String) } + def coupon_id=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { params(coupon_id: String, end_date: T.nilable(Time), start_date: Time).void } + def initialize(coupon_id:, end_date:, start_date:) + end + + sig { override.returns({coupon_id: String, end_date: T.nilable(Time), start_date: Time}) } + def to_hash + end + end + + class Status < Orb::Enum + abstract! + + ACTIVE = :active + ENDED = :ended + UPCOMING = :upcoming + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class TrialInfo < Orb::BaseModel + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { params(end_date: T.nilable(Time)).void } + def initialize(end_date:) + end + + sig { override.returns({end_date: T.nilable(Time)}) } + def to_hash + end + end + end + end +end diff --git a/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rbi b/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rbi new file mode 100644 index 00000000..837d2ddc --- /dev/null +++ b/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rbi @@ -0,0 +1,1903 @@ +# typed: strong + +module Orb + module Models + class SubscriptionUnschedulePendingPlanChangesResponse < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Integer)) } + def active_plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def active_plan_phase_order=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval]) } + def adjustment_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval]) + .returns(T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval]) + end + def adjustment_intervals=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def auto_collection + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def auto_collection=(_) + end + + sig { returns(Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::BillingCycleAnchorConfiguration) } + def billing_cycle_anchor_configuration + end + + sig do + params(_: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::BillingCycleAnchorConfiguration) + .returns(Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::BillingCycleAnchorConfiguration) + end + def billing_cycle_anchor_configuration=(_) + end + + sig { returns(Integer) } + def billing_cycle_day + end + + sig { params(_: Integer).returns(Integer) } + def billing_cycle_day=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_end_date=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_start_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_start_date=(_) + end + + sig { returns(Orb::Models::Customer) } + def customer + end + + sig { params(_: Orb::Models::Customer).returns(Orb::Models::Customer) } + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def default_invoice_memo + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def default_invoice_memo=(_) + end + + sig do + returns( + T::Array[ + T.any( + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + end + def discount_intervals + end + + sig do + params( + _: T::Array[ + T.any( + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + .returns( + T::Array[ + T.any( + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + end + def discount_intervals=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::FixedFeeQuantitySchedule]) } + def fixed_fee_quantity_schedule + end + + sig do + params( + _: T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::FixedFeeQuantitySchedule] + ) + .returns(T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::FixedFeeQuantitySchedule]) + end + def fixed_fee_quantity_schedule=(_) + end + + sig { returns(T.nilable(String)) } + def invoicing_threshold + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoicing_threshold=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::MaximumInterval]) } + def maximum_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::MaximumInterval]) + .returns(T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::MaximumInterval]) + end + def maximum_intervals=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::MinimumInterval]) } + def minimum_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::MinimumInterval]) + .returns(T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::MinimumInterval]) + end + def minimum_intervals=(_) + end + + sig { returns(Integer) } + def net_terms + end + + sig { params(_: Integer).returns(Integer) } + def net_terms=(_) + end + + sig { returns(Orb::Models::Plan) } + def plan + end + + sig { params(_: Orb::Models::Plan).returns(Orb::Models::Plan) } + def plan=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::PriceInterval]) } + def price_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::PriceInterval]) + .returns(T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::PriceInterval]) + end + def price_intervals=(_) + end + + sig { returns(T.nilable(Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::RedeemedCoupon)) } + def redeemed_coupon + end + + sig do + params(_: T.nilable(Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::RedeemedCoupon)) + .returns(T.nilable(Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::RedeemedCoupon)) + end + def redeemed_coupon=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(Symbol) } + def status + end + + sig { params(_: Symbol).returns(Symbol) } + def status=(_) + end + + sig { returns(Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::TrialInfo) } + def trial_info + end + + sig do + params(_: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::TrialInfo) + .returns(Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::TrialInfo) + end + def trial_info=(_) + end + + sig do + params( + id: String, + active_plan_phase_order: T.nilable(Integer), + adjustment_intervals: T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval], + auto_collection: T.nilable(T::Boolean), + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + customer: Orb::Models::Customer, + default_invoice_memo: T.nilable(String), + discount_intervals: T::Array[ + T.any( + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::UsageDiscountInterval + ) + ], + end_date: T.nilable(Time), + fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::FixedFeeQuantitySchedule], + invoicing_threshold: T.nilable(String), + maximum_intervals: T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::MaximumInterval], + metadata: T::Hash[Symbol, String], + minimum_intervals: T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::PriceInterval], + redeemed_coupon: T.nilable(Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::RedeemedCoupon), + start_date: Time, + status: Symbol, + trial_info: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::TrialInfo + ) + .void + end + def initialize( + id:, + active_plan_phase_order:, + adjustment_intervals:, + auto_collection:, + billing_cycle_anchor_configuration:, + billing_cycle_day:, + created_at:, + current_billing_period_end_date:, + current_billing_period_start_date:, + customer:, + default_invoice_memo:, + discount_intervals:, + end_date:, + fixed_fee_quantity_schedule:, + invoicing_threshold:, + maximum_intervals:, + metadata:, + minimum_intervals:, + net_terms:, + plan:, + price_intervals:, + redeemed_coupon:, + start_date:, + status:, + trial_info: + ) + end + + sig do + override + .returns( + { + id: String, + active_plan_phase_order: T.nilable(Integer), + adjustment_intervals: T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval], + auto_collection: T.nilable(T::Boolean), + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + customer: Orb::Models::Customer, + default_invoice_memo: T.nilable(String), + discount_intervals: T::Array[ + T.any( + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::UsageDiscountInterval + ) + ], + end_date: T.nilable(Time), + fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::FixedFeeQuantitySchedule], + invoicing_threshold: T.nilable(String), + maximum_intervals: T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::MaximumInterval], + metadata: T::Hash[Symbol, String], + minimum_intervals: T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::PriceInterval], + redeemed_coupon: T.nilable(Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::RedeemedCoupon), + start_date: Time, + status: Symbol, + trial_info: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::TrialInfo + } + ) + end + def to_hash + end + + class AdjustmentInterval < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig do + returns( + T.any( + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + end + def adjustment + end + + sig do + params( + _: T.any( + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + .returns( + T.any( + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + end + def adjustment=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + id: String, + adjustment: T.any( + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ), + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time + ) + .void + end + def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:) + end + + sig do + override + .returns( + { + id: String, + adjustment: T.any( + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ), + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time + } + ) + end + def to_hash + end + + class Adjustment < Orb::Union + abstract! + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float, + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + usage_discount:, + adjustment_type: :usage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float + } + ) + end + def to_hash + end + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + amount_discount:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + adjustment_type: :amount_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + percentage_discount:, + plan_phase_order:, + reason:, + adjustment_type: :percentage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + item_id:, + minimum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :minimum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + maximum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :maximum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + ) + end + private_class_method def self.variants + end + end + end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + sig { returns(Integer) } + def day + end + + sig { params(_: Integer).returns(Integer) } + def day=(_) + end + + sig { returns(T.nilable(Integer)) } + def month + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def month=(_) + end + + sig { returns(T.nilable(Integer)) } + def year + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def year=(_) + end + + sig { params(day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)).void } + def initialize(day:, month: nil, year: nil) + end + + sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) } + def to_hash + end + end + + class DiscountInterval < Orb::Union + abstract! + + class AmountDiscountInterval < Orb::BaseModel + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + amount_discount: String, + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time, + discount_type: Symbol + ) + .void + end + def initialize( + amount_discount:, + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + start_date:, + discount_type: :amount + ) + end + + sig do + override + .returns( + { + amount_discount: String, + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + start_date: Time + } + ) + end + def to_hash + end + end + + class PercentageDiscountInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + percentage_discount: Float, + start_date: Time, + discount_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + percentage_discount:, + start_date:, + discount_type: :percentage + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + percentage_discount: Float, + start_date: Time + } + ) + end + def to_hash + end + end + + class UsageDiscountInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time, + usage_discount: Float, + discount_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + start_date:, + usage_discount:, + discount_type: :usage + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + start_date: Time, + usage_discount: Float + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::AmountDiscountInterval], [Symbol, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::PercentageDiscountInterval], [Symbol, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::UsageDiscountInterval]] + ) + end + private_class_method def self.variants + end + end + + class FixedFeeQuantitySchedule < Orb::BaseModel + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(Float) } + def quantity + end + + sig { params(_: Float).returns(Float) } + def quantity=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { params(end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time).void } + def initialize(end_date:, price_id:, quantity:, start_date:) + end + + sig do + override.returns({end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time}) + end + def to_hash + end + end + + class MaximumInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + maximum_amount: String, + start_date: Time + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + maximum_amount:, + start_date: + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + maximum_amount: String, + start_date: Time + } + ) + end + def to_hash + end + end + + class MinimumInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + minimum_amount: String, + start_date: Time + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + minimum_amount:, + start_date: + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + minimum_amount: String, + start_date: Time + } + ) + end + def to_hash + end + end + + class PriceInterval < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Integer) } + def billing_cycle_day + end + + sig { params(_: Integer).returns(Integer) } + def billing_cycle_day=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_end_date=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_start_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_start_date=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(T.nilable(String)) } + def filter + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def filter=(_) + end + + sig do + returns( + T.nilable( + T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::PriceInterval::FixedFeeQuantityTransition] + ) + ) + end + def fixed_fee_quantity_transitions + end + + sig do + params( + _: T.nilable( + T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::PriceInterval::FixedFeeQuantityTransition] + ) + ) + .returns( + T.nilable( + T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::PriceInterval::FixedFeeQuantityTransition] + ) + ) + end + def fixed_fee_quantity_transitions=(_) + end + + sig do + returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price + end + + sig do + params( + _: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + .returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(T.nilable(T::Array[String])) } + def usage_customer_ids + end + + sig { params(_: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def usage_customer_ids=(_) + end + + sig do + params( + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + end_date: T.nilable(Time), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable( + T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::PriceInterval::FixedFeeQuantityTransition] + ), + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + start_date: Time, + usage_customer_ids: T.nilable(T::Array[String]) + ) + .void + end + def initialize( + id:, + billing_cycle_day:, + current_billing_period_end_date:, + current_billing_period_start_date:, + end_date:, + filter:, + fixed_fee_quantity_transitions:, + price:, + start_date:, + usage_customer_ids: + ) + end + + sig do + override + .returns( + { + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + end_date: T.nilable(Time), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable( + T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::PriceInterval::FixedFeeQuantityTransition] + ), + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + start_date: Time, + usage_customer_ids: T.nilable(T::Array[String]) + } + ) + end + def to_hash + end + + class FixedFeeQuantityTransition < Orb::BaseModel + sig { returns(Time) } + def effective_date + end + + sig { params(_: Time).returns(Time) } + def effective_date=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(Integer) } + def quantity + end + + sig { params(_: Integer).returns(Integer) } + def quantity=(_) + end + + sig { params(effective_date: Time, price_id: String, quantity: Integer).void } + def initialize(effective_date:, price_id:, quantity:) + end + + sig { override.returns({effective_date: Time, price_id: String, quantity: Integer}) } + def to_hash + end + end + end + + class RedeemedCoupon < Orb::BaseModel + sig { returns(String) } + def coupon_id + end + + sig { params(_: String).returns(String) } + def coupon_id=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { params(coupon_id: String, end_date: T.nilable(Time), start_date: Time).void } + def initialize(coupon_id:, end_date:, start_date:) + end + + sig { override.returns({coupon_id: String, end_date: T.nilable(Time), start_date: Time}) } + def to_hash + end + end + + class Status < Orb::Enum + abstract! + + ACTIVE = :active + ENDED = :ended + UPCOMING = :upcoming + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class TrialInfo < Orb::BaseModel + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { params(end_date: T.nilable(Time)).void } + def initialize(end_date:) + end + + sig { override.returns({end_date: T.nilable(Time)}) } + def to_hash + end + end + end + end +end diff --git a/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_response.rbi b/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_response.rbi new file mode 100644 index 00000000..6a499f67 --- /dev/null +++ b/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_response.rbi @@ -0,0 +1,1901 @@ +# typed: strong + +module Orb + module Models + class SubscriptionUpdateFixedFeeQuantityResponse < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Integer)) } + def active_plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def active_plan_phase_order=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval]) } + def adjustment_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval]) + .returns(T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval]) + end + def adjustment_intervals=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def auto_collection + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def auto_collection=(_) + end + + sig { returns(Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::BillingCycleAnchorConfiguration) } + def billing_cycle_anchor_configuration + end + + sig do + params(_: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::BillingCycleAnchorConfiguration) + .returns(Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::BillingCycleAnchorConfiguration) + end + def billing_cycle_anchor_configuration=(_) + end + + sig { returns(Integer) } + def billing_cycle_day + end + + sig { params(_: Integer).returns(Integer) } + def billing_cycle_day=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_end_date=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_start_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_start_date=(_) + end + + sig { returns(Orb::Models::Customer) } + def customer + end + + sig { params(_: Orb::Models::Customer).returns(Orb::Models::Customer) } + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def default_invoice_memo + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def default_invoice_memo=(_) + end + + sig do + returns( + T::Array[ + T.any( + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + end + def discount_intervals + end + + sig do + params( + _: T::Array[ + T.any( + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + .returns( + T::Array[ + T.any( + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + end + def discount_intervals=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::FixedFeeQuantitySchedule]) } + def fixed_fee_quantity_schedule + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::FixedFeeQuantitySchedule]) + .returns(T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::FixedFeeQuantitySchedule]) + end + def fixed_fee_quantity_schedule=(_) + end + + sig { returns(T.nilable(String)) } + def invoicing_threshold + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoicing_threshold=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::MaximumInterval]) } + def maximum_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::MaximumInterval]) + .returns(T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::MaximumInterval]) + end + def maximum_intervals=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::MinimumInterval]) } + def minimum_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::MinimumInterval]) + .returns(T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::MinimumInterval]) + end + def minimum_intervals=(_) + end + + sig { returns(Integer) } + def net_terms + end + + sig { params(_: Integer).returns(Integer) } + def net_terms=(_) + end + + sig { returns(Orb::Models::Plan) } + def plan + end + + sig { params(_: Orb::Models::Plan).returns(Orb::Models::Plan) } + def plan=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::PriceInterval]) } + def price_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::PriceInterval]) + .returns(T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::PriceInterval]) + end + def price_intervals=(_) + end + + sig { returns(T.nilable(Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::RedeemedCoupon)) } + def redeemed_coupon + end + + sig do + params(_: T.nilable(Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::RedeemedCoupon)) + .returns(T.nilable(Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::RedeemedCoupon)) + end + def redeemed_coupon=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(Symbol) } + def status + end + + sig { params(_: Symbol).returns(Symbol) } + def status=(_) + end + + sig { returns(Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::TrialInfo) } + def trial_info + end + + sig do + params(_: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::TrialInfo) + .returns(Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::TrialInfo) + end + def trial_info=(_) + end + + sig do + params( + id: String, + active_plan_phase_order: T.nilable(Integer), + adjustment_intervals: T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval], + auto_collection: T.nilable(T::Boolean), + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + customer: Orb::Models::Customer, + default_invoice_memo: T.nilable(String), + discount_intervals: T::Array[ + T.any( + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::UsageDiscountInterval + ) + ], + end_date: T.nilable(Time), + fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::FixedFeeQuantitySchedule], + invoicing_threshold: T.nilable(String), + maximum_intervals: T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::MaximumInterval], + metadata: T::Hash[Symbol, String], + minimum_intervals: T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::PriceInterval], + redeemed_coupon: T.nilable(Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::RedeemedCoupon), + start_date: Time, + status: Symbol, + trial_info: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::TrialInfo + ) + .void + end + def initialize( + id:, + active_plan_phase_order:, + adjustment_intervals:, + auto_collection:, + billing_cycle_anchor_configuration:, + billing_cycle_day:, + created_at:, + current_billing_period_end_date:, + current_billing_period_start_date:, + customer:, + default_invoice_memo:, + discount_intervals:, + end_date:, + fixed_fee_quantity_schedule:, + invoicing_threshold:, + maximum_intervals:, + metadata:, + minimum_intervals:, + net_terms:, + plan:, + price_intervals:, + redeemed_coupon:, + start_date:, + status:, + trial_info: + ) + end + + sig do + override + .returns( + { + id: String, + active_plan_phase_order: T.nilable(Integer), + adjustment_intervals: T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval], + auto_collection: T.nilable(T::Boolean), + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + customer: Orb::Models::Customer, + default_invoice_memo: T.nilable(String), + discount_intervals: T::Array[ + T.any( + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::UsageDiscountInterval + ) + ], + end_date: T.nilable(Time), + fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::FixedFeeQuantitySchedule], + invoicing_threshold: T.nilable(String), + maximum_intervals: T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::MaximumInterval], + metadata: T::Hash[Symbol, String], + minimum_intervals: T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::PriceInterval], + redeemed_coupon: T.nilable(Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::RedeemedCoupon), + start_date: Time, + status: Symbol, + trial_info: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::TrialInfo + } + ) + end + def to_hash + end + + class AdjustmentInterval < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig do + returns( + T.any( + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + end + def adjustment + end + + sig do + params( + _: T.any( + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + .returns( + T.any( + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + end + def adjustment=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + id: String, + adjustment: T.any( + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ), + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time + ) + .void + end + def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:) + end + + sig do + override + .returns( + { + id: String, + adjustment: T.any( + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ), + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time + } + ) + end + def to_hash + end + + class Adjustment < Orb::Union + abstract! + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float, + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + usage_discount:, + adjustment_type: :usage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float + } + ) + end + def to_hash + end + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + amount_discount:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + adjustment_type: :amount_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + percentage_discount:, + plan_phase_order:, + reason:, + adjustment_type: :percentage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + item_id:, + minimum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :minimum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + maximum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :maximum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + ) + end + private_class_method def self.variants + end + end + end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + sig { returns(Integer) } + def day + end + + sig { params(_: Integer).returns(Integer) } + def day=(_) + end + + sig { returns(T.nilable(Integer)) } + def month + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def month=(_) + end + + sig { returns(T.nilable(Integer)) } + def year + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def year=(_) + end + + sig { params(day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)).void } + def initialize(day:, month: nil, year: nil) + end + + sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) } + def to_hash + end + end + + class DiscountInterval < Orb::Union + abstract! + + class AmountDiscountInterval < Orb::BaseModel + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + amount_discount: String, + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time, + discount_type: Symbol + ) + .void + end + def initialize( + amount_discount:, + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + start_date:, + discount_type: :amount + ) + end + + sig do + override + .returns( + { + amount_discount: String, + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + start_date: Time + } + ) + end + def to_hash + end + end + + class PercentageDiscountInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + percentage_discount: Float, + start_date: Time, + discount_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + percentage_discount:, + start_date:, + discount_type: :percentage + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + percentage_discount: Float, + start_date: Time + } + ) + end + def to_hash + end + end + + class UsageDiscountInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time, + usage_discount: Float, + discount_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + start_date:, + usage_discount:, + discount_type: :usage + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + start_date: Time, + usage_discount: Float + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::AmountDiscountInterval], [Symbol, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::PercentageDiscountInterval], [Symbol, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::UsageDiscountInterval]] + ) + end + private_class_method def self.variants + end + end + + class FixedFeeQuantitySchedule < Orb::BaseModel + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(Float) } + def quantity + end + + sig { params(_: Float).returns(Float) } + def quantity=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { params(end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time).void } + def initialize(end_date:, price_id:, quantity:, start_date:) + end + + sig do + override.returns({end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time}) + end + def to_hash + end + end + + class MaximumInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + maximum_amount: String, + start_date: Time + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + maximum_amount:, + start_date: + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + maximum_amount: String, + start_date: Time + } + ) + end + def to_hash + end + end + + class MinimumInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + minimum_amount: String, + start_date: Time + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + minimum_amount:, + start_date: + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + minimum_amount: String, + start_date: Time + } + ) + end + def to_hash + end + end + + class PriceInterval < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Integer) } + def billing_cycle_day + end + + sig { params(_: Integer).returns(Integer) } + def billing_cycle_day=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_end_date=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_start_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_start_date=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(T.nilable(String)) } + def filter + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def filter=(_) + end + + sig do + returns( + T.nilable( + T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::PriceInterval::FixedFeeQuantityTransition] + ) + ) + end + def fixed_fee_quantity_transitions + end + + sig do + params( + _: T.nilable( + T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::PriceInterval::FixedFeeQuantityTransition] + ) + ) + .returns( + T.nilable( + T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::PriceInterval::FixedFeeQuantityTransition] + ) + ) + end + def fixed_fee_quantity_transitions=(_) + end + + sig do + returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price + end + + sig do + params( + _: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + .returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(T.nilable(T::Array[String])) } + def usage_customer_ids + end + + sig { params(_: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def usage_customer_ids=(_) + end + + sig do + params( + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + end_date: T.nilable(Time), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable( + T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::PriceInterval::FixedFeeQuantityTransition] + ), + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + start_date: Time, + usage_customer_ids: T.nilable(T::Array[String]) + ) + .void + end + def initialize( + id:, + billing_cycle_day:, + current_billing_period_end_date:, + current_billing_period_start_date:, + end_date:, + filter:, + fixed_fee_quantity_transitions:, + price:, + start_date:, + usage_customer_ids: + ) + end + + sig do + override + .returns( + { + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + end_date: T.nilable(Time), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable( + T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::PriceInterval::FixedFeeQuantityTransition] + ), + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + start_date: Time, + usage_customer_ids: T.nilable(T::Array[String]) + } + ) + end + def to_hash + end + + class FixedFeeQuantityTransition < Orb::BaseModel + sig { returns(Time) } + def effective_date + end + + sig { params(_: Time).returns(Time) } + def effective_date=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(Integer) } + def quantity + end + + sig { params(_: Integer).returns(Integer) } + def quantity=(_) + end + + sig { params(effective_date: Time, price_id: String, quantity: Integer).void } + def initialize(effective_date:, price_id:, quantity:) + end + + sig { override.returns({effective_date: Time, price_id: String, quantity: Integer}) } + def to_hash + end + end + end + + class RedeemedCoupon < Orb::BaseModel + sig { returns(String) } + def coupon_id + end + + sig { params(_: String).returns(String) } + def coupon_id=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { params(coupon_id: String, end_date: T.nilable(Time), start_date: Time).void } + def initialize(coupon_id:, end_date:, start_date:) + end + + sig { override.returns({coupon_id: String, end_date: T.nilable(Time), start_date: Time}) } + def to_hash + end + end + + class Status < Orb::Enum + abstract! + + ACTIVE = :active + ENDED = :ended + UPCOMING = :upcoming + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class TrialInfo < Orb::BaseModel + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { params(end_date: T.nilable(Time)).void } + def initialize(end_date:) + end + + sig { override.returns({end_date: T.nilable(Time)}) } + def to_hash + end + end + end + end +end diff --git a/rbi/lib/orb/models/subscription_update_trial_response.rbi b/rbi/lib/orb/models/subscription_update_trial_response.rbi new file mode 100644 index 00000000..2bc1c706 --- /dev/null +++ b/rbi/lib/orb/models/subscription_update_trial_response.rbi @@ -0,0 +1,1901 @@ +# typed: strong + +module Orb + module Models + class SubscriptionUpdateTrialResponse < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(T.nilable(Integer)) } + def active_plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def active_plan_phase_order=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval]) } + def adjustment_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval]) + .returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval]) + end + def adjustment_intervals=(_) + end + + sig { returns(T.nilable(T::Boolean)) } + def auto_collection + end + + sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def auto_collection=(_) + end + + sig { returns(Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration) } + def billing_cycle_anchor_configuration + end + + sig do + params(_: Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration) + .returns(Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration) + end + def billing_cycle_anchor_configuration=(_) + end + + sig { returns(Integer) } + def billing_cycle_day + end + + sig { params(_: Integer).returns(Integer) } + def billing_cycle_day=(_) + end + + sig { returns(Time) } + def created_at + end + + sig { params(_: Time).returns(Time) } + def created_at=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_end_date=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_start_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_start_date=(_) + end + + sig { returns(Orb::Models::Customer) } + def customer + end + + sig { params(_: Orb::Models::Customer).returns(Orb::Models::Customer) } + def customer=(_) + end + + sig { returns(T.nilable(String)) } + def default_invoice_memo + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def default_invoice_memo=(_) + end + + sig do + returns( + T::Array[ + T.any( + Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + end + def discount_intervals + end + + sig do + params( + _: T::Array[ + T.any( + Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + .returns( + T::Array[ + T.any( + Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::UsageDiscountInterval + ) + ] + ) + end + def discount_intervals=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::FixedFeeQuantitySchedule]) } + def fixed_fee_quantity_schedule + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionUpdateTrialResponse::FixedFeeQuantitySchedule]) + .returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::FixedFeeQuantitySchedule]) + end + def fixed_fee_quantity_schedule=(_) + end + + sig { returns(T.nilable(String)) } + def invoicing_threshold + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def invoicing_threshold=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval]) } + def maximum_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval]) + .returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval]) + end + def maximum_intervals=(_) + end + + sig { returns(T::Hash[Symbol, String]) } + def metadata + end + + sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) } + def metadata=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval]) } + def minimum_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval]) + .returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval]) + end + def minimum_intervals=(_) + end + + sig { returns(Integer) } + def net_terms + end + + sig { params(_: Integer).returns(Integer) } + def net_terms=(_) + end + + sig { returns(Orb::Models::Plan) } + def plan + end + + sig { params(_: Orb::Models::Plan).returns(Orb::Models::Plan) } + def plan=(_) + end + + sig { returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval]) } + def price_intervals + end + + sig do + params(_: T::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval]) + .returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval]) + end + def price_intervals=(_) + end + + sig { returns(T.nilable(Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon)) } + def redeemed_coupon + end + + sig do + params(_: T.nilable(Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon)) + .returns(T.nilable(Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon)) + end + def redeemed_coupon=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(Symbol) } + def status + end + + sig { params(_: Symbol).returns(Symbol) } + def status=(_) + end + + sig { returns(Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo) } + def trial_info + end + + sig do + params(_: Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo) + .returns(Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo) + end + def trial_info=(_) + end + + sig do + params( + id: String, + active_plan_phase_order: T.nilable(Integer), + adjustment_intervals: T::Array[Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval], + auto_collection: T.nilable(T::Boolean), + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + customer: Orb::Models::Customer, + default_invoice_memo: T.nilable(String), + discount_intervals: T::Array[ + T.any( + Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::UsageDiscountInterval + ) + ], + end_date: T.nilable(Time), + fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionUpdateTrialResponse::FixedFeeQuantitySchedule], + invoicing_threshold: T.nilable(String), + maximum_intervals: T::Array[Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval], + metadata: T::Hash[Symbol, String], + minimum_intervals: T::Array[Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: T::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval], + redeemed_coupon: T.nilable(Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon), + start_date: Time, + status: Symbol, + trial_info: Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo + ) + .void + end + def initialize( + id:, + active_plan_phase_order:, + adjustment_intervals:, + auto_collection:, + billing_cycle_anchor_configuration:, + billing_cycle_day:, + created_at:, + current_billing_period_end_date:, + current_billing_period_start_date:, + customer:, + default_invoice_memo:, + discount_intervals:, + end_date:, + fixed_fee_quantity_schedule:, + invoicing_threshold:, + maximum_intervals:, + metadata:, + minimum_intervals:, + net_terms:, + plan:, + price_intervals:, + redeemed_coupon:, + start_date:, + status:, + trial_info: + ) + end + + sig do + override + .returns( + { + id: String, + active_plan_phase_order: T.nilable(Integer), + adjustment_intervals: T::Array[Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval], + auto_collection: T.nilable(T::Boolean), + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + customer: Orb::Models::Customer, + default_invoice_memo: T.nilable(String), + discount_intervals: T::Array[ + T.any( + Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::AmountDiscountInterval, + Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::PercentageDiscountInterval, + Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::UsageDiscountInterval + ) + ], + end_date: T.nilable(Time), + fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionUpdateTrialResponse::FixedFeeQuantitySchedule], + invoicing_threshold: T.nilable(String), + maximum_intervals: T::Array[Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval], + metadata: T::Hash[Symbol, String], + minimum_intervals: T::Array[Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: T::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval], + redeemed_coupon: T.nilable(Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon), + start_date: Time, + status: Symbol, + trial_info: Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo + } + ) + end + def to_hash + end + + class AdjustmentInterval < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig do + returns( + T.any( + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + end + def adjustment + end + + sig do + params( + _: T.any( + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + .returns( + T.any( + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ) + ) + end + def adjustment=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + id: String, + adjustment: T.any( + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ), + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time + ) + .void + end + def initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:) + end + + sig do + override + .returns( + { + id: String, + adjustment: T.any( + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + ), + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time + } + ) + end + def to_hash + end + + class Adjustment < Orb::Union + abstract! + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float, + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + usage_discount:, + adjustment_type: :usage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + usage_discount: Float + } + ) + end + def to_hash + end + end + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + amount_discount:, + applies_to_price_ids:, + is_invoice_level:, + plan_phase_order:, + reason:, + adjustment_type: :amount_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + amount_discount: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + percentage_discount:, + plan_phase_order:, + reason:, + adjustment_type: :percentage_discount + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + percentage_discount: Float, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def item_id + end + + sig { params(_: String).returns(String) } + def item_id=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + item_id:, + minimum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :minimum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + item_id: String, + minimum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Symbol) } + def adjustment_type + end + + sig { params(_: Symbol).returns(Symbol) } + def adjustment_type=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Boolean) } + def is_invoice_level + end + + sig { params(_: T::Boolean).returns(T::Boolean) } + def is_invoice_level=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(T.nilable(Integer)) } + def plan_phase_order + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def plan_phase_order=(_) + end + + sig { returns(T.nilable(String)) } + def reason + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def reason=(_) + end + + sig do + params( + id: String, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String), + adjustment_type: Symbol + ) + .void + end + def initialize( + id:, + applies_to_price_ids:, + is_invoice_level:, + maximum_amount:, + plan_phase_order:, + reason:, + adjustment_type: :maximum + ) + end + + sig do + override + .returns( + { + id: String, + adjustment_type: Symbol, + applies_to_price_ids: T::Array[String], + is_invoice_level: T::Boolean, + maximum_amount: String, + plan_phase_order: T.nilable(Integer), + reason: T.nilable(String) + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + ) + end + private_class_method def self.variants + end + end + end + + class BillingCycleAnchorConfiguration < Orb::BaseModel + sig { returns(Integer) } + def day + end + + sig { params(_: Integer).returns(Integer) } + def day=(_) + end + + sig { returns(T.nilable(Integer)) } + def month + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def month=(_) + end + + sig { returns(T.nilable(Integer)) } + def year + end + + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def year=(_) + end + + sig { params(day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)).void } + def initialize(day:, month: nil, year: nil) + end + + sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) } + def to_hash + end + end + + class DiscountInterval < Orb::Union + abstract! + + class AmountDiscountInterval < Orb::BaseModel + sig { returns(String) } + def amount_discount + end + + sig { params(_: String).returns(String) } + def amount_discount=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + amount_discount: String, + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time, + discount_type: Symbol + ) + .void + end + def initialize( + amount_discount:, + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + start_date:, + discount_type: :amount + ) + end + + sig do + override + .returns( + { + amount_discount: String, + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + start_date: Time + } + ) + end + def to_hash + end + end + + class PercentageDiscountInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Float) } + def percentage_discount + end + + sig { params(_: Float).returns(Float) } + def percentage_discount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + percentage_discount: Float, + start_date: Time, + discount_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + percentage_discount:, + start_date:, + discount_type: :percentage + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + percentage_discount: Float, + start_date: Time + } + ) + end + def to_hash + end + end + + class UsageDiscountInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(Symbol) } + def discount_type + end + + sig { params(_: Symbol).returns(Symbol) } + def discount_type=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(Float) } + def usage_discount + end + + sig { params(_: Float).returns(Float) } + def usage_discount=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + start_date: Time, + usage_discount: Float, + discount_type: Symbol + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + start_date:, + usage_discount:, + discount_type: :usage + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + discount_type: Symbol, + end_date: T.nilable(Time), + start_date: Time, + usage_discount: Float + } + ) + end + def to_hash + end + end + + sig do + override + .returns( + [[Symbol, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::AmountDiscountInterval], [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::PercentageDiscountInterval], [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::UsageDiscountInterval]] + ) + end + private_class_method def self.variants + end + end + + class FixedFeeQuantitySchedule < Orb::BaseModel + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(Float) } + def quantity + end + + sig { params(_: Float).returns(Float) } + def quantity=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { params(end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time).void } + def initialize(end_date:, price_id:, quantity:, start_date:) + end + + sig do + override.returns({end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time}) + end + def to_hash + end + end + + class MaximumInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def maximum_amount + end + + sig { params(_: String).returns(String) } + def maximum_amount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + maximum_amount: String, + start_date: Time + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + maximum_amount:, + start_date: + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + maximum_amount: String, + start_date: Time + } + ) + end + def to_hash + end + end + + class MinimumInterval < Orb::BaseModel + sig { returns(T::Array[String]) } + def applies_to_price_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_ids=(_) + end + + sig { returns(T::Array[String]) } + def applies_to_price_interval_ids + end + + sig { params(_: T::Array[String]).returns(T::Array[String]) } + def applies_to_price_interval_ids=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(String) } + def minimum_amount + end + + sig { params(_: String).returns(String) } + def minimum_amount=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig do + params( + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + minimum_amount: String, + start_date: Time + ) + .void + end + def initialize( + applies_to_price_ids:, + applies_to_price_interval_ids:, + end_date:, + minimum_amount:, + start_date: + ) + end + + sig do + override + .returns( + { + applies_to_price_ids: T::Array[String], + applies_to_price_interval_ids: T::Array[String], + end_date: T.nilable(Time), + minimum_amount: String, + start_date: Time + } + ) + end + def to_hash + end + end + + class PriceInterval < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(Integer) } + def billing_cycle_day + end + + sig { params(_: Integer).returns(Integer) } + def billing_cycle_day=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_end_date=(_) + end + + sig { returns(T.nilable(Time)) } + def current_billing_period_start_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def current_billing_period_start_date=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(T.nilable(String)) } + def filter + end + + sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + def filter=(_) + end + + sig do + returns( + T.nilable( + T::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition] + ) + ) + end + def fixed_fee_quantity_transitions + end + + sig do + params( + _: T.nilable( + T::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition] + ) + ) + .returns( + T.nilable( + T::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition] + ) + ) + end + def fixed_fee_quantity_transitions=(_) + end + + sig do + returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price + end + + sig do + params( + _: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + .returns( + T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ) + ) + end + def price=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { returns(T.nilable(T::Array[String])) } + def usage_customer_ids + end + + sig { params(_: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def usage_customer_ids=(_) + end + + sig do + params( + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + end_date: T.nilable(Time), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable( + T::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition] + ), + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + start_date: Time, + usage_customer_ids: T.nilable(T::Array[String]) + ) + .void + end + def initialize( + id:, + billing_cycle_day:, + current_billing_period_end_date:, + current_billing_period_start_date:, + end_date:, + filter:, + fixed_fee_quantity_transitions:, + price:, + start_date:, + usage_customer_ids: + ) + end + + sig do + override + .returns( + { + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: T.nilable(Time), + current_billing_period_start_date: T.nilable(Time), + end_date: T.nilable(Time), + filter: T.nilable(String), + fixed_fee_quantity_transitions: T.nilable( + T::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition] + ), + price: T.any( + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice + ), + start_date: Time, + usage_customer_ids: T.nilable(T::Array[String]) + } + ) + end + def to_hash + end + + class FixedFeeQuantityTransition < Orb::BaseModel + sig { returns(Time) } + def effective_date + end + + sig { params(_: Time).returns(Time) } + def effective_date=(_) + end + + sig { returns(String) } + def price_id + end + + sig { params(_: String).returns(String) } + def price_id=(_) + end + + sig { returns(Integer) } + def quantity + end + + sig { params(_: Integer).returns(Integer) } + def quantity=(_) + end + + sig { params(effective_date: Time, price_id: String, quantity: Integer).void } + def initialize(effective_date:, price_id:, quantity:) + end + + sig { override.returns({effective_date: Time, price_id: String, quantity: Integer}) } + def to_hash + end + end + end + + class RedeemedCoupon < Orb::BaseModel + sig { returns(String) } + def coupon_id + end + + sig { params(_: String).returns(String) } + def coupon_id=(_) + end + + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { returns(Time) } + def start_date + end + + sig { params(_: Time).returns(Time) } + def start_date=(_) + end + + sig { params(coupon_id: String, end_date: T.nilable(Time), start_date: Time).void } + def initialize(coupon_id:, end_date:, start_date:) + end + + sig { override.returns({coupon_id: String, end_date: T.nilable(Time), start_date: Time}) } + def to_hash + end + end + + class Status < Orb::Enum + abstract! + + ACTIVE = :active + ENDED = :ended + UPCOMING = :upcoming + + sig { override.returns(T::Array[Symbol]) } + def self.values + end + end + + class TrialInfo < Orb::BaseModel + sig { returns(T.nilable(Time)) } + def end_date + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def end_date=(_) + end + + sig { params(end_date: T.nilable(Time)).void } + def initialize(end_date:) + end + + sig { override.returns({end_date: T.nilable(Time)}) } + def to_hash + end + end + end + end +end diff --git a/rbi/lib/orb/models/subscription_usage.rbi b/rbi/lib/orb/models/subscription_usage.rbi index e7d624d3..739ed9e1 100644 --- a/rbi/lib/orb/models/subscription_usage.rbi +++ b/rbi/lib/orb/models/subscription_usage.rbi @@ -26,19 +26,25 @@ module Orb end class Data < Orb::BaseModel - sig { returns(Orb::Models::BillableMetricSimpleModel) } + sig { returns(Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::BillableMetric) } def billable_metric end - sig { params(_: Orb::Models::BillableMetricSimpleModel).returns(Orb::Models::BillableMetricSimpleModel) } + sig do + params(_: Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::BillableMetric) + .returns(Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::BillableMetric) + end def billable_metric=(_) end - sig { returns(T::Array[Orb::Models::UsageModel]) } + sig { returns(T::Array[Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::Usage]) } def usage end - sig { params(_: T::Array[Orb::Models::UsageModel]).returns(T::Array[Orb::Models::UsageModel]) } + sig do + params(_: T::Array[Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::Usage]) + .returns(T::Array[Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::Usage]) + end def usage=(_) end @@ -52,8 +58,8 @@ module Orb sig do params( - billable_metric: Orb::Models::BillableMetricSimpleModel, - usage: T::Array[Orb::Models::UsageModel], + billable_metric: Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::BillableMetric, + usage: T::Array[Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::Usage], view_mode: Symbol ) .void @@ -65,8 +71,8 @@ module Orb override .returns( { - billable_metric: Orb::Models::BillableMetricSimpleModel, - usage: T::Array[Orb::Models::UsageModel], + billable_metric: Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::BillableMetric, + usage: T::Array[Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::Usage], view_mode: Symbol } ) @@ -74,6 +80,66 @@ module Orb def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + + class Usage < Orb::BaseModel + sig { returns(Float) } + def quantity + end + + sig { params(_: Float).returns(Float) } + def quantity=(_) + end + + sig { returns(Time) } + def timeframe_end + end + + sig { params(_: Time).returns(Time) } + def timeframe_end=(_) + end + + sig { returns(Time) } + def timeframe_start + end + + sig { params(_: Time).returns(Time) } + def timeframe_start=(_) + end + + sig { params(quantity: Float, timeframe_end: Time, timeframe_start: Time).void } + def initialize(quantity:, timeframe_end:, timeframe_start:) + end + + sig { override.returns({quantity: Float, timeframe_end: Time, timeframe_start: Time}) } + def to_hash + end + end + class ViewMode < Orb::Enum abstract! @@ -130,11 +196,14 @@ module Orb end class Data < Orb::BaseModel - sig { returns(Orb::Models::BillableMetricSimpleModel) } + sig { returns(Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::BillableMetric) } def billable_metric end - sig { params(_: Orb::Models::BillableMetricSimpleModel).returns(Orb::Models::BillableMetricSimpleModel) } + sig do + params(_: Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::BillableMetric) + .returns(Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::BillableMetric) + end def billable_metric=(_) end @@ -149,11 +218,14 @@ module Orb def metric_group=(_) end - sig { returns(T::Array[Orb::Models::UsageModel]) } + sig { returns(T::Array[Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::Usage]) } def usage end - sig { params(_: T::Array[Orb::Models::UsageModel]).returns(T::Array[Orb::Models::UsageModel]) } + sig do + params(_: T::Array[Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::Usage]) + .returns(T::Array[Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::Usage]) + end def usage=(_) end @@ -167,9 +239,9 @@ module Orb sig do params( - billable_metric: Orb::Models::BillableMetricSimpleModel, + billable_metric: Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::BillableMetric, metric_group: Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::MetricGroup, - usage: T::Array[Orb::Models::UsageModel], + usage: T::Array[Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::Usage], view_mode: Symbol ) .void @@ -181,9 +253,9 @@ module Orb override .returns( { - billable_metric: Orb::Models::BillableMetricSimpleModel, + billable_metric: Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::BillableMetric, metric_group: Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::MetricGroup, - usage: T::Array[Orb::Models::UsageModel], + usage: T::Array[Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::Usage], view_mode: Symbol } ) @@ -191,6 +263,32 @@ module Orb def to_hash end + class BillableMetric < Orb::BaseModel + sig { returns(String) } + def id + end + + sig { params(_: String).returns(String) } + def id=(_) + end + + sig { returns(String) } + def name + end + + sig { params(_: String).returns(String) } + def name=(_) + end + + sig { params(id: String, name: String).void } + def initialize(id:, name:) + end + + sig { override.returns({id: String, name: String}) } + def to_hash + end + end + class MetricGroup < Orb::BaseModel sig { returns(String) } def property_key @@ -217,6 +315,40 @@ module Orb end end + class Usage < Orb::BaseModel + sig { returns(Float) } + def quantity + end + + sig { params(_: Float).returns(Float) } + def quantity=(_) + end + + sig { returns(Time) } + def timeframe_end + end + + sig { params(_: Time).returns(Time) } + def timeframe_end=(_) + end + + sig { returns(Time) } + def timeframe_start + end + + sig { params(_: Time).returns(Time) } + def timeframe_start=(_) + end + + sig { params(quantity: Float, timeframe_end: Time, timeframe_start: Time).void } + def initialize(quantity:, timeframe_end:, timeframe_start:) + end + + sig { override.returns({quantity: Float, timeframe_end: Time, timeframe_start: Time}) } + def to_hash + end + end + class ViewMode < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/subscriptions.rbi b/rbi/lib/orb/models/subscriptions.rbi index 984ecabf..e2daf847 100644 --- a/rbi/lib/orb/models/subscriptions.rbi +++ b/rbi/lib/orb/models/subscriptions.rbi @@ -3,11 +3,11 @@ module Orb module Models class SubscriptionsAPI < Orb::BaseModel - sig { returns(T::Array[Orb::Models::SubscriptionModel]) } + sig { returns(T::Array[Orb::Models::Subscription]) } def data end - sig { params(_: T::Array[Orb::Models::SubscriptionModel]).returns(T::Array[Orb::Models::SubscriptionModel]) } + sig { params(_: T::Array[Orb::Models::Subscription]).returns(T::Array[Orb::Models::Subscription]) } def data=(_) end @@ -20,10 +20,7 @@ module Orb end sig do - params( - data: T::Array[Orb::Models::SubscriptionModel], - pagination_metadata: Orb::Models::PaginationMetadata - ) + params(data: T::Array[Orb::Models::Subscription], pagination_metadata: Orb::Models::PaginationMetadata) .void end def initialize(data:, pagination_metadata:) @@ -31,9 +28,7 @@ module Orb sig do override - .returns( - {data: T::Array[Orb::Models::SubscriptionModel], pagination_metadata: Orb::Models::PaginationMetadata} - ) + .returns({data: T::Array[Orb::Models::Subscription], pagination_metadata: Orb::Models::PaginationMetadata}) end def to_hash end diff --git a/rbi/lib/orb/models/subscriptions_model.rbi b/rbi/lib/orb/models/subscriptions_model.rbi deleted file mode 100644 index 491e1770..00000000 --- a/rbi/lib/orb/models/subscriptions_model.rbi +++ /dev/null @@ -1,42 +0,0 @@ -# typed: strong - -module Orb - module Models - class SubscriptionsModel < Orb::BaseModel - sig { returns(T::Array[Orb::Models::SubscriptionModel]) } - def data - end - - sig { params(_: T::Array[Orb::Models::SubscriptionModel]).returns(T::Array[Orb::Models::SubscriptionModel]) } - def data=(_) - end - - sig { returns(Orb::Models::PaginationMetadata) } - def pagination_metadata - end - - sig { params(_: Orb::Models::PaginationMetadata).returns(Orb::Models::PaginationMetadata) } - def pagination_metadata=(_) - end - - sig do - params( - data: T::Array[Orb::Models::SubscriptionModel], - pagination_metadata: Orb::Models::PaginationMetadata - ) - .void - end - def initialize(data:, pagination_metadata:) - end - - sig do - override - .returns( - {data: T::Array[Orb::Models::SubscriptionModel], pagination_metadata: Orb::Models::PaginationMetadata} - ) - end - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/tax_amount_model.rbi b/rbi/lib/orb/models/tax_amount_model.rbi deleted file mode 100644 index 170a2cfa..00000000 --- a/rbi/lib/orb/models/tax_amount_model.rbi +++ /dev/null @@ -1,49 +0,0 @@ -# typed: strong - -module Orb - module Models - class TaxAmountModel < Orb::BaseModel - sig { returns(String) } - def amount - end - - sig { params(_: String).returns(String) } - def amount=(_) - end - - sig { returns(String) } - def tax_rate_description - end - - sig { params(_: String).returns(String) } - def tax_rate_description=(_) - end - - sig { returns(T.nilable(String)) } - def tax_rate_percentage - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def tax_rate_percentage=(_) - end - - sig do - params(amount: String, tax_rate_description: String, tax_rate_percentage: T.nilable(String)).void - end - def initialize(amount:, tax_rate_description:, tax_rate_percentage:) - end - - sig do - override.returns( - { - amount: String, - tax_rate_description: String, - tax_rate_percentage: T.nilable(String) - } - ) - end - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/threshold_model.rbi b/rbi/lib/orb/models/threshold_model.rbi deleted file mode 100644 index 83512fe0..00000000 --- a/rbi/lib/orb/models/threshold_model.rbi +++ /dev/null @@ -1,23 +0,0 @@ -# typed: strong - -module Orb - module Models - class ThresholdModel < Orb::BaseModel - sig { returns(Float) } - def value - end - - sig { params(_: Float).returns(Float) } - def value=(_) - end - - sig { params(value: Float).void } - def initialize(value:) - end - - sig { override.returns({value: Float}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/tiered_bps_config_model.rbi b/rbi/lib/orb/models/tiered_bps_config_model.rbi deleted file mode 100644 index a30ca8ea..00000000 --- a/rbi/lib/orb/models/tiered_bps_config_model.rbi +++ /dev/null @@ -1,86 +0,0 @@ -# typed: strong - -module Orb - module Models - class TieredBpsConfigModel < Orb::BaseModel - sig { returns(T::Array[Orb::Models::TieredBpsConfigModel::Tier]) } - def tiers - end - - sig do - params(_: T::Array[Orb::Models::TieredBpsConfigModel::Tier]) - .returns(T::Array[Orb::Models::TieredBpsConfigModel::Tier]) - end - def tiers=(_) - end - - sig { params(tiers: T::Array[Orb::Models::TieredBpsConfigModel::Tier]).void } - def initialize(tiers:) - end - - sig { override.returns({tiers: T::Array[Orb::Models::TieredBpsConfigModel::Tier]}) } - def to_hash - end - - class Tier < Orb::BaseModel - sig { returns(Float) } - def bps - end - - sig { params(_: Float).returns(Float) } - def bps=(_) - end - - sig { returns(String) } - def minimum_amount - end - - sig { params(_: String).returns(String) } - def minimum_amount=(_) - end - - sig { returns(T.nilable(String)) } - def maximum_amount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def maximum_amount=(_) - end - - sig { returns(T.nilable(String)) } - def per_unit_maximum - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def per_unit_maximum=(_) - end - - sig do - params( - bps: Float, - minimum_amount: String, - maximum_amount: T.nilable(String), - per_unit_maximum: T.nilable(String) - ) - .void - end - def initialize(bps:, minimum_amount:, maximum_amount: nil, per_unit_maximum: nil) - end - - sig do - override - .returns( - { - bps: Float, - minimum_amount: String, - maximum_amount: T.nilable(String), - per_unit_maximum: T.nilable(String) - } - ) - end - def to_hash - end - end - end - end -end diff --git a/rbi/lib/orb/models/tiered_config_model.rbi b/rbi/lib/orb/models/tiered_config_model.rbi deleted file mode 100644 index de56f3e9..00000000 --- a/rbi/lib/orb/models/tiered_config_model.rbi +++ /dev/null @@ -1,60 +0,0 @@ -# typed: strong - -module Orb - module Models - class TieredConfigModel < Orb::BaseModel - sig { returns(T::Array[Orb::Models::TieredConfigModel::Tier]) } - def tiers - end - - sig do - params(_: T::Array[Orb::Models::TieredConfigModel::Tier]) - .returns(T::Array[Orb::Models::TieredConfigModel::Tier]) - end - def tiers=(_) - end - - sig { params(tiers: T::Array[Orb::Models::TieredConfigModel::Tier]).void } - def initialize(tiers:) - end - - sig { override.returns({tiers: T::Array[Orb::Models::TieredConfigModel::Tier]}) } - def to_hash - end - - class Tier < Orb::BaseModel - sig { returns(Float) } - def first_unit - end - - sig { params(_: Float).returns(Float) } - def first_unit=(_) - end - - sig { returns(String) } - def unit_amount - end - - sig { params(_: String).returns(String) } - def unit_amount=(_) - end - - sig { returns(T.nilable(Float)) } - def last_unit - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def last_unit=(_) - end - - sig { params(first_unit: Float, unit_amount: String, last_unit: T.nilable(Float)).void } - def initialize(first_unit:, unit_amount:, last_unit: nil) - end - - sig { override.returns({first_unit: Float, unit_amount: String, last_unit: T.nilable(Float)}) } - def to_hash - end - end - end - end -end diff --git a/rbi/lib/orb/models/top_up_model.rbi b/rbi/lib/orb/models/top_up_model.rbi deleted file mode 100644 index 201b3f98..00000000 --- a/rbi/lib/orb/models/top_up_model.rbi +++ /dev/null @@ -1,185 +0,0 @@ -# typed: strong - -module Orb - module Models - class TopUpModel < Orb::BaseModel - sig { returns(String) } - def id - end - - sig { params(_: String).returns(String) } - def id=(_) - end - - sig { returns(String) } - def amount - end - - sig { params(_: String).returns(String) } - def amount=(_) - end - - sig { returns(String) } - def currency - end - - sig { params(_: String).returns(String) } - def currency=(_) - end - - sig { returns(Orb::Models::TopUpModel::InvoiceSettings) } - def invoice_settings - end - - sig { params(_: Orb::Models::TopUpModel::InvoiceSettings).returns(Orb::Models::TopUpModel::InvoiceSettings) } - def invoice_settings=(_) - end - - sig { returns(String) } - def per_unit_cost_basis - end - - sig { params(_: String).returns(String) } - def per_unit_cost_basis=(_) - end - - sig { returns(String) } - def threshold - end - - sig { params(_: String).returns(String) } - def threshold=(_) - end - - sig { returns(T.nilable(Integer)) } - def expires_after - end - - sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } - def expires_after=(_) - end - - sig { returns(T.nilable(Symbol)) } - def expires_after_unit - end - - sig { params(_: T.nilable(Symbol)).returns(T.nilable(Symbol)) } - def expires_after_unit=(_) - end - - sig do - params( - id: String, - amount: String, - currency: String, - invoice_settings: Orb::Models::TopUpModel::InvoiceSettings, - per_unit_cost_basis: String, - threshold: String, - expires_after: T.nilable(Integer), - expires_after_unit: T.nilable(Symbol) - ) - .void - end - def initialize( - id:, - amount:, - currency:, - invoice_settings:, - per_unit_cost_basis:, - threshold:, - expires_after: nil, - expires_after_unit: nil - ) - end - - sig do - override - .returns( - { - id: String, - amount: String, - currency: String, - invoice_settings: Orb::Models::TopUpModel::InvoiceSettings, - per_unit_cost_basis: String, - threshold: String, - expires_after: T.nilable(Integer), - expires_after_unit: T.nilable(Symbol) - } - ) - end - def to_hash - end - - class InvoiceSettings < Orb::BaseModel - sig { returns(T::Boolean) } - def auto_collection - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def auto_collection=(_) - end - - sig { returns(Integer) } - def net_terms - end - - sig { params(_: Integer).returns(Integer) } - def net_terms=(_) - end - - sig { returns(T.nilable(String)) } - def memo - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def memo=(_) - end - - sig { returns(T.nilable(T::Boolean)) } - def require_successful_payment - end - - sig { params(_: T::Boolean).returns(T::Boolean) } - def require_successful_payment=(_) - end - - sig do - params( - auto_collection: T::Boolean, - net_terms: Integer, - memo: T.nilable(String), - require_successful_payment: T::Boolean - ) - .void - end - def initialize(auto_collection:, net_terms:, memo: nil, require_successful_payment: nil) - end - - sig do - override - .returns( - { - auto_collection: T::Boolean, - net_terms: Integer, - memo: T.nilable(String), - require_successful_payment: T::Boolean - } - ) - end - def to_hash - end - end - - class ExpiresAfterUnit < Orb::Enum - abstract! - - DAY = T.let(:day, T.nilable(Symbol)) - MONTH = T.let(:month, T.nilable(Symbol)) - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end -end diff --git a/rbi/lib/orb/models/top_ups_model.rbi b/rbi/lib/orb/models/top_ups_model.rbi deleted file mode 100644 index b8b26d7e..00000000 --- a/rbi/lib/orb/models/top_ups_model.rbi +++ /dev/null @@ -1,34 +0,0 @@ -# typed: strong - -module Orb - module Models - class TopUpsModel < Orb::BaseModel - sig { returns(T::Array[Orb::Models::TopUpModel]) } - def data - end - - sig { params(_: T::Array[Orb::Models::TopUpModel]).returns(T::Array[Orb::Models::TopUpModel]) } - def data=(_) - end - - sig { returns(Orb::Models::PaginationMetadata) } - def pagination_metadata - end - - sig { params(_: Orb::Models::PaginationMetadata).returns(Orb::Models::PaginationMetadata) } - def pagination_metadata=(_) - end - - sig { params(data: T::Array[Orb::Models::TopUpModel], pagination_metadata: Orb::Models::PaginationMetadata).void } - def initialize(data:, pagination_metadata:) - end - - sig do - override - .returns({data: T::Array[Orb::Models::TopUpModel], pagination_metadata: Orb::Models::PaginationMetadata}) - end - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/trial_discount_model.rbi b/rbi/lib/orb/models/trial_discount_model.rbi deleted file mode 100644 index 95904b28..00000000 --- a/rbi/lib/orb/models/trial_discount_model.rbi +++ /dev/null @@ -1,91 +0,0 @@ -# typed: strong - -module Orb - module Models - class TrialDiscountModel < Orb::BaseModel - sig { returns(T::Array[String]) } - def applies_to_price_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_ids=(_) - end - - sig { returns(Symbol) } - def discount_type - end - - sig { params(_: Symbol).returns(Symbol) } - def discount_type=(_) - end - - sig { returns(T.nilable(String)) } - def reason - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def reason=(_) - end - - sig { returns(T.nilable(String)) } - def trial_amount_discount - end - - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } - def trial_amount_discount=(_) - end - - sig { returns(T.nilable(Float)) } - def trial_percentage_discount - end - - sig { params(_: T.nilable(Float)).returns(T.nilable(Float)) } - def trial_percentage_discount=(_) - end - - sig do - params( - applies_to_price_ids: T::Array[String], - discount_type: Symbol, - reason: T.nilable(String), - trial_amount_discount: T.nilable(String), - trial_percentage_discount: T.nilable(Float) - ) - .void - end - def initialize( - applies_to_price_ids:, - discount_type:, - reason: nil, - trial_amount_discount: nil, - trial_percentage_discount: nil - ) - end - - sig do - override - .returns( - { - applies_to_price_ids: T::Array[String], - discount_type: Symbol, - reason: T.nilable(String), - trial_amount_discount: T.nilable(String), - trial_percentage_discount: T.nilable(Float) - } - ) - end - def to_hash - end - - class DiscountType < Orb::Enum - abstract! - - TRIAL = :trial - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end -end diff --git a/rbi/lib/orb/models/unit_config_model.rbi b/rbi/lib/orb/models/unit_config_model.rbi deleted file mode 100644 index bf58d03d..00000000 --- a/rbi/lib/orb/models/unit_config_model.rbi +++ /dev/null @@ -1,23 +0,0 @@ -# typed: strong - -module Orb - module Models - class UnitConfigModel < Orb::BaseModel - sig { returns(String) } - def unit_amount - end - - sig { params(_: String).returns(String) } - def unit_amount=(_) - end - - sig { params(unit_amount: String).void } - def initialize(unit_amount:) - end - - sig { override.returns({unit_amount: String}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/models/usage_discount_interval_model.rbi b/rbi/lib/orb/models/usage_discount_interval_model.rbi deleted file mode 100644 index ef972fab..00000000 --- a/rbi/lib/orb/models/usage_discount_interval_model.rbi +++ /dev/null @@ -1,102 +0,0 @@ -# typed: strong - -module Orb - module Models - class UsageDiscountIntervalModel < Orb::BaseModel - sig { returns(T::Array[String]) } - def applies_to_price_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_ids=(_) - end - - sig { returns(T::Array[String]) } - def applies_to_price_interval_ids - end - - sig { params(_: T::Array[String]).returns(T::Array[String]) } - def applies_to_price_interval_ids=(_) - end - - sig { returns(Symbol) } - def discount_type - end - - sig { params(_: Symbol).returns(Symbol) } - def discount_type=(_) - end - - sig { returns(T.nilable(Time)) } - def end_date - end - - sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } - def end_date=(_) - end - - sig { returns(Time) } - def start_date - end - - sig { params(_: Time).returns(Time) } - def start_date=(_) - end - - sig { returns(Float) } - def usage_discount - end - - sig { params(_: Float).returns(Float) } - def usage_discount=(_) - end - - sig do - params( - applies_to_price_ids: T::Array[String], - applies_to_price_interval_ids: T::Array[String], - discount_type: Symbol, - end_date: T.nilable(Time), - start_date: Time, - usage_discount: Float - ) - .void - end - def initialize( - applies_to_price_ids:, - applies_to_price_interval_ids:, - discount_type:, - end_date:, - start_date:, - usage_discount: - ) - end - - sig do - override - .returns( - { - applies_to_price_ids: T::Array[String], - applies_to_price_interval_ids: T::Array[String], - discount_type: Symbol, - end_date: T.nilable(Time), - start_date: Time, - usage_discount: Float - } - ) - end - def to_hash - end - - class DiscountType < Orb::Enum - abstract! - - USAGE = :usage - - sig { override.returns(T::Array[Symbol]) } - def self.values - end - end - end - end -end diff --git a/rbi/lib/orb/models/usage_model.rbi b/rbi/lib/orb/models/usage_model.rbi deleted file mode 100644 index 517d38a9..00000000 --- a/rbi/lib/orb/models/usage_model.rbi +++ /dev/null @@ -1,39 +0,0 @@ -# typed: strong - -module Orb - module Models - class UsageModel < Orb::BaseModel - sig { returns(Float) } - def quantity - end - - sig { params(_: Float).returns(Float) } - def quantity=(_) - end - - sig { returns(Time) } - def timeframe_end - end - - sig { params(_: Time).returns(Time) } - def timeframe_end=(_) - end - - sig { returns(Time) } - def timeframe_start - end - - sig { params(_: Time).returns(Time) } - def timeframe_start=(_) - end - - sig { params(quantity: Float, timeframe_end: Time, timeframe_start: Time).void } - def initialize(quantity:, timeframe_end:, timeframe_start:) - end - - sig { override.returns({quantity: Float, timeframe_end: Time, timeframe_start: Time}) } - def to_hash - end - end - end -end diff --git a/rbi/lib/orb/resources/alerts.rbi b/rbi/lib/orb/resources/alerts.rbi index e1984469..54e56fcf 100644 --- a/rbi/lib/orb/resources/alerts.rbi +++ b/rbi/lib/orb/resources/alerts.rbi @@ -8,7 +8,7 @@ module Orb alert_id: String, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::AlertModel) + .returns(Orb::Models::Alert) end def retrieve(alert_id, request_options: {}) end @@ -16,10 +16,10 @@ module Orb sig do params( alert_configuration_id: String, - thresholds: T::Array[Orb::Models::ThresholdModel], + thresholds: T::Array[Orb::Models::AlertUpdateParams::Threshold], request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::AlertModel) + .returns(Orb::Models::Alert) end def update(alert_configuration_id, thresholds:, request_options: {}) end @@ -37,7 +37,7 @@ module Orb subscription_id: T.nilable(String), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Page[Orb::Models::AlertModel]) + .returns(Orb::Page[Orb::Models::Alert]) end def list( created_at_gt: nil, @@ -58,10 +58,10 @@ module Orb customer_id: String, currency: String, type: Symbol, - thresholds: T.nilable(T::Array[Orb::Models::ThresholdModel]), + thresholds: T.nilable(T::Array[Orb::Models::CreateCustomerAlertRequest::Threshold]), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::AlertModel) + .returns(Orb::Models::Alert) end def create_for_customer(customer_id, currency:, type:, thresholds: nil, request_options: {}) end @@ -71,10 +71,10 @@ module Orb external_customer_id: String, currency: String, type: Symbol, - thresholds: T.nilable(T::Array[Orb::Models::ThresholdModel]), + thresholds: T.nilable(T::Array[Orb::Models::CreateCustomerAlertRequest::Threshold]), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::AlertModel) + .returns(Orb::Models::Alert) end def create_for_external_customer( external_customer_id, @@ -88,12 +88,12 @@ module Orb sig do params( subscription_id: String, - thresholds: T::Array[Orb::Models::ThresholdModel], + thresholds: T::Array[Orb::Models::AlertCreateForSubscriptionParams::Threshold], type: Symbol, metric_id: T.nilable(String), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::AlertModel) + .returns(Orb::Models::Alert) end def create_for_subscription(subscription_id, thresholds:, type:, metric_id: nil, request_options: {}) end @@ -104,7 +104,7 @@ module Orb subscription_id: T.nilable(String), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::AlertModel) + .returns(Orb::Models::Alert) end def disable(alert_configuration_id, subscription_id: nil, request_options: {}) end @@ -115,7 +115,7 @@ module Orb subscription_id: T.nilable(String), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::AlertModel) + .returns(Orb::Models::Alert) end def enable(alert_configuration_id, subscription_id: nil, request_options: {}) end diff --git a/rbi/lib/orb/resources/coupons.rbi b/rbi/lib/orb/resources/coupons.rbi index 8464aa00..a743e409 100644 --- a/rbi/lib/orb/resources/coupons.rbi +++ b/rbi/lib/orb/resources/coupons.rbi @@ -18,7 +18,7 @@ module Orb max_redemptions: T.nilable(Integer), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::CouponModel) + .returns(Orb::Models::Coupon) end def create( discount:, @@ -37,7 +37,7 @@ module Orb show_archived: T.nilable(T::Boolean), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Page[Orb::Models::CouponModel]) + .returns(Orb::Page[Orb::Models::Coupon]) end def list(cursor: nil, limit: nil, redemption_code: nil, show_archived: nil, request_options: {}) end @@ -47,7 +47,7 @@ module Orb coupon_id: String, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::CouponModel) + .returns(Orb::Models::Coupon) end def archive(coupon_id, request_options: {}) end @@ -57,7 +57,7 @@ module Orb coupon_id: String, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::CouponModel) + .returns(Orb::Models::Coupon) end def fetch(coupon_id, request_options: {}) end diff --git a/rbi/lib/orb/resources/coupons/subscriptions.rbi b/rbi/lib/orb/resources/coupons/subscriptions.rbi index 5a359b16..eaa23657 100644 --- a/rbi/lib/orb/resources/coupons/subscriptions.rbi +++ b/rbi/lib/orb/resources/coupons/subscriptions.rbi @@ -11,7 +11,7 @@ module Orb limit: Integer, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Page[Orb::Models::SubscriptionModel]) + .returns(Orb::Page[Orb::Models::Subscription]) end def list(coupon_id, cursor: nil, limit: nil, request_options: {}) end diff --git a/rbi/lib/orb/resources/credit_notes.rbi b/rbi/lib/orb/resources/credit_notes.rbi index 4fe1bd6b..2f55b4f3 100644 --- a/rbi/lib/orb/resources/credit_notes.rbi +++ b/rbi/lib/orb/resources/credit_notes.rbi @@ -10,7 +10,7 @@ module Orb reason: T.nilable(Symbol), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::CreditNoteModel) + .returns(Orb::Models::CreditNote) end def create(line_items:, memo: nil, reason: nil, request_options: {}) end @@ -21,7 +21,7 @@ module Orb limit: Integer, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Page[Orb::Models::CreditNoteModel]) + .returns(Orb::Page[Orb::Models::CreditNote]) end def list(cursor: nil, limit: nil, request_options: {}) end @@ -31,7 +31,7 @@ module Orb credit_note_id: String, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::CreditNoteModel) + .returns(Orb::Models::CreditNote) end def fetch(credit_note_id, request_options: {}) end diff --git a/rbi/lib/orb/resources/customers.rbi b/rbi/lib/orb/resources/customers.rbi index 7f29d629..53015b31 100644 --- a/rbi/lib/orb/resources/customers.rbi +++ b/rbi/lib/orb/resources/customers.rbi @@ -19,30 +19,30 @@ module Orb params( email: String, name: String, - accounting_sync_configuration: T.nilable(Orb::Models::NewAccountingSyncConfigurationModel), + accounting_sync_configuration: T.nilable(Orb::Models::CustomerCreateParams::AccountingSyncConfiguration), additional_emails: T.nilable(T::Array[String]), auto_collection: T.nilable(T::Boolean), - billing_address: T.nilable(Orb::Models::AddressInputModel), + billing_address: T.nilable(Orb::Models::CustomerCreateParams::BillingAddress), currency: T.nilable(String), email_delivery: T.nilable(T::Boolean), external_customer_id: T.nilable(String), - hierarchy: T.nilable(Orb::Models::CustomerHierarchyConfigModel), + hierarchy: T.nilable(Orb::Models::CustomerCreateParams::Hierarchy), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), payment_provider: T.nilable(Symbol), payment_provider_id: T.nilable(String), - reporting_configuration: T.nilable(Orb::Models::NewReportingConfigurationModel), - shipping_address: T.nilable(Orb::Models::AddressInputModel), + reporting_configuration: T.nilable(Orb::Models::CustomerCreateParams::ReportingConfiguration), + shipping_address: T.nilable(Orb::Models::CustomerCreateParams::ShippingAddress), tax_configuration: T.nilable( T.any( - Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration, - Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration + Orb::Models::CustomerCreateParams::TaxConfiguration::NewAvalaraTaxConfiguration, + Orb::Models::CustomerCreateParams::TaxConfiguration::NewTaxJarConfiguration ) ), - tax_id: T.nilable(Orb::Models::CustomerTaxIDModel), + tax_id: T.nilable(Orb::Models::CustomerCreateParams::TaxID), timezone: T.nilable(String), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::CustomerModel) + .returns(Orb::Models::Customer) end def create( email:, @@ -70,31 +70,31 @@ module Orb sig do params( customer_id: String, - accounting_sync_configuration: T.nilable(Orb::Models::NewAccountingSyncConfigurationModel), + accounting_sync_configuration: T.nilable(Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration), additional_emails: T.nilable(T::Array[String]), auto_collection: T.nilable(T::Boolean), - billing_address: T.nilable(Orb::Models::AddressInputModel), + billing_address: T.nilable(Orb::Models::CustomerUpdateParams::BillingAddress), currency: T.nilable(String), email: T.nilable(String), email_delivery: T.nilable(T::Boolean), external_customer_id: T.nilable(String), - hierarchy: T.nilable(Orb::Models::CustomerHierarchyConfigModel), + hierarchy: T.nilable(Orb::Models::CustomerUpdateParams::Hierarchy), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), name: T.nilable(String), payment_provider: T.nilable(Symbol), payment_provider_id: T.nilable(String), - reporting_configuration: T.nilable(Orb::Models::NewReportingConfigurationModel), - shipping_address: T.nilable(Orb::Models::AddressInputModel), + reporting_configuration: T.nilable(Orb::Models::CustomerUpdateParams::ReportingConfiguration), + shipping_address: T.nilable(Orb::Models::CustomerUpdateParams::ShippingAddress), tax_configuration: T.nilable( T.any( - Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration, - Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration + Orb::Models::CustomerUpdateParams::TaxConfiguration::NewAvalaraTaxConfiguration, + Orb::Models::CustomerUpdateParams::TaxConfiguration::NewTaxJarConfiguration ) ), - tax_id: T.nilable(Orb::Models::CustomerTaxIDModel), + tax_id: T.nilable(Orb::Models::CustomerUpdateParams::TaxID), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::CustomerModel) + .returns(Orb::Models::Customer) end def update( customer_id, @@ -129,7 +129,7 @@ module Orb limit: Integer, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Page[Orb::Models::CustomerModel]) + .returns(Orb::Page[Orb::Models::Customer]) end def list( created_at_gt: nil, @@ -157,7 +157,7 @@ module Orb customer_id: String, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::CustomerModel) + .returns(Orb::Models::Customer) end def fetch(customer_id, request_options: {}) end @@ -167,7 +167,7 @@ module Orb external_customer_id: String, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::CustomerModel) + .returns(Orb::Models::Customer) end def fetch_by_external_id(external_customer_id, request_options: {}) end @@ -195,31 +195,31 @@ module Orb sig do params( id: String, - accounting_sync_configuration: T.nilable(Orb::Models::NewAccountingSyncConfigurationModel), + accounting_sync_configuration: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration), additional_emails: T.nilable(T::Array[String]), auto_collection: T.nilable(T::Boolean), - billing_address: T.nilable(Orb::Models::AddressInputModel), + billing_address: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::BillingAddress), currency: T.nilable(String), email: T.nilable(String), email_delivery: T.nilable(T::Boolean), external_customer_id: T.nilable(String), - hierarchy: T.nilable(Orb::Models::CustomerHierarchyConfigModel), + hierarchy: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::Hierarchy), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), name: T.nilable(String), payment_provider: T.nilable(Symbol), payment_provider_id: T.nilable(String), - reporting_configuration: T.nilable(Orb::Models::NewReportingConfigurationModel), - shipping_address: T.nilable(Orb::Models::AddressInputModel), + reporting_configuration: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::ReportingConfiguration), + shipping_address: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::ShippingAddress), tax_configuration: T.nilable( T.any( - Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration, - Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration + Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewAvalaraTaxConfiguration, + Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewTaxJarConfiguration ) ), - tax_id: T.nilable(Orb::Models::CustomerTaxIDModel), + tax_id: T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::TaxID), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::CustomerModel) + .returns(Orb::Models::Customer) end def update_by_external_id( id, diff --git a/rbi/lib/orb/resources/customers/balance_transactions.rbi b/rbi/lib/orb/resources/customers/balance_transactions.rbi index 49b2639d..b7d6dcfb 100644 --- a/rbi/lib/orb/resources/customers/balance_transactions.rbi +++ b/rbi/lib/orb/resources/customers/balance_transactions.rbi @@ -12,7 +12,7 @@ module Orb description: T.nilable(String), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::CustomerBalanceTransactionModel) + .returns(Orb::Models::Customers::BalanceTransactionCreateResponse) end def create(customer_id, amount:, type:, description: nil, request_options: {}) end @@ -28,7 +28,7 @@ module Orb operation_time_lte: T.nilable(Time), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Page[Orb::Models::CustomerBalanceTransactionModel]) + .returns(Orb::Page[Orb::Models::Customers::BalanceTransactionListResponse]) end def list( customer_id, diff --git a/rbi/lib/orb/resources/customers/costs.rbi b/rbi/lib/orb/resources/customers/costs.rbi index c4760cf9..d28bb7c4 100644 --- a/rbi/lib/orb/resources/customers/costs.rbi +++ b/rbi/lib/orb/resources/customers/costs.rbi @@ -13,7 +13,7 @@ module Orb view_mode: T.nilable(Symbol), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::CustomerCostsModel) + .returns(Orb::Models::Customers::CostListResponse) end def list( customer_id, @@ -34,7 +34,7 @@ module Orb view_mode: T.nilable(Symbol), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::CustomerCostsModel) + .returns(Orb::Models::Customers::CostListByExternalIDResponse) end def list_by_external_id( external_customer_id, diff --git a/rbi/lib/orb/resources/customers/credits.rbi b/rbi/lib/orb/resources/customers/credits.rbi index 92b0f68c..276ff166 100644 --- a/rbi/lib/orb/resources/customers/credits.rbi +++ b/rbi/lib/orb/resources/customers/credits.rbi @@ -21,7 +21,7 @@ module Orb limit: Integer, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Page[Orb::Models::CustomerCreditBalancesModel::Data]) + .returns(Orb::Page[Orb::Models::Customers::CreditListResponse]) end def list( customer_id, @@ -42,7 +42,7 @@ module Orb limit: Integer, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Page[Orb::Models::CustomerCreditBalancesModel::Data]) + .returns(Orb::Page[Orb::Models::Customers::CreditListByExternalIDResponse]) end def list_by_external_id( external_customer_id, diff --git a/rbi/lib/orb/resources/customers/credits/ledger.rbi b/rbi/lib/orb/resources/customers/credits/ledger.rbi index e8b0c790..b5707d52 100644 --- a/rbi/lib/orb/resources/customers/credits/ledger.rbi +++ b/rbi/lib/orb/resources/customers/credits/ledger.rbi @@ -23,13 +23,13 @@ module Orb .returns( Orb::Page[ T.any( - Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry, - Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry, - Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry, - Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry, - Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry, - Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry, - Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry + Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry, + Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry, + Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry, + Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry, + Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry, + Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry, + Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry ) ] ) @@ -58,13 +58,13 @@ module Orb ) .returns( T.any( - Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry, - Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry, - Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry, - Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry, - Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry, - Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry, - Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry + Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry, + Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry, + Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry, + Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry, + Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry, + Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry, + Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry ) ) end @@ -79,13 +79,13 @@ module Orb ) .returns( T.any( - Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry, - Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry, - Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry, - Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry, - Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry, - Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry, - Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry, + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry, + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry, + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry, + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry, + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry, + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry ) ) end @@ -114,13 +114,13 @@ module Orb .returns( Orb::Page[ T.any( - Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry, - Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry, - Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry, - Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry, - Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry, - Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry, - Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry, + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry, + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry, + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry, + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry, + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry, + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry ) ] ) diff --git a/rbi/lib/orb/resources/customers/credits/top_ups.rbi b/rbi/lib/orb/resources/customers/credits/top_ups.rbi index d7875552..ca19e318 100644 --- a/rbi/lib/orb/resources/customers/credits/top_ups.rbi +++ b/rbi/lib/orb/resources/customers/credits/top_ups.rbi @@ -18,7 +18,7 @@ module Orb expires_after_unit: T.nilable(Symbol), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::TopUpModel) + .returns(Orb::Models::Customers::Credits::TopUpCreateResponse) end def create( customer_id, @@ -41,7 +41,7 @@ module Orb limit: Integer, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Page[Orb::Models::TopUpModel]) + .returns(Orb::Page[Orb::Models::Customers::Credits::TopUpListResponse]) end def list(customer_id, cursor: nil, limit: nil, request_options: {}) end @@ -70,7 +70,7 @@ module Orb expires_after_unit: T.nilable(Symbol), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::TopUpModel) + .returns(Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse) end def create_by_external_id( external_customer_id, @@ -104,7 +104,7 @@ module Orb limit: Integer, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Page[Orb::Models::TopUpModel]) + .returns(Orb::Page[Orb::Models::Customers::Credits::TopUpListByExternalIDResponse]) end def list_by_external_id(external_customer_id, cursor: nil, limit: nil, request_options: {}) end diff --git a/rbi/lib/orb/resources/dimensional_price_groups.rbi b/rbi/lib/orb/resources/dimensional_price_groups.rbi index c5ac57a6..d8022d6a 100644 --- a/rbi/lib/orb/resources/dimensional_price_groups.rbi +++ b/rbi/lib/orb/resources/dimensional_price_groups.rbi @@ -16,7 +16,7 @@ module Orb metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::DimensionalPriceGroupModel) + .returns(Orb::Models::DimensionalPriceGroup) end def create( billable_metric_id:, @@ -33,7 +33,7 @@ module Orb dimensional_price_group_id: String, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::DimensionalPriceGroupModel) + .returns(Orb::Models::DimensionalPriceGroup) end def retrieve(dimensional_price_group_id, request_options: {}) end @@ -44,7 +44,7 @@ module Orb limit: Integer, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Page[Orb::Models::DimensionalPriceGroupModel]) + .returns(Orb::Page[Orb::Models::DimensionalPriceGroup]) end def list(cursor: nil, limit: nil, request_options: {}) end diff --git a/rbi/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi b/rbi/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi index 7b1ccb01..2068d28c 100644 --- a/rbi/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi +++ b/rbi/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi @@ -9,7 +9,7 @@ module Orb external_dimensional_price_group_id: String, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::DimensionalPriceGroupModel) + .returns(Orb::Models::DimensionalPriceGroup) end def retrieve(external_dimensional_price_group_id, request_options: {}) end diff --git a/rbi/lib/orb/resources/events/backfills.rbi b/rbi/lib/orb/resources/events/backfills.rbi index 695deab7..b43ab432 100644 --- a/rbi/lib/orb/resources/events/backfills.rbi +++ b/rbi/lib/orb/resources/events/backfills.rbi @@ -15,7 +15,7 @@ module Orb replace_existing_events: T::Boolean, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::BackfillModel) + .returns(Orb::Models::Events::BackfillCreateResponse) end def create( timeframe_end:, @@ -35,7 +35,7 @@ module Orb limit: Integer, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Page[Orb::Models::BackfillModel]) + .returns(Orb::Page[Orb::Models::Events::BackfillListResponse]) end def list(cursor: nil, limit: nil, request_options: {}) end @@ -45,7 +45,7 @@ module Orb backfill_id: String, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::BackfillModel) + .returns(Orb::Models::Events::BackfillCloseResponse) end def close(backfill_id, request_options: {}) end @@ -55,7 +55,7 @@ module Orb backfill_id: String, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::BackfillModel) + .returns(Orb::Models::Events::BackfillFetchResponse) end def fetch(backfill_id, request_options: {}) end @@ -65,7 +65,7 @@ module Orb backfill_id: String, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::BackfillModel) + .returns(Orb::Models::Events::BackfillRevertResponse) end def revert(backfill_id, request_options: {}) end diff --git a/rbi/lib/orb/resources/invoice_line_items.rbi b/rbi/lib/orb/resources/invoice_line_items.rbi index 7b70a238..4f84e034 100644 --- a/rbi/lib/orb/resources/invoice_line_items.rbi +++ b/rbi/lib/orb/resources/invoice_line_items.rbi @@ -13,7 +13,7 @@ module Orb start_date: Date, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::InvoiceLineItemModel) + .returns(Orb::Models::InvoiceLineItemCreateResponse) end def create(amount:, end_date:, invoice_id:, name:, quantity:, start_date:, request_options: {}) end diff --git a/rbi/lib/orb/resources/invoices.rbi b/rbi/lib/orb/resources/invoices.rbi index c192ccde..41db7659 100644 --- a/rbi/lib/orb/resources/invoices.rbi +++ b/rbi/lib/orb/resources/invoices.rbi @@ -24,7 +24,7 @@ module Orb will_auto_issue: T::Boolean, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::InvoiceModel) + .returns(Orb::Models::Invoice) end def create( currency:, @@ -47,7 +47,7 @@ module Orb metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::InvoiceModel) + .returns(Orb::Models::Invoice) end def update(invoice_id, metadata: nil, request_options: {}) end @@ -75,7 +75,7 @@ module Orb subscription_id: T.nilable(String), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Page[Orb::Models::InvoiceModel]) + .returns(Orb::Page[Orb::Models::Invoice]) end def list( amount: nil, @@ -106,7 +106,7 @@ module Orb invoice_id: String, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::InvoiceModel) + .returns(Orb::Models::Invoice) end def fetch(invoice_id, request_options: {}) end @@ -127,7 +127,7 @@ module Orb synchronous: T::Boolean, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::InvoiceModel) + .returns(Orb::Models::Invoice) end def issue(invoice_id, synchronous: nil, request_options: {}) end @@ -140,7 +140,7 @@ module Orb notes: T.nilable(String), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::InvoiceModel) + .returns(Orb::Models::Invoice) end def mark_paid(invoice_id, payment_received_date:, external_id: nil, notes: nil, request_options: {}) end @@ -150,7 +150,7 @@ module Orb invoice_id: String, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::InvoiceModel) + .returns(Orb::Models::Invoice) end def pay(invoice_id, request_options: {}) end @@ -160,7 +160,7 @@ module Orb invoice_id: String, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::InvoiceModel) + .returns(Orb::Models::Invoice) end def void(invoice_id, request_options: {}) end diff --git a/rbi/lib/orb/resources/items.rbi b/rbi/lib/orb/resources/items.rbi index f76f0775..8f43fd41 100644 --- a/rbi/lib/orb/resources/items.rbi +++ b/rbi/lib/orb/resources/items.rbi @@ -13,7 +13,7 @@ module Orb ) ) ) - .returns(Orb::Models::ItemModel) + .returns(Orb::Models::Item) end def create(name:, request_options: {}) end @@ -21,11 +21,11 @@ module Orb sig do params( item_id: String, - external_connections: T.nilable(T::Array[Orb::Models::ItemExternalConnectionModel]), + external_connections: T.nilable(T::Array[Orb::Models::ItemUpdateParams::ExternalConnection]), name: T.nilable(String), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::ItemModel) + .returns(Orb::Models::Item) end def update(item_id, external_connections: nil, name: nil, request_options: {}) end @@ -36,7 +36,7 @@ module Orb limit: Integer, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Page[Orb::Models::ItemModel]) + .returns(Orb::Page[Orb::Models::Item]) end def list(cursor: nil, limit: nil, request_options: {}) end @@ -46,7 +46,7 @@ module Orb item_id: String, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::ItemModel) + .returns(Orb::Models::Item) end def fetch(item_id, request_options: {}) end diff --git a/rbi/lib/orb/resources/metrics.rbi b/rbi/lib/orb/resources/metrics.rbi index a8d1cc95..05a395ef 100644 --- a/rbi/lib/orb/resources/metrics.rbi +++ b/rbi/lib/orb/resources/metrics.rbi @@ -12,7 +12,7 @@ module Orb metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::BillableMetricModel) + .returns(Orb::Models::BillableMetric) end def create(description:, item_id:, name:, sql:, metadata: nil, request_options: {}) end @@ -23,7 +23,7 @@ module Orb metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::BillableMetricModel) + .returns(Orb::Models::BillableMetric) end def update(metric_id, metadata: nil, request_options: {}) end @@ -38,7 +38,7 @@ module Orb limit: Integer, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Page[Orb::Models::BillableMetricModel]) + .returns(Orb::Page[Orb::Models::BillableMetric]) end def list( created_at_gt: nil, @@ -56,7 +56,7 @@ module Orb metric_id: String, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::BillableMetricModel) + .returns(Orb::Models::BillableMetric) end def fetch(metric_id, request_options: {}) end diff --git a/rbi/lib/orb/resources/plans.rbi b/rbi/lib/orb/resources/plans.rbi index 6b7b42e8..c35c7ee3 100644 --- a/rbi/lib/orb/resources/plans.rbi +++ b/rbi/lib/orb/resources/plans.rbi @@ -47,7 +47,7 @@ module Orb status: Symbol, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::PlanModel) + .returns(Orb::Models::Plan) end def create( currency:, @@ -69,7 +69,7 @@ module Orb metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::PlanModel) + .returns(Orb::Models::Plan) end def update(plan_id, external_plan_id: nil, metadata: nil, request_options: {}) end @@ -85,7 +85,7 @@ module Orb status: Symbol, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Page[Orb::Models::PlanModel]) + .returns(Orb::Page[Orb::Models::Plan]) end def list( created_at_gt: nil, @@ -104,7 +104,7 @@ module Orb plan_id: String, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::PlanModel) + .returns(Orb::Models::Plan) end def fetch(plan_id, request_options: {}) end diff --git a/rbi/lib/orb/resources/plans/external_plan_id.rbi b/rbi/lib/orb/resources/plans/external_plan_id.rbi index 33f6726f..fca8f1e6 100644 --- a/rbi/lib/orb/resources/plans/external_plan_id.rbi +++ b/rbi/lib/orb/resources/plans/external_plan_id.rbi @@ -11,7 +11,7 @@ module Orb metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::PlanModel) + .returns(Orb::Models::Plan) end def update(other_external_plan_id, external_plan_id: nil, metadata: nil, request_options: {}) end @@ -21,7 +21,7 @@ module Orb external_plan_id: String, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::PlanModel) + .returns(Orb::Models::Plan) end def fetch(external_plan_id, request_options: {}) end diff --git a/rbi/lib/orb/resources/prices.rbi b/rbi/lib/orb/resources/prices.rbi index feeb29a0..dfff22b1 100644 --- a/rbi/lib/orb/resources/prices.rbi +++ b/rbi/lib/orb/resources/prices.rbi @@ -9,43 +9,128 @@ module Orb sig do params( - new_floating_price_model: Orb::Models::NewFloatingPriceModel, + cadence: Symbol, + currency: String, + item_id: String, + model_type: Symbol, + name: String, + unit_config: Orb::Models::PriceCreateParams::UnitConfig, + package_config: Orb::Models::PriceCreateParams::PackageConfig, + matrix_config: Orb::Models::PriceCreateParams::MatrixConfig, + matrix_with_allocation_config: Orb::Models::PriceCreateParams::MatrixWithAllocationConfig, + tiered_config: Orb::Models::PriceCreateParams::TieredConfig, + tiered_bps_config: Orb::Models::PriceCreateParams::TieredBpsConfig, + bps_config: Orb::Models::PriceCreateParams::BpsConfig, + bulk_bps_config: Orb::Models::PriceCreateParams::BulkBpsConfig, + bulk_config: Orb::Models::PriceCreateParams::BulkConfig, + threshold_total_amount_config: T::Hash[Symbol, T.anything], + tiered_package_config: T::Hash[Symbol, T.anything], + grouped_tiered_config: T::Hash[Symbol, T.anything], + max_group_tiered_package_config: T::Hash[Symbol, T.anything], + tiered_with_minimum_config: T::Hash[Symbol, T.anything], + package_with_allocation_config: T::Hash[Symbol, T.anything], + tiered_package_with_minimum_config: T::Hash[Symbol, T.anything], + unit_with_percent_config: T::Hash[Symbol, T.anything], + tiered_with_proration_config: T::Hash[Symbol, T.anything], + unit_with_proration_config: T::Hash[Symbol, T.anything], + grouped_allocation_config: T::Hash[Symbol, T.anything], + grouped_with_prorated_minimum_config: T::Hash[Symbol, T.anything], + grouped_with_metered_minimum_config: T::Hash[Symbol, T.anything], + matrix_with_display_name_config: T::Hash[Symbol, T.anything], + bulk_with_proration_config: T::Hash[Symbol, T.anything], + grouped_tiered_package_config: T::Hash[Symbol, T.anything], + scalable_matrix_with_unit_pricing_config: T::Hash[Symbol, T.anything], + scalable_matrix_with_tiered_pricing_config: T::Hash[Symbol, T.anything], + cumulative_grouped_bulk_config: T::Hash[Symbol, T.anything], + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: T.nilable(Orb::Models::PriceCreateParams::BillingCycleConfiguration), + conversion_rate: T.nilable(Float), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: T.nilable(Orb::Models::PriceCreateParams::InvoicingCycleConfiguration), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) .returns( T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice ) ) end - def create(new_floating_price_model:, request_options: {}) + def create( + cadence:, + currency:, + item_id:, + model_type:, + name:, + unit_config:, + package_config:, + matrix_config:, + matrix_with_allocation_config:, + tiered_config:, + tiered_bps_config:, + bps_config:, + bulk_bps_config:, + bulk_config:, + threshold_total_amount_config:, + tiered_package_config:, + grouped_tiered_config:, + max_group_tiered_package_config:, + tiered_with_minimum_config:, + package_with_allocation_config:, + tiered_package_with_minimum_config:, + unit_with_percent_config:, + tiered_with_proration_config:, + unit_with_proration_config:, + grouped_allocation_config:, + grouped_with_prorated_minimum_config:, + grouped_with_metered_minimum_config:, + matrix_with_display_name_config:, + bulk_with_proration_config:, + grouped_tiered_package_config:, + scalable_matrix_with_unit_pricing_config:, + scalable_matrix_with_tiered_pricing_config:, + cumulative_grouped_bulk_config:, + billable_metric_id: nil, + billed_in_advance: nil, + billing_cycle_configuration: nil, + conversion_rate: nil, + external_price_id: nil, + fixed_price_quantity: nil, + invoice_grouping_key: nil, + invoicing_cycle_configuration: nil, + metadata: nil, + request_options: {} + ) end sig do @@ -56,34 +141,34 @@ module Orb ) .returns( T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice ) ) end @@ -99,34 +184,34 @@ module Orb .returns( Orb::Page[ T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice ) ] ) @@ -166,34 +251,34 @@ module Orb ) .returns( T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice ) ) end diff --git a/rbi/lib/orb/resources/prices/external_price_id.rbi b/rbi/lib/orb/resources/prices/external_price_id.rbi index ba84f563..51c2ebde 100644 --- a/rbi/lib/orb/resources/prices/external_price_id.rbi +++ b/rbi/lib/orb/resources/prices/external_price_id.rbi @@ -12,34 +12,34 @@ module Orb ) .returns( T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice ) ) end @@ -53,34 +53,34 @@ module Orb ) .returns( T.any( - Orb::Models::PriceModel::UnitPrice, - Orb::Models::PriceModel::PackagePrice, - Orb::Models::PriceModel::MatrixPrice, - Orb::Models::PriceModel::TieredPrice, - Orb::Models::PriceModel::TieredBpsPrice, - Orb::Models::PriceModel::BpsPrice, - Orb::Models::PriceModel::BulkBpsPrice, - Orb::Models::PriceModel::BulkPrice, - Orb::Models::PriceModel::ThresholdTotalAmountPrice, - Orb::Models::PriceModel::TieredPackagePrice, - Orb::Models::PriceModel::GroupedTieredPrice, - Orb::Models::PriceModel::TieredWithMinimumPrice, - Orb::Models::PriceModel::TieredPackageWithMinimumPrice, - Orb::Models::PriceModel::PackageWithAllocationPrice, - Orb::Models::PriceModel::UnitWithPercentPrice, - Orb::Models::PriceModel::MatrixWithAllocationPrice, - Orb::Models::PriceModel::TieredWithProrationPrice, - Orb::Models::PriceModel::UnitWithProrationPrice, - Orb::Models::PriceModel::GroupedAllocationPrice, - Orb::Models::PriceModel::GroupedWithProratedMinimumPrice, - Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice, - Orb::Models::PriceModel::MatrixWithDisplayNamePrice, - Orb::Models::PriceModel::BulkWithProrationPrice, - Orb::Models::PriceModel::GroupedTieredPackagePrice, - Orb::Models::PriceModel::MaxGroupTieredPackagePrice, - Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice, - Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice, - Orb::Models::PriceModel::CumulativeGroupedBulkPrice + Orb::Models::Price::UnitPrice, + Orb::Models::Price::PackagePrice, + Orb::Models::Price::MatrixPrice, + Orb::Models::Price::TieredPrice, + Orb::Models::Price::TieredBpsPrice, + Orb::Models::Price::BpsPrice, + Orb::Models::Price::BulkBpsPrice, + Orb::Models::Price::BulkPrice, + Orb::Models::Price::ThresholdTotalAmountPrice, + Orb::Models::Price::TieredPackagePrice, + Orb::Models::Price::GroupedTieredPrice, + Orb::Models::Price::TieredWithMinimumPrice, + Orb::Models::Price::TieredPackageWithMinimumPrice, + Orb::Models::Price::PackageWithAllocationPrice, + Orb::Models::Price::UnitWithPercentPrice, + Orb::Models::Price::MatrixWithAllocationPrice, + Orb::Models::Price::TieredWithProrationPrice, + Orb::Models::Price::UnitWithProrationPrice, + Orb::Models::Price::GroupedAllocationPrice, + Orb::Models::Price::GroupedWithProratedMinimumPrice, + Orb::Models::Price::GroupedWithMeteredMinimumPrice, + Orb::Models::Price::MatrixWithDisplayNamePrice, + Orb::Models::Price::BulkWithProrationPrice, + Orb::Models::Price::GroupedTieredPackagePrice, + Orb::Models::Price::MaxGroupTieredPackagePrice, + Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, + Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, + Orb::Models::Price::CumulativeGroupedBulkPrice ) ) end diff --git a/rbi/lib/orb/resources/subscriptions.rbi b/rbi/lib/orb/resources/subscriptions.rbi index c442b9a4..68018401 100644 --- a/rbi/lib/orb/resources/subscriptions.rbi +++ b/rbi/lib/orb/resources/subscriptions.rbi @@ -10,7 +10,7 @@ module Orb align_billing_with_subscription_start_date: T::Boolean, auto_collection: T.nilable(T::Boolean), aws_region: T.nilable(String), - billing_cycle_anchor_configuration: T.nilable(Orb::Models::BillingCycleAnchorConfigurationModel), + billing_cycle_anchor_configuration: T.nilable(Orb::Models::SubscriptionCreateParams::BillingCycleAnchorConfiguration), coupon_redemption_code: T.nilable(String), credits_overage_rate: T.nilable(Float), customer_id: T.nilable(String), @@ -38,7 +38,7 @@ module Orb usage_customer_ids: T.nilable(T::Array[String]), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::MutatedSubscriptionModel) + .returns(Orb::Models::SubscriptionCreateResponse) end def create( add_adjustments: nil, @@ -86,7 +86,7 @@ module Orb net_terms: T.nilable(Integer), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::SubscriptionModel) + .returns(Orb::Models::Subscription) end def update( subscription_id, @@ -112,7 +112,7 @@ module Orb status: T.nilable(Symbol), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Page[Orb::Models::SubscriptionModel]) + .returns(Orb::Page[Orb::Models::Subscription]) end def list( created_at_gt: nil, @@ -136,7 +136,7 @@ module Orb cancellation_date: T.nilable(Time), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::MutatedSubscriptionModel) + .returns(Orb::Models::SubscriptionCancelResponse) end def cancel( subscription_id, @@ -152,7 +152,7 @@ module Orb subscription_id: String, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::SubscriptionModel) + .returns(Orb::Models::Subscription) end def fetch(subscription_id, request_options: {}) end @@ -251,7 +251,7 @@ module Orb edit_adjustments: T::Array[Orb::Models::SubscriptionPriceIntervalsParams::EditAdjustment], request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::MutatedSubscriptionModel) + .returns(Orb::Models::SubscriptionPriceIntervalsResponse) end def price_intervals( subscription_id, @@ -273,7 +273,7 @@ module Orb align_billing_with_plan_change_date: T.nilable(T::Boolean), auto_collection: T.nilable(T::Boolean), billing_cycle_alignment: T.nilable(Symbol), - billing_cycle_anchor_configuration: T.nilable(Orb::Models::BillingCycleAnchorConfigurationModel), + billing_cycle_anchor_configuration: T.nilable(Orb::Models::SubscriptionSchedulePlanChangeParams::BillingCycleAnchorConfiguration), change_date: T.nilable(Time), coupon_redemption_code: T.nilable(String), credits_overage_rate: T.nilable(Float), @@ -295,7 +295,7 @@ module Orb usage_customer_ids: T.nilable(T::Array[String]), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::MutatedSubscriptionModel) + .returns(Orb::Models::SubscriptionSchedulePlanChangeResponse) end def schedule_plan_change( subscription_id, @@ -336,7 +336,7 @@ module Orb effective_date: T.nilable(Date), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::MutatedSubscriptionModel) + .returns(Orb::Models::SubscriptionTriggerPhaseResponse) end def trigger_phase( subscription_id, @@ -351,7 +351,7 @@ module Orb subscription_id: String, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::MutatedSubscriptionModel) + .returns(Orb::Models::SubscriptionUnscheduleCancellationResponse) end def unschedule_cancellation(subscription_id, request_options: {}) end @@ -362,7 +362,7 @@ module Orb price_id: String, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::MutatedSubscriptionModel) + .returns(Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse) end def unschedule_fixed_fee_quantity_updates(subscription_id, price_id:, request_options: {}) end @@ -372,7 +372,7 @@ module Orb subscription_id: String, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::MutatedSubscriptionModel) + .returns(Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse) end def unschedule_pending_plan_changes(subscription_id, request_options: {}) end @@ -387,7 +387,7 @@ module Orb effective_date: T.nilable(Date), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::MutatedSubscriptionModel) + .returns(Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse) end def update_fixed_fee_quantity( subscription_id, @@ -407,7 +407,7 @@ module Orb shift: T::Boolean, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) - .returns(Orb::Models::MutatedSubscriptionModel) + .returns(Orb::Models::SubscriptionUpdateTrialResponse) end def update_trial(subscription_id, trial_end_date:, shift: nil, request_options: {}) end diff --git a/sig/orb/models/add_subscription_adjustment_params.rbs b/sig/orb/models/add_subscription_adjustment_params.rbs index e28f4360..1628ac7f 100644 --- a/sig/orb/models/add_subscription_adjustment_params.rbs +++ b/sig/orb/models/add_subscription_adjustment_params.rbs @@ -2,14 +2,14 @@ module Orb module Models type add_subscription_adjustment_params = { - adjustment: Orb::Models::new_adjustment_model, + adjustment: Orb::Models::AddSubscriptionAdjustmentParams::adjustment, end_date: Time?, plan_phase_order: Integer?, start_date: Time? } class AddSubscriptionAdjustmentParams < Orb::BaseModel - attr_accessor adjustment: Orb::Models::new_adjustment_model + attr_accessor adjustment: Orb::Models::AddSubscriptionAdjustmentParams::adjustment attr_accessor end_date: Time? @@ -19,7 +19,7 @@ module Orb def initialize: ( - adjustment: Orb::Models::new_adjustment_model, + adjustment: Orb::Models::AddSubscriptionAdjustmentParams::adjustment, end_date: Time?, plan_phase_order: Integer?, start_date: Time? @@ -29,6 +29,191 @@ module Orb ) -> void def to_hash: -> Orb::Models::add_subscription_adjustment_params + + type adjustment = + Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount + | Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount + | Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount + | Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMinimum + | Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMaximum + + class Adjustment < Orb::Union + type new_percentage_discount = + { + adjustment_type: :percentage_discount, + applies_to_price_ids: ::Array[String], + percentage_discount: Float, + is_invoice_level: bool + } + + class NewPercentageDiscount < Orb::BaseModel + attr_accessor adjustment_type: :percentage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor percentage_discount: Float + + attr_reader is_invoice_level: bool? + + def is_invoice_level=: (bool) -> bool + + def initialize: + ( + applies_to_price_ids: ::Array[String], + percentage_discount: Float, + is_invoice_level: bool, + adjustment_type: :percentage_discount + ) -> void + | ( + ?Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::new_percentage_discount + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::new_percentage_discount + end + + type new_usage_discount = + { + adjustment_type: :usage_discount, + applies_to_price_ids: ::Array[String], + usage_discount: Float, + is_invoice_level: bool + } + + class NewUsageDiscount < Orb::BaseModel + attr_accessor adjustment_type: :usage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor usage_discount: Float + + attr_reader is_invoice_level: bool? + + def is_invoice_level=: (bool) -> bool + + def initialize: + ( + applies_to_price_ids: ::Array[String], + usage_discount: Float, + is_invoice_level: bool, + adjustment_type: :usage_discount + ) -> void + | ( + ?Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::new_usage_discount + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::new_usage_discount + end + + type new_amount_discount = + { + adjustment_type: :amount_discount, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool + } + + class NewAmountDiscount < Orb::BaseModel + attr_accessor adjustment_type: :amount_discount + + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_reader is_invoice_level: bool? + + def is_invoice_level=: (bool) -> bool + + def initialize: + ( + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + adjustment_type: :amount_discount + ) -> void + | ( + ?Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::new_amount_discount + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::new_amount_discount + end + + type new_minimum = + { + adjustment_type: :minimum, + applies_to_price_ids: ::Array[String], + item_id: String, + minimum_amount: String, + is_invoice_level: bool + } + + class NewMinimum < Orb::BaseModel + attr_accessor adjustment_type: :minimum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor item_id: String + + attr_accessor minimum_amount: String + + attr_reader is_invoice_level: bool? + + def is_invoice_level=: (bool) -> bool + + def initialize: + ( + applies_to_price_ids: ::Array[String], + item_id: String, + minimum_amount: String, + is_invoice_level: bool, + adjustment_type: :minimum + ) -> void + | ( + ?Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::new_minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::new_minimum + end + + type new_maximum = + { + adjustment_type: :maximum, + applies_to_price_ids: ::Array[String], + maximum_amount: String, + is_invoice_level: bool + } + + class NewMaximum < Orb::BaseModel + attr_accessor adjustment_type: :maximum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + attr_reader is_invoice_level: bool? + + def is_invoice_level=: (bool) -> bool + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String, + is_invoice_level: bool, + adjustment_type: :maximum + ) -> void + | ( + ?Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::new_maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::new_maximum + end + + private def self.variants: -> [[:percentage_discount, Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount], [:usage_discount, Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount], [:amount_discount, Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount], [:minimum, Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMinimum], [:maximum, Orb::Models::AddSubscriptionAdjustmentParams::Adjustment::NewMaximum]] + end end end end diff --git a/sig/orb/models/add_subscription_price_params.rbs b/sig/orb/models/add_subscription_price_params.rbs index a5dae212..d6a2167b 100644 --- a/sig/orb/models/add_subscription_price_params.rbs +++ b/sig/orb/models/add_subscription_price_params.rbs @@ -2,22 +2,22 @@ module Orb module Models type add_subscription_price_params = { - allocation_price: Orb::Models::NewAllocationPriceModel?, - discounts: ::Array[Orb::Models::DiscountOverrideModel]?, + allocation_price: Orb::Models::AddSubscriptionPriceParams::AllocationPrice?, + discounts: ::Array[Orb::Models::AddSubscriptionPriceParams::Discount]?, end_date: Time?, external_price_id: String?, maximum_amount: String?, minimum_amount: String?, plan_phase_order: Integer?, - price: Orb::Models::new_subscription_price_model?, + price: Orb::Models::AddSubscriptionPriceParams::price?, price_id: String?, start_date: Time? } class AddSubscriptionPriceParams < Orb::BaseModel - attr_accessor allocation_price: Orb::Models::NewAllocationPriceModel? + attr_accessor allocation_price: Orb::Models::AddSubscriptionPriceParams::AllocationPrice? - attr_accessor discounts: ::Array[Orb::Models::DiscountOverrideModel]? + attr_accessor discounts: ::Array[Orb::Models::AddSubscriptionPriceParams::Discount]? attr_accessor end_date: Time? @@ -29,7 +29,7 @@ module Orb attr_accessor plan_phase_order: Integer? - attr_accessor price: Orb::Models::new_subscription_price_model? + attr_accessor price: Orb::Models::AddSubscriptionPriceParams::price? attr_accessor price_id: String? @@ -37,14 +37,14 @@ module Orb def initialize: ( - allocation_price: Orb::Models::NewAllocationPriceModel?, - discounts: ::Array[Orb::Models::DiscountOverrideModel]?, + allocation_price: Orb::Models::AddSubscriptionPriceParams::AllocationPrice?, + discounts: ::Array[Orb::Models::AddSubscriptionPriceParams::Discount]?, end_date: Time?, external_price_id: String?, maximum_amount: String?, minimum_amount: String?, plan_phase_order: Integer?, - price: Orb::Models::new_subscription_price_model?, + price: Orb::Models::AddSubscriptionPriceParams::price?, price_id: String?, start_date: Time? ) -> void @@ -53,6 +53,4401 @@ module Orb ) -> void def to_hash: -> Orb::Models::add_subscription_price_params + + type allocation_price = + { + amount: String, + cadence: Orb::Models::AddSubscriptionPriceParams::AllocationPrice::cadence, + currency: String, + expires_at_end_of_cadence: bool + } + + class AllocationPrice < Orb::BaseModel + attr_accessor amount: String + + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::AllocationPrice::cadence + + attr_accessor currency: String + + attr_accessor expires_at_end_of_cadence: bool + + def initialize: + ( + amount: String, + cadence: Orb::Models::AddSubscriptionPriceParams::AllocationPrice::cadence, + currency: String, + expires_at_end_of_cadence: bool + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::allocation_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::allocation_price + + type cadence = + :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom + + class Cadence < Orb::Enum + ONE_TIME: :one_time + MONTHLY: :monthly + QUARTERLY: :quarterly + SEMI_ANNUAL: :semi_annual + ANNUAL: :annual + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::AllocationPrice::cadence] + end + end + + type discount = + { + discount_type: Orb::Models::AddSubscriptionPriceParams::Discount::discount_type, + amount_discount: String?, + percentage_discount: Float?, + usage_discount: Float? + } + + class Discount < Orb::BaseModel + attr_accessor discount_type: Orb::Models::AddSubscriptionPriceParams::Discount::discount_type + + attr_accessor amount_discount: String? + + attr_accessor percentage_discount: Float? + + attr_accessor usage_discount: Float? + + def initialize: + ( + discount_type: Orb::Models::AddSubscriptionPriceParams::Discount::discount_type, + amount_discount: String?, + percentage_discount: Float?, + usage_discount: Float? + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::discount + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::discount + + type discount_type = :percentage | :usage | :amount + + class DiscountType < Orb::Enum + PERCENTAGE: :percentage + USAGE: :usage + AMOUNT: :amount + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Discount::discount_type] + end + end + + type price = + Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice + | Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice + + class Price < Orb::Union + type new_subscription_unit_price = + { + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::cadence, + item_id: String, + model_type: :unit, + name: String, + unit_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionUnitPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :unit + + attr_accessor name: String + + attr_accessor unit_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::UnitConfig + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::cadence, + item_id: String, + name: String, + unit_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_unit_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_unit_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::cadence] + end + + type unit_config = { unit_amount: String } + + class UnitConfig < Orb::BaseModel + attr_accessor unit_amount: String + + def initialize: + (unit_amount: String) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::unit_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::unit_config + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_package_price = + { + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::cadence, + item_id: String, + model_type: :package, + name: String, + package_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::PackageConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionPackagePrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :package + + attr_accessor name: String + + attr_accessor package_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::PackageConfig + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::cadence, + item_id: String, + name: String, + package_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::PackageConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :package + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_package_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_package_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::cadence] + end + + type package_config = + { package_amount: String, package_size: Integer } + + class PackageConfig < Orb::BaseModel + attr_accessor package_amount: String + + attr_accessor package_size: Integer + + def initialize: + (package_amount: String, package_size: Integer) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::package_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::package_config + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_matrix_price = + { + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::cadence, + item_id: String, + matrix_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig, + model_type: :matrix, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionMatrixPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::cadence + + attr_accessor item_id: String + + attr_accessor matrix_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig + + attr_accessor model_type: :matrix + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::cadence, + item_id: String, + matrix_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :matrix + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_matrix_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_matrix_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::cadence] + end + + type matrix_config = + { + default_unit_amount: String, + dimensions: ::Array[String?], + matrix_values: ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig::MatrixValue] + } + + class MatrixConfig < Orb::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor matrix_values: ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig::MatrixValue] + + def initialize: + ( + default_unit_amount: String, + dimensions: ::Array[String?], + matrix_values: ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig::MatrixValue] + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::matrix_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::matrix_config + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: + ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig::matrix_value + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig::matrix_value + end + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_tiered_price = + { + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::cadence, + item_id: String, + model_type: :tiered, + name: String, + tiered_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionTieredPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :tiered + + attr_accessor name: String + + attr_accessor tiered_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::cadence, + item_id: String, + name: String, + tiered_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :tiered + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_tiered_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_tiered_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::cadence] + end + + type tiered_config = + { + tiers: ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig::Tier] + } + + class TieredConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig::Tier] + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::tiered_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::tiered_config + + type tier = + { first_unit: Float, unit_amount: String, last_unit: Float? } + + class Tier < Orb::BaseModel + attr_accessor first_unit: Float + + attr_accessor unit_amount: String + + attr_accessor last_unit: Float? + + def initialize: + ( + first_unit: Float, + unit_amount: String, + last_unit: Float? + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig::tier + end + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_tiered_bps_price = + { + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::cadence, + item_id: String, + model_type: :tiered_bps, + name: String, + tiered_bps_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionTieredBpsPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :tiered_bps + + attr_accessor name: String + + attr_accessor tiered_bps_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::cadence, + item_id: String, + name: String, + tiered_bps_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :tiered_bps + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_tiered_bps_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_tiered_bps_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::cadence] + end + + type tiered_bps_config = + { + tiers: ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig::Tier] + } + + class TieredBpsConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig::Tier] + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::tiered_bps_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::tiered_bps_config + + type tier = + { + bps: Float, + minimum_amount: String, + maximum_amount: String?, + per_unit_maximum: String? + } + + class Tier < Orb::BaseModel + attr_accessor bps: Float + + attr_accessor minimum_amount: String + + attr_accessor maximum_amount: String? + + attr_accessor per_unit_maximum: String? + + def initialize: + ( + bps: Float, + minimum_amount: String, + maximum_amount: String?, + per_unit_maximum: String? + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig::tier + end + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_bps_price = + { + bps_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig, + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::cadence, + item_id: String, + model_type: :bps, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionBpsPrice < Orb::BaseModel + attr_accessor bps_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig + + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :bps + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + bps_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig, + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::cadence, + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :bps + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_bps_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_bps_price + + type bps_config = { bps: Float, per_unit_maximum: String? } + + class BpsConfig < Orb::BaseModel + attr_accessor bps: Float + + attr_accessor per_unit_maximum: String? + + def initialize: + (bps: Float, per_unit_maximum: String?) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::bps_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::bps_config + end + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_bulk_bps_price = + { + bulk_bps_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig, + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::cadence, + item_id: String, + model_type: :bulk_bps, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionBulkBpsPrice < Orb::BaseModel + attr_accessor bulk_bps_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig + + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :bulk_bps + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + bulk_bps_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig, + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::cadence, + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :bulk_bps + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_bulk_bps_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_bulk_bps_price + + type bulk_bps_config = + { + tiers: ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig::Tier] + } + + class BulkBpsConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig::Tier] + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::bulk_bps_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::bulk_bps_config + + type tier = + { bps: Float, maximum_amount: String?, per_unit_maximum: String? } + + class Tier < Orb::BaseModel + attr_accessor bps: Float + + attr_accessor maximum_amount: String? + + attr_accessor per_unit_maximum: String? + + def initialize: + ( + bps: Float, + maximum_amount: String?, + per_unit_maximum: String? + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig::tier + end + end + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_bulk_price = + { + bulk_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig, + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::cadence, + item_id: String, + model_type: :bulk, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionBulkPrice < Orb::BaseModel + attr_accessor bulk_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig + + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :bulk + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + bulk_config: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig, + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::cadence, + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :bulk + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_bulk_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_bulk_price + + type bulk_config = + { + tiers: ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig::Tier] + } + + class BulkConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig::Tier] + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::bulk_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::bulk_config + + type tier = { unit_amount: String, maximum_units: Float? } + + class Tier < Orb::BaseModel + attr_accessor unit_amount: String + + attr_accessor maximum_units: Float? + + def initialize: + (unit_amount: String, maximum_units: Float?) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig::tier + end + end + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_threshold_total_amount_price = + { + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::cadence, + item_id: String, + model_type: :threshold_total_amount, + name: String, + threshold_total_amount_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionThresholdTotalAmountPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :threshold_total_amount + + attr_accessor name: String + + attr_accessor threshold_total_amount_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::cadence, + item_id: String, + name: String, + threshold_total_amount_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :threshold_total_amount + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_threshold_total_amount_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_threshold_total_amount_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_tiered_package_price = + { + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::cadence, + item_id: String, + model_type: :tiered_package, + name: String, + tiered_package_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionTieredPackagePrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :tiered_package + + attr_accessor name: String + + attr_accessor tiered_package_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::cadence, + item_id: String, + name: String, + tiered_package_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :tiered_package + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_tiered_package_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_tiered_package_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_tiered_with_minimum_price = + { + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::cadence, + item_id: String, + model_type: :tiered_with_minimum, + name: String, + tiered_with_minimum_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionTieredWithMinimumPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :tiered_with_minimum + + attr_accessor name: String + + attr_accessor tiered_with_minimum_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::cadence, + item_id: String, + name: String, + tiered_with_minimum_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :tiered_with_minimum + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_tiered_with_minimum_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_tiered_with_minimum_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_unit_with_percent_price = + { + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::cadence, + item_id: String, + model_type: :unit_with_percent, + name: String, + unit_with_percent_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionUnitWithPercentPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :unit_with_percent + + attr_accessor name: String + + attr_accessor unit_with_percent_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::cadence, + item_id: String, + name: String, + unit_with_percent_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :unit_with_percent + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_unit_with_percent_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_unit_with_percent_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_package_with_allocation_price = + { + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::cadence, + item_id: String, + model_type: :package_with_allocation, + name: String, + package_with_allocation_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionPackageWithAllocationPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :package_with_allocation + + attr_accessor name: String + + attr_accessor package_with_allocation_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::cadence, + item_id: String, + name: String, + package_with_allocation_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :package_with_allocation + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_package_with_allocation_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_package_with_allocation_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_tier_with_proration_price = + { + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::cadence, + item_id: String, + model_type: :tiered_with_proration, + name: String, + tiered_with_proration_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionTierWithProrationPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :tiered_with_proration + + attr_accessor name: String + + attr_accessor tiered_with_proration_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::cadence, + item_id: String, + name: String, + tiered_with_proration_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :tiered_with_proration + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_tier_with_proration_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_tier_with_proration_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_unit_with_proration_price = + { + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::cadence, + item_id: String, + model_type: :unit_with_proration, + name: String, + unit_with_proration_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionUnitWithProrationPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :unit_with_proration + + attr_accessor name: String + + attr_accessor unit_with_proration_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::cadence, + item_id: String, + name: String, + unit_with_proration_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :unit_with_proration + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_unit_with_proration_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_unit_with_proration_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_grouped_allocation_price = + { + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::cadence, + grouped_allocation_config: ::Hash[Symbol, top], + item_id: String, + model_type: :grouped_allocation, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionGroupedAllocationPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::cadence + + attr_accessor grouped_allocation_config: ::Hash[Symbol, top] + + attr_accessor item_id: String + + attr_accessor model_type: :grouped_allocation + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::cadence, + grouped_allocation_config: ::Hash[Symbol, top], + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :grouped_allocation + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_grouped_allocation_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_grouped_allocation_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_grouped_with_prorated_minimum_price = + { + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::cadence, + grouped_with_prorated_minimum_config: ::Hash[Symbol, top], + item_id: String, + model_type: :grouped_with_prorated_minimum, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionGroupedWithProratedMinimumPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::cadence + + attr_accessor grouped_with_prorated_minimum_config: ::Hash[Symbol, top] + + attr_accessor item_id: String + + attr_accessor model_type: :grouped_with_prorated_minimum + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::cadence, + grouped_with_prorated_minimum_config: ::Hash[Symbol, top], + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :grouped_with_prorated_minimum + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_grouped_with_prorated_minimum_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_grouped_with_prorated_minimum_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_bulk_with_proration_price = + { + bulk_with_proration_config: ::Hash[Symbol, top], + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::cadence, + item_id: String, + model_type: :bulk_with_proration, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionBulkWithProrationPrice < Orb::BaseModel + attr_accessor bulk_with_proration_config: ::Hash[Symbol, top] + + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :bulk_with_proration + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + bulk_with_proration_config: ::Hash[Symbol, top], + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::cadence, + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :bulk_with_proration + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_bulk_with_proration_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_bulk_with_proration_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_scalable_matrix_with_unit_pricing_price = + { + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::cadence, + item_id: String, + model_type: :scalable_matrix_with_unit_pricing, + name: String, + scalable_matrix_with_unit_pricing_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionScalableMatrixWithUnitPricingPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :scalable_matrix_with_unit_pricing + + attr_accessor name: String + + attr_accessor scalable_matrix_with_unit_pricing_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::cadence, + item_id: String, + name: String, + scalable_matrix_with_unit_pricing_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :scalable_matrix_with_unit_pricing + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_scalable_matrix_with_unit_pricing_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_scalable_matrix_with_unit_pricing_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_scalable_matrix_with_tiered_pricing_price = + { + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::cadence, + item_id: String, + model_type: :scalable_matrix_with_tiered_pricing, + name: String, + scalable_matrix_with_tiered_pricing_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionScalableMatrixWithTieredPricingPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :scalable_matrix_with_tiered_pricing + + attr_accessor name: String + + attr_accessor scalable_matrix_with_tiered_pricing_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::cadence, + item_id: String, + name: String, + scalable_matrix_with_tiered_pricing_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :scalable_matrix_with_tiered_pricing + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_scalable_matrix_with_tiered_pricing_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_scalable_matrix_with_tiered_pricing_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_cumulative_grouped_bulk_price = + { + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::cadence, + cumulative_grouped_bulk_config: ::Hash[Symbol, top], + item_id: String, + model_type: :cumulative_grouped_bulk, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionCumulativeGroupedBulkPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::cadence + + attr_accessor cumulative_grouped_bulk_config: ::Hash[Symbol, top] + + attr_accessor item_id: String + + attr_accessor model_type: :cumulative_grouped_bulk + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::cadence, + cumulative_grouped_bulk_config: ::Hash[Symbol, top], + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :cumulative_grouped_bulk + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_cumulative_grouped_bulk_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_cumulative_grouped_bulk_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_max_group_tiered_package_price = + { + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::cadence, + item_id: String, + max_group_tiered_package_config: ::Hash[Symbol, top], + model_type: :max_group_tiered_package, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionMaxGroupTieredPackagePrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::cadence + + attr_accessor item_id: String + + attr_accessor max_group_tiered_package_config: ::Hash[Symbol, top] + + attr_accessor model_type: :max_group_tiered_package + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::cadence, + item_id: String, + max_group_tiered_package_config: ::Hash[Symbol, top], + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :max_group_tiered_package + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_max_group_tiered_package_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_max_group_tiered_package_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_grouped_with_metered_minimum_price = + { + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::cadence, + grouped_with_metered_minimum_config: ::Hash[Symbol, top], + item_id: String, + model_type: :grouped_with_metered_minimum, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionGroupedWithMeteredMinimumPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::cadence + + attr_accessor grouped_with_metered_minimum_config: ::Hash[Symbol, top] + + attr_accessor item_id: String + + attr_accessor model_type: :grouped_with_metered_minimum + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::cadence, + grouped_with_metered_minimum_config: ::Hash[Symbol, top], + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :grouped_with_metered_minimum + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_grouped_with_metered_minimum_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_grouped_with_metered_minimum_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_matrix_with_display_name_price = + { + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::cadence, + item_id: String, + matrix_with_display_name_config: ::Hash[Symbol, top], + model_type: :matrix_with_display_name, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionMatrixWithDisplayNamePrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::cadence + + attr_accessor item_id: String + + attr_accessor matrix_with_display_name_config: ::Hash[Symbol, top] + + attr_accessor model_type: :matrix_with_display_name + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::cadence, + item_id: String, + matrix_with_display_name_config: ::Hash[Symbol, top], + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :matrix_with_display_name + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_matrix_with_display_name_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_matrix_with_display_name_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_grouped_tiered_package_price = + { + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::cadence, + grouped_tiered_package_config: ::Hash[Symbol, top], + item_id: String, + model_type: :grouped_tiered_package, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionGroupedTieredPackagePrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::cadence + + attr_accessor grouped_tiered_package_config: ::Hash[Symbol, top] + + attr_accessor item_id: String + + attr_accessor model_type: :grouped_tiered_package + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::cadence, + grouped_tiered_package_config: ::Hash[Symbol, top], + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :grouped_tiered_package + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_grouped_tiered_package_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::new_subscription_grouped_tiered_package_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + private def self.variants: -> [[:unit, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitPrice], [:package, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackagePrice], [:matrix, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice], [:tiered, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPrice], [:tiered_bps, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice], [:bps, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBpsPrice], [:bulk_bps, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice], [:bulk, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkPrice], [:threshold_total_amount, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice], [:tiered_package, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice], [:tiered_with_minimum, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice], [:unit_with_percent, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice], [:package_with_allocation, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice], [:tiered_with_proration, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice], [:unit_with_proration, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice], [:grouped_allocation, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice], [:grouped_with_prorated_minimum, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice], [:bulk_with_proration, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice], [:scalable_matrix_with_unit_pricing, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice], [:scalable_matrix_with_tiered_pricing, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice], [:cumulative_grouped_bulk, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice], [:max_group_tiered_package, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice], [:grouped_with_metered_minimum, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice], [:matrix_with_display_name, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice], [:grouped_tiered_package, Orb::Models::AddSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice]] + end end end end diff --git a/sig/orb/models/address_input_model.rbs b/sig/orb/models/address_input_model.rbs deleted file mode 100644 index 04b459a7..00000000 --- a/sig/orb/models/address_input_model.rbs +++ /dev/null @@ -1,40 +0,0 @@ -module Orb - module Models - type address_input_model = - { - city: String?, - country: String?, - :line1 => String?, - :line2 => String?, - postal_code: String?, - state: String? - } - - class AddressInputModel < Orb::BaseModel - attr_accessor city: String? - - attr_accessor country: String? - - attr_accessor line1: String? - - attr_accessor line2: String? - - attr_accessor postal_code: String? - - attr_accessor state: String? - - def initialize: - ( - city: String?, - country: String?, - line1: String?, - line2: String?, - postal_code: String?, - state: String? - ) -> void - | (?Orb::Models::address_input_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::address_input_model - end - end -end diff --git a/sig/orb/models/address_model.rbs b/sig/orb/models/address_model.rbs deleted file mode 100644 index 21c49974..00000000 --- a/sig/orb/models/address_model.rbs +++ /dev/null @@ -1,40 +0,0 @@ -module Orb - module Models - type address_model = - { - city: String?, - country: String?, - :line1 => String?, - :line2 => String?, - postal_code: String?, - state: String? - } - - class AddressModel < Orb::BaseModel - attr_accessor city: String? - - attr_accessor country: String? - - attr_accessor line1: String? - - attr_accessor line2: String? - - attr_accessor postal_code: String? - - attr_accessor state: String? - - def initialize: - ( - city: String?, - country: String?, - line1: String?, - line2: String?, - postal_code: String?, - state: String? - ) -> void - | (?Orb::Models::address_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::address_model - end - end -end diff --git a/sig/orb/models/adjustment_interval_model.rbs b/sig/orb/models/adjustment_interval_model.rbs deleted file mode 100644 index e19e0924..00000000 --- a/sig/orb/models/adjustment_interval_model.rbs +++ /dev/null @@ -1,38 +0,0 @@ -module Orb - module Models - type adjustment_interval_model = - { - id: String, - adjustment: Orb::Models::adjustment_model, - applies_to_price_interval_ids: ::Array[String], - end_date: Time?, - start_date: Time - } - - class AdjustmentIntervalModel < Orb::BaseModel - attr_accessor id: String - - attr_accessor adjustment: Orb::Models::adjustment_model - - attr_accessor applies_to_price_interval_ids: ::Array[String] - - attr_accessor end_date: Time? - - attr_accessor start_date: Time - - def initialize: - ( - id: String, - adjustment: Orb::Models::adjustment_model, - applies_to_price_interval_ids: ::Array[String], - end_date: Time?, - start_date: Time - ) -> void - | ( - ?Orb::Models::adjustment_interval_model | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::adjustment_interval_model - end - end -end diff --git a/sig/orb/models/adjustment_model.rbs b/sig/orb/models/adjustment_model.rbs deleted file mode 100644 index 65723014..00000000 --- a/sig/orb/models/adjustment_model.rbs +++ /dev/null @@ -1,238 +0,0 @@ -module Orb - module Models - type adjustment_model = - Orb::Models::AdjustmentModel::PlanPhaseUsageDiscountAdjustment - | Orb::Models::AdjustmentModel::PlanPhaseAmountDiscountAdjustment - | Orb::Models::AdjustmentModel::PlanPhasePercentageDiscountAdjustment - | Orb::Models::AdjustmentModel::PlanPhaseMinimumAdjustment - | Orb::Models::AdjustmentModel::PlanPhaseMaximumAdjustment - - class AdjustmentModel < Orb::Union - type plan_phase_usage_discount_adjustment = - { - id: String, - adjustment_type: :usage_discount, - applies_to_price_ids: ::Array[String], - is_invoice_level: bool, - plan_phase_order: Integer?, - reason: String?, - usage_discount: Float - } - - class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel - attr_accessor id: String - - attr_accessor adjustment_type: :usage_discount - - attr_accessor applies_to_price_ids: ::Array[String] - - attr_accessor is_invoice_level: bool - - attr_accessor plan_phase_order: Integer? - - attr_accessor reason: String? - - attr_accessor usage_discount: Float - - def initialize: - ( - id: String, - applies_to_price_ids: ::Array[String], - is_invoice_level: bool, - plan_phase_order: Integer?, - reason: String?, - usage_discount: Float, - adjustment_type: :usage_discount - ) -> void - | ( - ?Orb::Models::AdjustmentModel::plan_phase_usage_discount_adjustment - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::AdjustmentModel::plan_phase_usage_discount_adjustment - end - - type plan_phase_amount_discount_adjustment = - { - id: String, - adjustment_type: :amount_discount, - amount_discount: String, - applies_to_price_ids: ::Array[String], - is_invoice_level: bool, - plan_phase_order: Integer?, - reason: String? - } - - class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel - attr_accessor id: String - - attr_accessor adjustment_type: :amount_discount - - attr_accessor amount_discount: String - - attr_accessor applies_to_price_ids: ::Array[String] - - attr_accessor is_invoice_level: bool - - attr_accessor plan_phase_order: Integer? - - attr_accessor reason: String? - - def initialize: - ( - id: String, - amount_discount: String, - applies_to_price_ids: ::Array[String], - is_invoice_level: bool, - plan_phase_order: Integer?, - reason: String?, - adjustment_type: :amount_discount - ) -> void - | ( - ?Orb::Models::AdjustmentModel::plan_phase_amount_discount_adjustment - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::AdjustmentModel::plan_phase_amount_discount_adjustment - end - - type plan_phase_percentage_discount_adjustment = - { - id: String, - adjustment_type: :percentage_discount, - applies_to_price_ids: ::Array[String], - is_invoice_level: bool, - percentage_discount: Float, - plan_phase_order: Integer?, - reason: String? - } - - class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel - attr_accessor id: String - - attr_accessor adjustment_type: :percentage_discount - - attr_accessor applies_to_price_ids: ::Array[String] - - attr_accessor is_invoice_level: bool - - attr_accessor percentage_discount: Float - - attr_accessor plan_phase_order: Integer? - - attr_accessor reason: String? - - def initialize: - ( - id: String, - applies_to_price_ids: ::Array[String], - is_invoice_level: bool, - percentage_discount: Float, - plan_phase_order: Integer?, - reason: String?, - adjustment_type: :percentage_discount - ) -> void - | ( - ?Orb::Models::AdjustmentModel::plan_phase_percentage_discount_adjustment - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::AdjustmentModel::plan_phase_percentage_discount_adjustment - end - - type plan_phase_minimum_adjustment = - { - id: String, - adjustment_type: :minimum, - applies_to_price_ids: ::Array[String], - is_invoice_level: bool, - item_id: String, - minimum_amount: String, - plan_phase_order: Integer?, - reason: String? - } - - class PlanPhaseMinimumAdjustment < Orb::BaseModel - attr_accessor id: String - - attr_accessor adjustment_type: :minimum - - attr_accessor applies_to_price_ids: ::Array[String] - - attr_accessor is_invoice_level: bool - - attr_accessor item_id: String - - attr_accessor minimum_amount: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor reason: String? - - def initialize: - ( - id: String, - applies_to_price_ids: ::Array[String], - is_invoice_level: bool, - item_id: String, - minimum_amount: String, - plan_phase_order: Integer?, - reason: String?, - adjustment_type: :minimum - ) -> void - | ( - ?Orb::Models::AdjustmentModel::plan_phase_minimum_adjustment - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::AdjustmentModel::plan_phase_minimum_adjustment - end - - type plan_phase_maximum_adjustment = - { - id: String, - adjustment_type: :maximum, - applies_to_price_ids: ::Array[String], - is_invoice_level: bool, - maximum_amount: String, - plan_phase_order: Integer?, - reason: String? - } - - class PlanPhaseMaximumAdjustment < Orb::BaseModel - attr_accessor id: String - - attr_accessor adjustment_type: :maximum - - attr_accessor applies_to_price_ids: ::Array[String] - - attr_accessor is_invoice_level: bool - - attr_accessor maximum_amount: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor reason: String? - - def initialize: - ( - id: String, - applies_to_price_ids: ::Array[String], - is_invoice_level: bool, - maximum_amount: String, - plan_phase_order: Integer?, - reason: String?, - adjustment_type: :maximum - ) -> void - | ( - ?Orb::Models::AdjustmentModel::plan_phase_maximum_adjustment - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::AdjustmentModel::plan_phase_maximum_adjustment - end - - private def self.variants: -> [[:usage_discount, Orb::Models::AdjustmentModel::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::AdjustmentModel::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::AdjustmentModel::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::AdjustmentModel::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::AdjustmentModel::PlanPhaseMaximumAdjustment]] - end - end -end diff --git a/sig/orb/models/affected_block_model.rbs b/sig/orb/models/affected_block_model.rbs deleted file mode 100644 index 0a5478a5..00000000 --- a/sig/orb/models/affected_block_model.rbs +++ /dev/null @@ -1,20 +0,0 @@ -module Orb - module Models - type affected_block_model = - { id: String, expiry_date: Time?, per_unit_cost_basis: String? } - - class AffectedBlockModel < Orb::BaseModel - attr_accessor id: String - - attr_accessor expiry_date: Time? - - attr_accessor per_unit_cost_basis: String? - - def initialize: - (id: String, expiry_date: Time?, per_unit_cost_basis: String?) -> void - | (?Orb::Models::affected_block_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::affected_block_model - end - end -end diff --git a/sig/orb/models/aggregated_cost_model.rbs b/sig/orb/models/aggregated_cost_model.rbs deleted file mode 100644 index 3f3b0c92..00000000 --- a/sig/orb/models/aggregated_cost_model.rbs +++ /dev/null @@ -1,72 +0,0 @@ -module Orb - module Models - type aggregated_cost_model = - { - per_price_costs: ::Array[Orb::Models::AggregatedCostModel::PerPriceCost], - subtotal: String, - timeframe_end: Time, - timeframe_start: Time, - total: String - } - - class AggregatedCostModel < Orb::BaseModel - attr_accessor per_price_costs: ::Array[Orb::Models::AggregatedCostModel::PerPriceCost] - - attr_accessor subtotal: String - - attr_accessor timeframe_end: Time - - attr_accessor timeframe_start: Time - - attr_accessor total: String - - def initialize: - ( - per_price_costs: ::Array[Orb::Models::AggregatedCostModel::PerPriceCost], - subtotal: String, - timeframe_end: Time, - timeframe_start: Time, - total: String - ) -> void - | (?Orb::Models::aggregated_cost_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::aggregated_cost_model - - type per_price_cost = - { - price: Orb::Models::price_model, - price_id: String, - subtotal: String, - total: String, - quantity: Float? - } - - class PerPriceCost < Orb::BaseModel - attr_accessor price: Orb::Models::price_model - - attr_accessor price_id: String - - attr_accessor subtotal: String - - attr_accessor total: String - - attr_accessor quantity: Float? - - def initialize: - ( - price: Orb::Models::price_model, - price_id: String, - subtotal: String, - total: String, - quantity: Float? - ) -> void - | ( - ?Orb::Models::AggregatedCostModel::per_price_cost - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::AggregatedCostModel::per_price_cost - end - end - end -end diff --git a/sig/orb/models/alert.rbs b/sig/orb/models/alert.rbs index 4863d4fa..b92bc8da 100644 --- a/sig/orb/models/alert.rbs +++ b/sig/orb/models/alert.rbs @@ -5,12 +5,12 @@ module Orb id: String, created_at: Time, currency: String?, - customer: Orb::Models::CustomerMinifiedModel?, + customer: Orb::Models::Alert::Customer?, enabled: bool, metric: Orb::Models::Alert::Metric?, plan: Orb::Models::Alert::Plan?, - subscription: Orb::Models::SubscriptionMinifiedModel?, - thresholds: ::Array[Orb::Models::ThresholdModel]?, + subscription: Orb::Models::Alert::Subscription?, + thresholds: ::Array[Orb::Models::Alert::Threshold]?, type: Orb::Models::Alert::type_ } @@ -21,7 +21,7 @@ module Orb attr_accessor currency: String? - attr_accessor customer: Orb::Models::CustomerMinifiedModel? + attr_accessor customer: Orb::Models::Alert::Customer? attr_accessor enabled: bool @@ -29,9 +29,9 @@ module Orb attr_accessor plan: Orb::Models::Alert::Plan? - attr_accessor subscription: Orb::Models::SubscriptionMinifiedModel? + attr_accessor subscription: Orb::Models::Alert::Subscription? - attr_accessor thresholds: ::Array[Orb::Models::ThresholdModel]? + attr_accessor thresholds: ::Array[Orb::Models::Alert::Threshold]? attr_accessor type: Orb::Models::Alert::type_ @@ -40,18 +40,32 @@ module Orb id: String, created_at: Time, currency: String?, - customer: Orb::Models::CustomerMinifiedModel?, + customer: Orb::Models::Alert::Customer?, enabled: bool, metric: Orb::Models::Alert::Metric?, plan: Orb::Models::Alert::Plan?, - subscription: Orb::Models::SubscriptionMinifiedModel?, - thresholds: ::Array[Orb::Models::ThresholdModel]?, + subscription: Orb::Models::Alert::Subscription?, + thresholds: ::Array[Orb::Models::Alert::Threshold]?, type: Orb::Models::Alert::type_ ) -> void | (?Orb::Models::alert | Orb::BaseModel data) -> void def to_hash: -> Orb::Models::alert + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | (?Orb::Models::Alert::customer | Orb::BaseModel data) -> void + + def to_hash: -> Orb::Models::Alert::customer + end + type metric = { id: String } class Metric < Orb::BaseModel @@ -93,6 +107,30 @@ module Orb def to_hash: -> Orb::Models::Alert::plan end + type subscription = { id: String } + + class Subscription < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | (?Orb::Models::Alert::subscription | Orb::BaseModel data) -> void + + def to_hash: -> Orb::Models::Alert::subscription + end + + type threshold = { value: Float } + + class Threshold < Orb::BaseModel + attr_accessor value: Float + + def initialize: + (value: Float) -> void + | (?Orb::Models::Alert::threshold | Orb::BaseModel data) -> void + + def to_hash: -> Orb::Models::Alert::threshold + end + type type_ = :usage_exceeded | :cost_exceeded diff --git a/sig/orb/models/alert_create_for_subscription_params.rbs b/sig/orb/models/alert_create_for_subscription_params.rbs index eda813fd..230cf86c 100644 --- a/sig/orb/models/alert_create_for_subscription_params.rbs +++ b/sig/orb/models/alert_create_for_subscription_params.rbs @@ -2,7 +2,7 @@ module Orb module Models type alert_create_for_subscription_params = { - thresholds: ::Array[Orb::Models::ThresholdModel], + thresholds: ::Array[Orb::Models::AlertCreateForSubscriptionParams::Threshold], type: Orb::Models::AlertCreateForSubscriptionParams::type_, metric_id: String? } @@ -12,7 +12,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters - attr_accessor thresholds: ::Array[Orb::Models::ThresholdModel] + attr_accessor thresholds: ::Array[Orb::Models::AlertCreateForSubscriptionParams::Threshold] attr_accessor type: Orb::Models::AlertCreateForSubscriptionParams::type_ @@ -20,7 +20,7 @@ module Orb def initialize: ( - thresholds: ::Array[Orb::Models::ThresholdModel], + thresholds: ::Array[Orb::Models::AlertCreateForSubscriptionParams::Threshold], type: Orb::Models::AlertCreateForSubscriptionParams::type_, metric_id: String?, request_options: Orb::request_opts @@ -32,6 +32,21 @@ module Orb def to_hash: -> Orb::Models::alert_create_for_subscription_params + type threshold = { value: Float } + + class Threshold < Orb::BaseModel + attr_accessor value: Float + + def initialize: + (value: Float) -> void + | ( + ?Orb::Models::AlertCreateForSubscriptionParams::threshold + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AlertCreateForSubscriptionParams::threshold + end + type type_ = :usage_exceeded | :cost_exceeded diff --git a/sig/orb/models/alert_model.rbs b/sig/orb/models/alert_model.rbs deleted file mode 100644 index 0a2bea40..00000000 --- a/sig/orb/models/alert_model.rbs +++ /dev/null @@ -1,114 +0,0 @@ -module Orb - module Models - type alert_model = - { - id: String, - created_at: Time, - currency: String?, - customer: Orb::Models::CustomerMinifiedModel?, - enabled: bool, - metric: Orb::Models::AlertModel::Metric?, - plan: Orb::Models::AlertModel::Plan?, - subscription: Orb::Models::SubscriptionMinifiedModel?, - thresholds: ::Array[Orb::Models::ThresholdModel]?, - type: Orb::Models::AlertModel::type_ - } - - class AlertModel < Orb::BaseModel - attr_accessor id: String - - attr_accessor created_at: Time - - attr_accessor currency: String? - - attr_accessor customer: Orb::Models::CustomerMinifiedModel? - - attr_accessor enabled: bool - - attr_accessor metric: Orb::Models::AlertModel::Metric? - - attr_accessor plan: Orb::Models::AlertModel::Plan? - - attr_accessor subscription: Orb::Models::SubscriptionMinifiedModel? - - attr_accessor thresholds: ::Array[Orb::Models::ThresholdModel]? - - attr_accessor type: Orb::Models::AlertModel::type_ - - def initialize: - ( - id: String, - created_at: Time, - currency: String?, - customer: Orb::Models::CustomerMinifiedModel?, - enabled: bool, - metric: Orb::Models::AlertModel::Metric?, - plan: Orb::Models::AlertModel::Plan?, - subscription: Orb::Models::SubscriptionMinifiedModel?, - thresholds: ::Array[Orb::Models::ThresholdModel]?, - type: Orb::Models::AlertModel::type_ - ) -> void - | (?Orb::Models::alert_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::alert_model - - type metric = { id: String } - - class Metric < Orb::BaseModel - attr_accessor id: String - - def initialize: - (id: String) -> void - | (?Orb::Models::AlertModel::metric | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::AlertModel::metric - end - - type plan = - { - id: String?, - external_plan_id: String?, - name: String?, - plan_version: String - } - - class Plan < Orb::BaseModel - attr_accessor id: String? - - attr_accessor external_plan_id: String? - - attr_accessor name: String? - - attr_accessor plan_version: String - - def initialize: - ( - id: String?, - external_plan_id: String?, - name: String?, - plan_version: String - ) -> void - | (?Orb::Models::AlertModel::plan | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::AlertModel::plan - end - - type type_ = - :usage_exceeded - | :cost_exceeded - | :credit_balance_depleted - | :credit_balance_dropped - | :credit_balance_recovered - - class Type < Orb::Enum - USAGE_EXCEEDED: :usage_exceeded - COST_EXCEEDED: :cost_exceeded - CREDIT_BALANCE_DEPLETED: :credit_balance_depleted - CREDIT_BALANCE_DROPPED: :credit_balance_dropped - CREDIT_BALANCE_RECOVERED: :credit_balance_recovered - - def self.values: -> ::Array[Orb::Models::AlertModel::type_] - end - end - end -end diff --git a/sig/orb/models/alert_update_params.rbs b/sig/orb/models/alert_update_params.rbs index 8a669908..04905921 100644 --- a/sig/orb/models/alert_update_params.rbs +++ b/sig/orb/models/alert_update_params.rbs @@ -1,23 +1,37 @@ module Orb module Models type alert_update_params = - { thresholds: ::Array[Orb::Models::ThresholdModel] } + { thresholds: ::Array[Orb::Models::AlertUpdateParams::Threshold] } & Orb::request_parameters class AlertUpdateParams < Orb::BaseModel extend Orb::RequestParameters::Converter include Orb::RequestParameters - attr_accessor thresholds: ::Array[Orb::Models::ThresholdModel] + attr_accessor thresholds: ::Array[Orb::Models::AlertUpdateParams::Threshold] def initialize: ( - thresholds: ::Array[Orb::Models::ThresholdModel], + thresholds: ::Array[Orb::Models::AlertUpdateParams::Threshold], request_options: Orb::request_opts ) -> void | (?Orb::Models::alert_update_params | Orb::BaseModel data) -> void def to_hash: -> Orb::Models::alert_update_params + + type threshold = { value: Float } + + class Threshold < Orb::BaseModel + attr_accessor value: Float + + def initialize: + (value: Float) -> void + | ( + ?Orb::Models::AlertUpdateParams::threshold | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::AlertUpdateParams::threshold + end end end end diff --git a/sig/orb/models/allocation_model.rbs b/sig/orb/models/allocation_model.rbs deleted file mode 100644 index 8d1c8370..00000000 --- a/sig/orb/models/allocation_model.rbs +++ /dev/null @@ -1,17 +0,0 @@ -module Orb - module Models - type allocation_model = { allows_rollover: bool, currency: String } - - class AllocationModel < Orb::BaseModel - attr_accessor allows_rollover: bool - - attr_accessor currency: String - - def initialize: - (allows_rollover: bool, currency: String) -> void - | (?Orb::Models::allocation_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::allocation_model - end - end -end diff --git a/sig/orb/models/amount_discount_interval_model.rbs b/sig/orb/models/amount_discount_interval_model.rbs deleted file mode 100644 index 68062711..00000000 --- a/sig/orb/models/amount_discount_interval_model.rbs +++ /dev/null @@ -1,50 +0,0 @@ -module Orb - module Models - type amount_discount_interval_model = - { - amount_discount: String, - applies_to_price_ids: ::Array[String], - applies_to_price_interval_ids: ::Array[String], - discount_type: Orb::Models::AmountDiscountIntervalModel::discount_type, - end_date: Time?, - start_date: Time - } - - class AmountDiscountIntervalModel < Orb::BaseModel - attr_accessor amount_discount: String - - attr_accessor applies_to_price_ids: ::Array[String] - - attr_accessor applies_to_price_interval_ids: ::Array[String] - - attr_accessor discount_type: Orb::Models::AmountDiscountIntervalModel::discount_type - - attr_accessor end_date: Time? - - attr_accessor start_date: Time - - def initialize: - ( - amount_discount: String, - applies_to_price_ids: ::Array[String], - applies_to_price_interval_ids: ::Array[String], - discount_type: Orb::Models::AmountDiscountIntervalModel::discount_type, - end_date: Time?, - start_date: Time - ) -> void - | ( - ?Orb::Models::amount_discount_interval_model | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::amount_discount_interval_model - - type discount_type = :amount - - class DiscountType < Orb::Enum - AMOUNT: :amount - - def self.values: -> ::Array[Orb::Models::AmountDiscountIntervalModel::discount_type] - end - end - end -end diff --git a/sig/orb/models/amount_discount_model.rbs b/sig/orb/models/amount_discount_model.rbs deleted file mode 100644 index d2a06ea7..00000000 --- a/sig/orb/models/amount_discount_model.rbs +++ /dev/null @@ -1,40 +0,0 @@ -module Orb - module Models - type amount_discount_model = - { - amount_discount: String, - applies_to_price_ids: ::Array[String], - discount_type: Orb::Models::AmountDiscountModel::discount_type, - reason: String? - } - - class AmountDiscountModel < Orb::BaseModel - attr_accessor amount_discount: String - - attr_accessor applies_to_price_ids: ::Array[String] - - attr_accessor discount_type: Orb::Models::AmountDiscountModel::discount_type - - attr_accessor reason: String? - - def initialize: - ( - amount_discount: String, - applies_to_price_ids: ::Array[String], - discount_type: Orb::Models::AmountDiscountModel::discount_type, - reason: String? - ) -> void - | (?Orb::Models::amount_discount_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::amount_discount_model - - type discount_type = :amount - - class DiscountType < Orb::Enum - AMOUNT: :amount - - def self.values: -> ::Array[Orb::Models::AmountDiscountModel::discount_type] - end - end - end -end diff --git a/sig/orb/models/auto_collection_model.rbs b/sig/orb/models/auto_collection_model.rbs deleted file mode 100644 index 36a21048..00000000 --- a/sig/orb/models/auto_collection_model.rbs +++ /dev/null @@ -1,32 +0,0 @@ -module Orb - module Models - type auto_collection_model = - { - enabled: bool?, - next_attempt_at: Time?, - num_attempts: Integer?, - previously_attempted_at: Time? - } - - class AutoCollectionModel < Orb::BaseModel - attr_accessor enabled: bool? - - attr_accessor next_attempt_at: Time? - - attr_accessor num_attempts: Integer? - - attr_accessor previously_attempted_at: Time? - - def initialize: - ( - enabled: bool?, - next_attempt_at: Time?, - num_attempts: Integer?, - previously_attempted_at: Time? - ) -> void - | (?Orb::Models::auto_collection_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::auto_collection_model - end - end -end diff --git a/sig/orb/models/backfill_model.rbs b/sig/orb/models/backfill_model.rbs deleted file mode 100644 index b34331ac..00000000 --- a/sig/orb/models/backfill_model.rbs +++ /dev/null @@ -1,71 +0,0 @@ -module Orb - module Models - type backfill_model = - { - id: String, - close_time: Time?, - created_at: Time, - customer_id: String?, - events_ingested: Integer, - replace_existing_events: bool, - reverted_at: Time?, - status: Orb::Models::BackfillModel::status, - timeframe_end: Time, - timeframe_start: Time, - deprecation_filter: String? - } - - class BackfillModel < Orb::BaseModel - attr_accessor id: String - - attr_accessor close_time: Time? - - attr_accessor created_at: Time - - attr_accessor customer_id: String? - - attr_accessor events_ingested: Integer - - attr_accessor replace_existing_events: bool - - attr_accessor reverted_at: Time? - - attr_accessor status: Orb::Models::BackfillModel::status - - attr_accessor timeframe_end: Time - - attr_accessor timeframe_start: Time - - attr_accessor deprecation_filter: String? - - def initialize: - ( - id: String, - close_time: Time?, - created_at: Time, - customer_id: String?, - events_ingested: Integer, - replace_existing_events: bool, - reverted_at: Time?, - status: Orb::Models::BackfillModel::status, - timeframe_end: Time, - timeframe_start: Time, - deprecation_filter: String? - ) -> void - | (?Orb::Models::backfill_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::backfill_model - - type status = :pending | :reflected | :pending_revert | :reverted - - class Status < Orb::Enum - PENDING: :pending - REFLECTED: :reflected - PENDING_REVERT: :pending_revert - REVERTED: :reverted - - def self.values: -> ::Array[Orb::Models::BackfillModel::status] - end - end - end -end diff --git a/sig/orb/models/billable_metric.rbs b/sig/orb/models/billable_metric.rbs index 63774bfd..61d1c789 100644 --- a/sig/orb/models/billable_metric.rbs +++ b/sig/orb/models/billable_metric.rbs @@ -4,7 +4,7 @@ module Orb { id: String, description: String?, - item: Orb::Models::ItemModel, + item: Orb::Models::Item, metadata: ::Hash[Symbol, String], name: String, status: Orb::Models::BillableMetric::status @@ -15,7 +15,7 @@ module Orb attr_accessor description: String? - attr_accessor item: Orb::Models::ItemModel + attr_accessor item: Orb::Models::Item attr_accessor metadata: ::Hash[Symbol, String] @@ -27,7 +27,7 @@ module Orb ( id: String, description: String?, - item: Orb::Models::ItemModel, + item: Orb::Models::Item, metadata: ::Hash[Symbol, String], name: String, status: Orb::Models::BillableMetric::status diff --git a/sig/orb/models/billable_metric_model.rbs b/sig/orb/models/billable_metric_model.rbs deleted file mode 100644 index 8d600fc8..00000000 --- a/sig/orb/models/billable_metric_model.rbs +++ /dev/null @@ -1,50 +0,0 @@ -module Orb - module Models - type billable_metric_model = - { - id: String, - description: String?, - item: Orb::Models::ItemModel, - metadata: ::Hash[Symbol, String], - name: String, - status: Orb::Models::BillableMetricModel::status - } - - class BillableMetricModel < Orb::BaseModel - attr_accessor id: String - - attr_accessor description: String? - - attr_accessor item: Orb::Models::ItemModel - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor name: String - - attr_accessor status: Orb::Models::BillableMetricModel::status - - def initialize: - ( - id: String, - description: String?, - item: Orb::Models::ItemModel, - metadata: ::Hash[Symbol, String], - name: String, - status: Orb::Models::BillableMetricModel::status - ) -> void - | (?Orb::Models::billable_metric_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::billable_metric_model - - type status = :active | :draft | :archived - - class Status < Orb::Enum - ACTIVE: :active - DRAFT: :draft - ARCHIVED: :archived - - def self.values: -> ::Array[Orb::Models::BillableMetricModel::status] - end - end - end -end diff --git a/sig/orb/models/billable_metric_simple_model.rbs b/sig/orb/models/billable_metric_simple_model.rbs deleted file mode 100644 index 5dada459..00000000 --- a/sig/orb/models/billable_metric_simple_model.rbs +++ /dev/null @@ -1,19 +0,0 @@ -module Orb - module Models - type billable_metric_simple_model = { id: String, name: String } - - class BillableMetricSimpleModel < Orb::BaseModel - attr_accessor id: String - - attr_accessor name: String - - def initialize: - (id: String, name: String) -> void - | ( - ?Orb::Models::billable_metric_simple_model | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::billable_metric_simple_model - end - end -end diff --git a/sig/orb/models/billable_metric_tiny_model.rbs b/sig/orb/models/billable_metric_tiny_model.rbs deleted file mode 100644 index 5e16cee7..00000000 --- a/sig/orb/models/billable_metric_tiny_model.rbs +++ /dev/null @@ -1,17 +0,0 @@ -module Orb - module Models - type billable_metric_tiny_model = { id: String } - - class BillableMetricTinyModel < Orb::BaseModel - attr_accessor id: String - - def initialize: - (id: String) -> void - | ( - ?Orb::Models::billable_metric_tiny_model | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::billable_metric_tiny_model - end - end -end diff --git a/sig/orb/models/billing_cycle_anchor_configuration_model.rbs b/sig/orb/models/billing_cycle_anchor_configuration_model.rbs deleted file mode 100644 index c83f6e64..00000000 --- a/sig/orb/models/billing_cycle_anchor_configuration_model.rbs +++ /dev/null @@ -1,23 +0,0 @@ -module Orb - module Models - type billing_cycle_anchor_configuration_model = - { day: Integer, month: Integer?, year: Integer? } - - class BillingCycleAnchorConfigurationModel < Orb::BaseModel - attr_accessor day: Integer - - attr_accessor month: Integer? - - attr_accessor year: Integer? - - def initialize: - (day: Integer, month: Integer?, year: Integer?) -> void - | ( - ?Orb::Models::billing_cycle_anchor_configuration_model - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::billing_cycle_anchor_configuration_model - end - end -end diff --git a/sig/orb/models/billing_cycle_configuration_model.rbs b/sig/orb/models/billing_cycle_configuration_model.rbs deleted file mode 100644 index b53c6144..00000000 --- a/sig/orb/models/billing_cycle_configuration_model.rbs +++ /dev/null @@ -1,35 +0,0 @@ -module Orb - module Models - type billing_cycle_configuration_model = - { - duration: Integer, - duration_unit: Orb::Models::BillingCycleConfigurationModel::duration_unit - } - - class BillingCycleConfigurationModel < Orb::BaseModel - attr_accessor duration: Integer - - attr_accessor duration_unit: Orb::Models::BillingCycleConfigurationModel::duration_unit - - def initialize: - ( - duration: Integer, - duration_unit: Orb::Models::BillingCycleConfigurationModel::duration_unit - ) -> void - | ( - ?Orb::Models::billing_cycle_configuration_model | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::billing_cycle_configuration_model - - type duration_unit = :day | :month - - class DurationUnit < Orb::Enum - DAY: :day - MONTH: :month - - def self.values: -> ::Array[Orb::Models::BillingCycleConfigurationModel::duration_unit] - end - end - end -end diff --git a/sig/orb/models/bps_config_model.rbs b/sig/orb/models/bps_config_model.rbs deleted file mode 100644 index 3de13e52..00000000 --- a/sig/orb/models/bps_config_model.rbs +++ /dev/null @@ -1,17 +0,0 @@ -module Orb - module Models - type bps_config_model = { bps: Float, per_unit_maximum: String? } - - class BpsConfigModel < Orb::BaseModel - attr_accessor bps: Float - - attr_accessor per_unit_maximum: String? - - def initialize: - (bps: Float, per_unit_maximum: String?) -> void - | (?Orb::Models::bps_config_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::bps_config_model - end - end -end diff --git a/sig/orb/models/bulk_bps_config_model.rbs b/sig/orb/models/bulk_bps_config_model.rbs deleted file mode 100644 index a5f75e56..00000000 --- a/sig/orb/models/bulk_bps_config_model.rbs +++ /dev/null @@ -1,39 +0,0 @@ -module Orb - module Models - type bulk_bps_config_model = - { tiers: ::Array[Orb::Models::BulkBpsConfigModel::Tier] } - - class BulkBpsConfigModel < Orb::BaseModel - attr_accessor tiers: ::Array[Orb::Models::BulkBpsConfigModel::Tier] - - def initialize: - (tiers: ::Array[Orb::Models::BulkBpsConfigModel::Tier]) -> void - | (?Orb::Models::bulk_bps_config_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::bulk_bps_config_model - - type tier = - { bps: Float, maximum_amount: String?, per_unit_maximum: String? } - - class Tier < Orb::BaseModel - attr_accessor bps: Float - - attr_accessor maximum_amount: String? - - attr_accessor per_unit_maximum: String? - - def initialize: - ( - bps: Float, - maximum_amount: String?, - per_unit_maximum: String? - ) -> void - | ( - ?Orb::Models::BulkBpsConfigModel::tier | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::BulkBpsConfigModel::tier - end - end - end -end diff --git a/sig/orb/models/bulk_config_model.rbs b/sig/orb/models/bulk_config_model.rbs deleted file mode 100644 index 1410479d..00000000 --- a/sig/orb/models/bulk_config_model.rbs +++ /dev/null @@ -1,30 +0,0 @@ -module Orb - module Models - type bulk_config_model = - { tiers: ::Array[Orb::Models::BulkConfigModel::Tier] } - - class BulkConfigModel < Orb::BaseModel - attr_accessor tiers: ::Array[Orb::Models::BulkConfigModel::Tier] - - def initialize: - (tiers: ::Array[Orb::Models::BulkConfigModel::Tier]) -> void - | (?Orb::Models::bulk_config_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::bulk_config_model - - type tier = { unit_amount: String, maximum_units: Float? } - - class Tier < Orb::BaseModel - attr_accessor unit_amount: String - - attr_accessor maximum_units: Float? - - def initialize: - (unit_amount: String, maximum_units: Float?) -> void - | (?Orb::Models::BulkConfigModel::tier | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::BulkConfigModel::tier - end - end - end -end diff --git a/sig/orb/models/coupon_model.rbs b/sig/orb/models/coupon_model.rbs deleted file mode 100644 index 4ce9d097..00000000 --- a/sig/orb/models/coupon_model.rbs +++ /dev/null @@ -1,51 +0,0 @@ -module Orb - module Models - type coupon_model = - { - id: String, - archived_at: Time?, - discount: Orb::Models::CouponModel::discount, - duration_in_months: Integer?, - max_redemptions: Integer?, - redemption_code: String, - times_redeemed: Integer - } - - class CouponModel < Orb::BaseModel - attr_accessor id: String - - attr_accessor archived_at: Time? - - attr_accessor discount: Orb::Models::CouponModel::discount - - attr_accessor duration_in_months: Integer? - - attr_accessor max_redemptions: Integer? - - attr_accessor redemption_code: String - - attr_accessor times_redeemed: Integer - - def initialize: - ( - id: String, - archived_at: Time?, - discount: Orb::Models::CouponModel::discount, - duration_in_months: Integer?, - max_redemptions: Integer?, - redemption_code: String, - times_redeemed: Integer - ) -> void - | (?Orb::Models::coupon_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::coupon_model - - type discount = - Orb::Models::PercentageDiscount | Orb::Models::AmountDiscount - - class Discount < Orb::Union - private def self.variants: -> [[:percentage, Orb::Models::PercentageDiscount], [:amount, Orb::Models::AmountDiscount]] - end - end - end -end diff --git a/sig/orb/models/coupon_redemption_model.rbs b/sig/orb/models/coupon_redemption_model.rbs deleted file mode 100644 index 96a0bf66..00000000 --- a/sig/orb/models/coupon_redemption_model.rbs +++ /dev/null @@ -1,20 +0,0 @@ -module Orb - module Models - type coupon_redemption_model = - { coupon_id: String, end_date: Time?, start_date: Time } - - class CouponRedemptionModel < Orb::BaseModel - attr_accessor coupon_id: String - - attr_accessor end_date: Time? - - attr_accessor start_date: Time - - def initialize: - (coupon_id: String, end_date: Time?, start_date: Time) -> void - | (?Orb::Models::coupon_redemption_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::coupon_redemption_model - end - end -end diff --git a/sig/orb/models/create_customer_alert_request.rbs b/sig/orb/models/create_customer_alert_request.rbs index a04bf441..607bba8f 100644 --- a/sig/orb/models/create_customer_alert_request.rbs +++ b/sig/orb/models/create_customer_alert_request.rbs @@ -4,7 +4,7 @@ module Orb { currency: String, type: Orb::Models::CreateCustomerAlertRequest::type_, - thresholds: ::Array[Orb::Models::ThresholdModel]? + thresholds: ::Array[Orb::Models::CreateCustomerAlertRequest::Threshold]? } class CreateCustomerAlertRequest < Orb::BaseModel @@ -12,13 +12,13 @@ module Orb attr_accessor type: Orb::Models::CreateCustomerAlertRequest::type_ - attr_accessor thresholds: ::Array[Orb::Models::ThresholdModel]? + attr_accessor thresholds: ::Array[Orb::Models::CreateCustomerAlertRequest::Threshold]? def initialize: ( currency: String, type: Orb::Models::CreateCustomerAlertRequest::type_, - thresholds: ::Array[Orb::Models::ThresholdModel]? + thresholds: ::Array[Orb::Models::CreateCustomerAlertRequest::Threshold]? ) -> void | ( ?Orb::Models::create_customer_alert_request | Orb::BaseModel data @@ -42,6 +42,21 @@ module Orb def self.values: -> ::Array[Orb::Models::CreateCustomerAlertRequest::type_] end + + type threshold = { value: Float } + + class Threshold < Orb::BaseModel + attr_accessor value: Float + + def initialize: + (value: Float) -> void + | ( + ?Orb::Models::CreateCustomerAlertRequest::threshold + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CreateCustomerAlertRequest::threshold + end end end end diff --git a/sig/orb/models/credit_ledger_entries_model.rbs b/sig/orb/models/credit_ledger_entries_model.rbs deleted file mode 100644 index 0fbd4d84..00000000 --- a/sig/orb/models/credit_ledger_entries_model.rbs +++ /dev/null @@ -1,26 +0,0 @@ -module Orb - module Models - type credit_ledger_entries_model = - { - data: ::Array[Orb::Models::credit_ledger_entry_model], - pagination_metadata: Orb::Models::PaginationMetadata - } - - class CreditLedgerEntriesModel < Orb::BaseModel - attr_accessor data: ::Array[Orb::Models::credit_ledger_entry_model] - - attr_accessor pagination_metadata: Orb::Models::PaginationMetadata - - def initialize: - ( - data: ::Array[Orb::Models::credit_ledger_entry_model], - pagination_metadata: Orb::Models::PaginationMetadata - ) -> void - | ( - ?Orb::Models::credit_ledger_entries_model | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::credit_ledger_entries_model - end - end -end diff --git a/sig/orb/models/credit_ledger_entry_model.rbs b/sig/orb/models/credit_ledger_entry_model.rbs deleted file mode 100644 index 6391787d..00000000 --- a/sig/orb/models/credit_ledger_entry_model.rbs +++ /dev/null @@ -1,591 +0,0 @@ -module Orb - module Models - type credit_ledger_entry_model = - Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry - | Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry - | Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry - | Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry - | Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry - | Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry - | Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry - - class CreditLedgerEntryModel < Orb::Union - type increment_ledger_entry = - { - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: String?, - ending_balance: Float, - entry_status: Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry::entry_status, - entry_type: :increment, - ledger_sequence_number: Integer, - metadata: ::Hash[Symbol, String], - starting_balance: Float - } - - class IncrementLedgerEntry < Orb::BaseModel - attr_accessor id: String - - attr_accessor amount: Float - - attr_accessor created_at: Time - - attr_accessor credit_block: Orb::Models::AffectedBlockModel - - attr_accessor currency: String - - attr_accessor customer: Orb::Models::CustomerMinifiedModel - - attr_accessor description: String? - - attr_accessor ending_balance: Float - - attr_accessor entry_status: Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry::entry_status - - attr_accessor entry_type: :increment - - attr_accessor ledger_sequence_number: Integer - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor starting_balance: Float - - def initialize: - ( - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: String?, - ending_balance: Float, - entry_status: Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry::entry_status, - ledger_sequence_number: Integer, - metadata: ::Hash[Symbol, String], - starting_balance: Float, - entry_type: :increment - ) -> void - | ( - ?Orb::Models::CreditLedgerEntryModel::increment_ledger_entry - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::CreditLedgerEntryModel::increment_ledger_entry - - type entry_status = :committed | :pending - - class EntryStatus < Orb::Enum - COMMITTED: :committed - PENDING: :pending - - def self.values: -> ::Array[Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry::entry_status] - end - end - - type decrement_ledger_entry = - { - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: String?, - ending_balance: Float, - entry_status: Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry::entry_status, - entry_type: :decrement, - ledger_sequence_number: Integer, - metadata: ::Hash[Symbol, String], - starting_balance: Float, - event_id: String?, - invoice_id: String?, - price_id: String? - } - - class DecrementLedgerEntry < Orb::BaseModel - attr_accessor id: String - - attr_accessor amount: Float - - attr_accessor created_at: Time - - attr_accessor credit_block: Orb::Models::AffectedBlockModel - - attr_accessor currency: String - - attr_accessor customer: Orb::Models::CustomerMinifiedModel - - attr_accessor description: String? - - attr_accessor ending_balance: Float - - attr_accessor entry_status: Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry::entry_status - - attr_accessor entry_type: :decrement - - attr_accessor ledger_sequence_number: Integer - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor starting_balance: Float - - attr_accessor event_id: String? - - attr_accessor invoice_id: String? - - attr_accessor price_id: String? - - def initialize: - ( - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: String?, - ending_balance: Float, - entry_status: Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry::entry_status, - ledger_sequence_number: Integer, - metadata: ::Hash[Symbol, String], - starting_balance: Float, - event_id: String?, - invoice_id: String?, - price_id: String?, - entry_type: :decrement - ) -> void - | ( - ?Orb::Models::CreditLedgerEntryModel::decrement_ledger_entry - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::CreditLedgerEntryModel::decrement_ledger_entry - - type entry_status = :committed | :pending - - class EntryStatus < Orb::Enum - COMMITTED: :committed - PENDING: :pending - - def self.values: -> ::Array[Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry::entry_status] - end - end - - type expiration_change_ledger_entry = - { - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: String?, - ending_balance: Float, - entry_status: Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry::entry_status, - entry_type: :expiration_change, - ledger_sequence_number: Integer, - metadata: ::Hash[Symbol, String], - new_block_expiry_date: Time?, - starting_balance: Float - } - - class ExpirationChangeLedgerEntry < Orb::BaseModel - attr_accessor id: String - - attr_accessor amount: Float - - attr_accessor created_at: Time - - attr_accessor credit_block: Orb::Models::AffectedBlockModel - - attr_accessor currency: String - - attr_accessor customer: Orb::Models::CustomerMinifiedModel - - attr_accessor description: String? - - attr_accessor ending_balance: Float - - attr_accessor entry_status: Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry::entry_status - - attr_accessor entry_type: :expiration_change - - attr_accessor ledger_sequence_number: Integer - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor new_block_expiry_date: Time? - - attr_accessor starting_balance: Float - - def initialize: - ( - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: String?, - ending_balance: Float, - entry_status: Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry::entry_status, - ledger_sequence_number: Integer, - metadata: ::Hash[Symbol, String], - new_block_expiry_date: Time?, - starting_balance: Float, - entry_type: :expiration_change - ) -> void - | ( - ?Orb::Models::CreditLedgerEntryModel::expiration_change_ledger_entry - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::CreditLedgerEntryModel::expiration_change_ledger_entry - - type entry_status = :committed | :pending - - class EntryStatus < Orb::Enum - COMMITTED: :committed - PENDING: :pending - - def self.values: -> ::Array[Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry::entry_status] - end - end - - type credit_block_expiry_ledger_entry = - { - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: String?, - ending_balance: Float, - entry_status: Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry::entry_status, - entry_type: :credit_block_expiry, - ledger_sequence_number: Integer, - metadata: ::Hash[Symbol, String], - starting_balance: Float - } - - class CreditBlockExpiryLedgerEntry < Orb::BaseModel - attr_accessor id: String - - attr_accessor amount: Float - - attr_accessor created_at: Time - - attr_accessor credit_block: Orb::Models::AffectedBlockModel - - attr_accessor currency: String - - attr_accessor customer: Orb::Models::CustomerMinifiedModel - - attr_accessor description: String? - - attr_accessor ending_balance: Float - - attr_accessor entry_status: Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry::entry_status - - attr_accessor entry_type: :credit_block_expiry - - attr_accessor ledger_sequence_number: Integer - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor starting_balance: Float - - def initialize: - ( - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: String?, - ending_balance: Float, - entry_status: Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry::entry_status, - ledger_sequence_number: Integer, - metadata: ::Hash[Symbol, String], - starting_balance: Float, - entry_type: :credit_block_expiry - ) -> void - | ( - ?Orb::Models::CreditLedgerEntryModel::credit_block_expiry_ledger_entry - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::CreditLedgerEntryModel::credit_block_expiry_ledger_entry - - type entry_status = :committed | :pending - - class EntryStatus < Orb::Enum - COMMITTED: :committed - PENDING: :pending - - def self.values: -> ::Array[Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry::entry_status] - end - end - - type void_ledger_entry = - { - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: String?, - ending_balance: Float, - entry_status: Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry::entry_status, - entry_type: :void, - ledger_sequence_number: Integer, - metadata: ::Hash[Symbol, String], - starting_balance: Float, - void_amount: Float, - void_reason: String? - } - - class VoidLedgerEntry < Orb::BaseModel - attr_accessor id: String - - attr_accessor amount: Float - - attr_accessor created_at: Time - - attr_accessor credit_block: Orb::Models::AffectedBlockModel - - attr_accessor currency: String - - attr_accessor customer: Orb::Models::CustomerMinifiedModel - - attr_accessor description: String? - - attr_accessor ending_balance: Float - - attr_accessor entry_status: Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry::entry_status - - attr_accessor entry_type: :void - - attr_accessor ledger_sequence_number: Integer - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor starting_balance: Float - - attr_accessor void_amount: Float - - attr_accessor void_reason: String? - - def initialize: - ( - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: String?, - ending_balance: Float, - entry_status: Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry::entry_status, - ledger_sequence_number: Integer, - metadata: ::Hash[Symbol, String], - starting_balance: Float, - void_amount: Float, - void_reason: String?, - entry_type: :void - ) -> void - | ( - ?Orb::Models::CreditLedgerEntryModel::void_ledger_entry - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::CreditLedgerEntryModel::void_ledger_entry - - type entry_status = :committed | :pending - - class EntryStatus < Orb::Enum - COMMITTED: :committed - PENDING: :pending - - def self.values: -> ::Array[Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry::entry_status] - end - end - - type void_initiated_ledger_entry = - { - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: String?, - ending_balance: Float, - entry_status: Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry::entry_status, - entry_type: :void_initiated, - ledger_sequence_number: Integer, - metadata: ::Hash[Symbol, String], - new_block_expiry_date: Time, - starting_balance: Float, - void_amount: Float, - void_reason: String? - } - - class VoidInitiatedLedgerEntry < Orb::BaseModel - attr_accessor id: String - - attr_accessor amount: Float - - attr_accessor created_at: Time - - attr_accessor credit_block: Orb::Models::AffectedBlockModel - - attr_accessor currency: String - - attr_accessor customer: Orb::Models::CustomerMinifiedModel - - attr_accessor description: String? - - attr_accessor ending_balance: Float - - attr_accessor entry_status: Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry::entry_status - - attr_accessor entry_type: :void_initiated - - attr_accessor ledger_sequence_number: Integer - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor new_block_expiry_date: Time - - attr_accessor starting_balance: Float - - attr_accessor void_amount: Float - - attr_accessor void_reason: String? - - def initialize: - ( - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: String?, - ending_balance: Float, - entry_status: Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry::entry_status, - ledger_sequence_number: Integer, - metadata: ::Hash[Symbol, String], - new_block_expiry_date: Time, - starting_balance: Float, - void_amount: Float, - void_reason: String?, - entry_type: :void_initiated - ) -> void - | ( - ?Orb::Models::CreditLedgerEntryModel::void_initiated_ledger_entry - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::CreditLedgerEntryModel::void_initiated_ledger_entry - - type entry_status = :committed | :pending - - class EntryStatus < Orb::Enum - COMMITTED: :committed - PENDING: :pending - - def self.values: -> ::Array[Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry::entry_status] - end - end - - type amendment_ledger_entry = - { - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: String?, - ending_balance: Float, - entry_status: Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry::entry_status, - entry_type: :amendment, - ledger_sequence_number: Integer, - metadata: ::Hash[Symbol, String], - starting_balance: Float - } - - class AmendmentLedgerEntry < Orb::BaseModel - attr_accessor id: String - - attr_accessor amount: Float - - attr_accessor created_at: Time - - attr_accessor credit_block: Orb::Models::AffectedBlockModel - - attr_accessor currency: String - - attr_accessor customer: Orb::Models::CustomerMinifiedModel - - attr_accessor description: String? - - attr_accessor ending_balance: Float - - attr_accessor entry_status: Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry::entry_status - - attr_accessor entry_type: :amendment - - attr_accessor ledger_sequence_number: Integer - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor starting_balance: Float - - def initialize: - ( - id: String, - amount: Float, - created_at: Time, - credit_block: Orb::Models::AffectedBlockModel, - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - description: String?, - ending_balance: Float, - entry_status: Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry::entry_status, - ledger_sequence_number: Integer, - metadata: ::Hash[Symbol, String], - starting_balance: Float, - entry_type: :amendment - ) -> void - | ( - ?Orb::Models::CreditLedgerEntryModel::amendment_ledger_entry - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::CreditLedgerEntryModel::amendment_ledger_entry - - type entry_status = :committed | :pending - - class EntryStatus < Orb::Enum - COMMITTED: :committed - PENDING: :pending - - def self.values: -> ::Array[Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry::entry_status] - end - end - - private def self.variants: -> [[:increment, Orb::Models::CreditLedgerEntryModel::IncrementLedgerEntry], [:decrement, Orb::Models::CreditLedgerEntryModel::DecrementLedgerEntry], [:expiration_change, Orb::Models::CreditLedgerEntryModel::ExpirationChangeLedgerEntry], [:credit_block_expiry, Orb::Models::CreditLedgerEntryModel::CreditBlockExpiryLedgerEntry], [:void, Orb::Models::CreditLedgerEntryModel::VoidLedgerEntry], [:void_initiated, Orb::Models::CreditLedgerEntryModel::VoidInitiatedLedgerEntry], [:amendment, Orb::Models::CreditLedgerEntryModel::AmendmentLedgerEntry]] - end - end -end diff --git a/sig/orb/models/credit_note.rbs b/sig/orb/models/credit_note.rbs index 53b338c9..32ade134 100644 --- a/sig/orb/models/credit_note.rbs +++ b/sig/orb/models/credit_note.rbs @@ -6,10 +6,10 @@ module Orb created_at: Time, credit_note_number: String, credit_note_pdf: String?, - customer: Orb::Models::CustomerMinifiedModel, + customer: Orb::Models::CreditNote::Customer, invoice_id: String, line_items: ::Array[Orb::Models::CreditNote::LineItem], - maximum_amount_adjustment: Orb::Models::CreditNoteDiscountModel?, + maximum_amount_adjustment: Orb::Models::CreditNote::MaximumAmountAdjustment?, memo: String?, minimum_amount_refunded: String?, reason: Orb::Models::CreditNote::reason?, @@ -17,7 +17,7 @@ module Orb total: String, type: Orb::Models::CreditNote::type_, voided_at: Time?, - discounts: ::Array[Orb::Models::CreditNoteDiscountModel] + discounts: ::Array[Orb::Models::CreditNote::Discount] } class CreditNote < Orb::BaseModel @@ -29,13 +29,13 @@ module Orb attr_accessor credit_note_pdf: String? - attr_accessor customer: Orb::Models::CustomerMinifiedModel + attr_accessor customer: Orb::Models::CreditNote::Customer attr_accessor invoice_id: String attr_accessor line_items: ::Array[Orb::Models::CreditNote::LineItem] - attr_accessor maximum_amount_adjustment: Orb::Models::CreditNoteDiscountModel? + attr_accessor maximum_amount_adjustment: Orb::Models::CreditNote::MaximumAmountAdjustment? attr_accessor memo: String? @@ -51,11 +51,11 @@ module Orb attr_accessor voided_at: Time? - attr_reader discounts: ::Array[Orb::Models::CreditNoteDiscountModel]? + attr_reader discounts: ::Array[Orb::Models::CreditNote::Discount]? def discounts=: ( - ::Array[Orb::Models::CreditNoteDiscountModel] - ) -> ::Array[Orb::Models::CreditNoteDiscountModel] + ::Array[Orb::Models::CreditNote::Discount] + ) -> ::Array[Orb::Models::CreditNote::Discount] def initialize: ( @@ -63,10 +63,10 @@ module Orb created_at: Time, credit_note_number: String, credit_note_pdf: String?, - customer: Orb::Models::CustomerMinifiedModel, + customer: Orb::Models::CreditNote::Customer, invoice_id: String, line_items: ::Array[Orb::Models::CreditNote::LineItem], - maximum_amount_adjustment: Orb::Models::CreditNoteDiscountModel?, + maximum_amount_adjustment: Orb::Models::CreditNote::MaximumAmountAdjustment?, memo: String?, minimum_amount_refunded: String?, reason: Orb::Models::CreditNote::reason?, @@ -74,12 +74,26 @@ module Orb total: String, type: Orb::Models::CreditNote::type_, voided_at: Time?, - discounts: ::Array[Orb::Models::CreditNoteDiscountModel] + discounts: ::Array[Orb::Models::CreditNote::Discount] ) -> void | (?Orb::Models::credit_note | Orb::BaseModel data) -> void def to_hash: -> Orb::Models::credit_note + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | (?Orb::Models::CreditNote::customer | Orb::BaseModel data) -> void + + def to_hash: -> Orb::Models::CreditNote::customer + end + type line_item = { id: String, @@ -88,7 +102,7 @@ module Orb name: String, quantity: Float?, subtotal: String, - tax_amounts: ::Array[Orb::Models::TaxAmountModel], + tax_amounts: ::Array[Orb::Models::CreditNote::LineItem::TaxAmount], discounts: ::Array[Orb::Models::CreditNote::LineItem::Discount] } @@ -105,7 +119,7 @@ module Orb attr_accessor subtotal: String - attr_accessor tax_amounts: ::Array[Orb::Models::TaxAmountModel] + attr_accessor tax_amounts: ::Array[Orb::Models::CreditNote::LineItem::TaxAmount] attr_reader discounts: ::Array[Orb::Models::CreditNote::LineItem::Discount]? @@ -121,13 +135,41 @@ module Orb name: String, quantity: Float?, subtotal: String, - tax_amounts: ::Array[Orb::Models::TaxAmountModel], + tax_amounts: ::Array[Orb::Models::CreditNote::LineItem::TaxAmount], discounts: ::Array[Orb::Models::CreditNote::LineItem::Discount] ) -> void | (?Orb::Models::CreditNote::line_item | Orb::BaseModel data) -> void def to_hash: -> Orb::Models::CreditNote::line_item + type tax_amount = + { + amount: String, + tax_rate_description: String, + tax_rate_percentage: String? + } + + class TaxAmount < Orb::BaseModel + attr_accessor amount: String + + attr_accessor tax_rate_description: String + + attr_accessor tax_rate_percentage: String? + + def initialize: + ( + amount: String, + tax_rate_description: String, + tax_rate_percentage: String? + ) -> void + | ( + ?Orb::Models::CreditNote::LineItem::tax_amount + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CreditNote::LineItem::tax_amount + end + type discount = { id: String, @@ -181,6 +223,67 @@ module Orb end end + type maximum_amount_adjustment = + { + amount_applied: String, + discount_type: Orb::Models::CreditNote::MaximumAmountAdjustment::discount_type, + percentage_discount: Float, + applies_to_prices: ::Array[Orb::Models::CreditNote::MaximumAmountAdjustment::AppliesToPrice]?, + reason: String? + } + + class MaximumAmountAdjustment < Orb::BaseModel + attr_accessor amount_applied: String + + attr_accessor discount_type: Orb::Models::CreditNote::MaximumAmountAdjustment::discount_type + + attr_accessor percentage_discount: Float + + attr_accessor applies_to_prices: ::Array[Orb::Models::CreditNote::MaximumAmountAdjustment::AppliesToPrice]? + + attr_accessor reason: String? + + def initialize: + ( + amount_applied: String, + discount_type: Orb::Models::CreditNote::MaximumAmountAdjustment::discount_type, + percentage_discount: Float, + applies_to_prices: ::Array[Orb::Models::CreditNote::MaximumAmountAdjustment::AppliesToPrice]?, + reason: String? + ) -> void + | ( + ?Orb::Models::CreditNote::maximum_amount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CreditNote::maximum_amount_adjustment + + type discount_type = :percentage + + class DiscountType < Orb::Enum + PERCENTAGE: :percentage + + def self.values: -> ::Array[Orb::Models::CreditNote::MaximumAmountAdjustment::discount_type] + end + + type applies_to_price = { id: String, name: String } + + class AppliesToPrice < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::CreditNote::MaximumAmountAdjustment::applies_to_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CreditNote::MaximumAmountAdjustment::applies_to_price + end + end + type reason = :Duplicate | :Fraudulent | :"Order change" | :"Product unsatisfactory" @@ -201,6 +304,64 @@ module Orb def self.values: -> ::Array[Orb::Models::CreditNote::type_] end + + type discount = + { + amount_applied: String, + discount_type: Orb::Models::CreditNote::Discount::discount_type, + percentage_discount: Float, + applies_to_prices: ::Array[Orb::Models::CreditNote::Discount::AppliesToPrice]?, + reason: String? + } + + class Discount < Orb::BaseModel + attr_accessor amount_applied: String + + attr_accessor discount_type: Orb::Models::CreditNote::Discount::discount_type + + attr_accessor percentage_discount: Float + + attr_accessor applies_to_prices: ::Array[Orb::Models::CreditNote::Discount::AppliesToPrice]? + + attr_accessor reason: String? + + def initialize: + ( + amount_applied: String, + discount_type: Orb::Models::CreditNote::Discount::discount_type, + percentage_discount: Float, + applies_to_prices: ::Array[Orb::Models::CreditNote::Discount::AppliesToPrice]?, + reason: String? + ) -> void + | (?Orb::Models::CreditNote::discount | Orb::BaseModel data) -> void + + def to_hash: -> Orb::Models::CreditNote::discount + + type discount_type = :percentage + + class DiscountType < Orb::Enum + PERCENTAGE: :percentage + + def self.values: -> ::Array[Orb::Models::CreditNote::Discount::discount_type] + end + + type applies_to_price = { id: String, name: String } + + class AppliesToPrice < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::CreditNote::Discount::applies_to_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CreditNote::Discount::applies_to_price + end + end end end end diff --git a/sig/orb/models/credit_note_discount_model.rbs b/sig/orb/models/credit_note_discount_model.rbs deleted file mode 100644 index 3b1fd653..00000000 --- a/sig/orb/models/credit_note_discount_model.rbs +++ /dev/null @@ -1,63 +0,0 @@ -module Orb - module Models - type credit_note_discount_model = - { - amount_applied: String, - discount_type: Orb::Models::CreditNoteDiscountModel::discount_type, - percentage_discount: Float, - applies_to_prices: ::Array[Orb::Models::CreditNoteDiscountModel::AppliesToPrice]?, - reason: String? - } - - class CreditNoteDiscountModel < Orb::BaseModel - attr_accessor amount_applied: String - - attr_accessor discount_type: Orb::Models::CreditNoteDiscountModel::discount_type - - attr_accessor percentage_discount: Float - - attr_accessor applies_to_prices: ::Array[Orb::Models::CreditNoteDiscountModel::AppliesToPrice]? - - attr_accessor reason: String? - - def initialize: - ( - amount_applied: String, - discount_type: Orb::Models::CreditNoteDiscountModel::discount_type, - percentage_discount: Float, - applies_to_prices: ::Array[Orb::Models::CreditNoteDiscountModel::AppliesToPrice]?, - reason: String? - ) -> void - | ( - ?Orb::Models::credit_note_discount_model | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::credit_note_discount_model - - type discount_type = :percentage - - class DiscountType < Orb::Enum - PERCENTAGE: :percentage - - def self.values: -> ::Array[Orb::Models::CreditNoteDiscountModel::discount_type] - end - - type applies_to_price = { id: String, name: String } - - class AppliesToPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor name: String - - def initialize: - (id: String, name: String) -> void - | ( - ?Orb::Models::CreditNoteDiscountModel::applies_to_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::CreditNoteDiscountModel::applies_to_price - end - end - end -end diff --git a/sig/orb/models/credit_note_model.rbs b/sig/orb/models/credit_note_model.rbs deleted file mode 100644 index 5e75362e..00000000 --- a/sig/orb/models/credit_note_model.rbs +++ /dev/null @@ -1,209 +0,0 @@ -module Orb - module Models - type credit_note_model = - { - id: String, - created_at: Time, - credit_note_number: String, - credit_note_pdf: String?, - customer: Orb::Models::CustomerMinifiedModel, - invoice_id: String, - line_items: ::Array[Orb::Models::CreditNoteModel::LineItem], - maximum_amount_adjustment: Orb::Models::CreditNoteDiscountModel?, - memo: String?, - minimum_amount_refunded: String?, - reason: Orb::Models::CreditNoteModel::reason?, - subtotal: String, - total: String, - type: Orb::Models::CreditNoteModel::type_, - voided_at: Time?, - discounts: ::Array[Orb::Models::CreditNoteDiscountModel] - } - - class CreditNoteModel < Orb::BaseModel - attr_accessor id: String - - attr_accessor created_at: Time - - attr_accessor credit_note_number: String - - attr_accessor credit_note_pdf: String? - - attr_accessor customer: Orb::Models::CustomerMinifiedModel - - attr_accessor invoice_id: String - - attr_accessor line_items: ::Array[Orb::Models::CreditNoteModel::LineItem] - - attr_accessor maximum_amount_adjustment: Orb::Models::CreditNoteDiscountModel? - - attr_accessor memo: String? - - attr_accessor minimum_amount_refunded: String? - - attr_accessor reason: Orb::Models::CreditNoteModel::reason? - - attr_accessor subtotal: String - - attr_accessor total: String - - attr_accessor type: Orb::Models::CreditNoteModel::type_ - - attr_accessor voided_at: Time? - - attr_reader discounts: ::Array[Orb::Models::CreditNoteDiscountModel]? - - def discounts=: ( - ::Array[Orb::Models::CreditNoteDiscountModel] - ) -> ::Array[Orb::Models::CreditNoteDiscountModel] - - def initialize: - ( - id: String, - created_at: Time, - credit_note_number: String, - credit_note_pdf: String?, - customer: Orb::Models::CustomerMinifiedModel, - invoice_id: String, - line_items: ::Array[Orb::Models::CreditNoteModel::LineItem], - maximum_amount_adjustment: Orb::Models::CreditNoteDiscountModel?, - memo: String?, - minimum_amount_refunded: String?, - reason: Orb::Models::CreditNoteModel::reason?, - subtotal: String, - total: String, - type: Orb::Models::CreditNoteModel::type_, - voided_at: Time?, - discounts: ::Array[Orb::Models::CreditNoteDiscountModel] - ) -> void - | (?Orb::Models::credit_note_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::credit_note_model - - type line_item = - { - id: String, - amount: String, - item_id: String, - name: String, - quantity: Float?, - subtotal: String, - tax_amounts: ::Array[Orb::Models::TaxAmountModel], - discounts: ::Array[Orb::Models::CreditNoteModel::LineItem::Discount] - } - - class LineItem < Orb::BaseModel - attr_accessor id: String - - attr_accessor amount: String - - attr_accessor item_id: String - - attr_accessor name: String - - attr_accessor quantity: Float? - - attr_accessor subtotal: String - - attr_accessor tax_amounts: ::Array[Orb::Models::TaxAmountModel] - - attr_reader discounts: ::Array[Orb::Models::CreditNoteModel::LineItem::Discount]? - - def discounts=: ( - ::Array[Orb::Models::CreditNoteModel::LineItem::Discount] - ) -> ::Array[Orb::Models::CreditNoteModel::LineItem::Discount] - - def initialize: - ( - id: String, - amount: String, - item_id: String, - name: String, - quantity: Float?, - subtotal: String, - tax_amounts: ::Array[Orb::Models::TaxAmountModel], - discounts: ::Array[Orb::Models::CreditNoteModel::LineItem::Discount] - ) -> void - | ( - ?Orb::Models::CreditNoteModel::line_item | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::CreditNoteModel::line_item - - type discount = - { - id: String, - amount_applied: String, - applies_to_price_ids: ::Array[String], - discount_type: Orb::Models::CreditNoteModel::LineItem::Discount::discount_type, - percentage_discount: Float, - amount_discount: String?, - reason: String? - } - - class Discount < Orb::BaseModel - attr_accessor id: String - - attr_accessor amount_applied: String - - attr_accessor applies_to_price_ids: ::Array[String] - - attr_accessor discount_type: Orb::Models::CreditNoteModel::LineItem::Discount::discount_type - - attr_accessor percentage_discount: Float - - attr_accessor amount_discount: String? - - attr_accessor reason: String? - - def initialize: - ( - id: String, - amount_applied: String, - applies_to_price_ids: ::Array[String], - discount_type: Orb::Models::CreditNoteModel::LineItem::Discount::discount_type, - percentage_discount: Float, - amount_discount: String?, - reason: String? - ) -> void - | ( - ?Orb::Models::CreditNoteModel::LineItem::discount - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::CreditNoteModel::LineItem::discount - - type discount_type = :percentage | :amount - - class DiscountType < Orb::Enum - PERCENTAGE: :percentage - AMOUNT: :amount - - def self.values: -> ::Array[Orb::Models::CreditNoteModel::LineItem::Discount::discount_type] - end - end - end - - type reason = - :Duplicate | :Fraudulent | :"Order change" | :"Product unsatisfactory" - - class Reason < Orb::Enum - DUPLICATE: :Duplicate - FRAUDULENT: :Fraudulent - ORDER_CHANGE: :"Order change" - PRODUCT_UNSATISFACTORY: :"Product unsatisfactory" - - def self.values: -> ::Array[Orb::Models::CreditNoteModel::reason] - end - - type type_ = :refund | :adjustment - - class Type < Orb::Enum - REFUND: :refund - ADJUSTMENT: :adjustment - - def self.values: -> ::Array[Orb::Models::CreditNoteModel::type_] - end - end - end -end diff --git a/sig/orb/models/credit_note_summary_model.rbs b/sig/orb/models/credit_note_summary_model.rbs deleted file mode 100644 index b66194c2..00000000 --- a/sig/orb/models/credit_note_summary_model.rbs +++ /dev/null @@ -1,46 +0,0 @@ -module Orb - module Models - type credit_note_summary_model = - { - id: String, - credit_note_number: String, - memo: String?, - reason: String, - total: String, - type: String, - voided_at: Time? - } - - class CreditNoteSummaryModel < Orb::BaseModel - attr_accessor id: String - - attr_accessor credit_note_number: String - - attr_accessor memo: String? - - attr_accessor reason: String - - attr_accessor total: String - - attr_accessor type: String - - attr_accessor voided_at: Time? - - def initialize: - ( - id: String, - credit_note_number: String, - memo: String?, - reason: String, - total: String, - type: String, - voided_at: Time? - ) -> void - | ( - ?Orb::Models::credit_note_summary_model | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::credit_note_summary_model - end - end -end diff --git a/sig/orb/models/custom_rating_function_config_model.rbs b/sig/orb/models/custom_rating_function_config_model.rbs deleted file mode 100644 index afda5622..00000000 --- a/sig/orb/models/custom_rating_function_config_model.rbs +++ /dev/null @@ -1,7 +0,0 @@ -module Orb - module Models - type custom_rating_function_config_model = ::Hash[Symbol, top] - - CustomRatingFunctionConfigModel: custom_rating_function_config_model - end -end diff --git a/sig/orb/models/customer.rbs b/sig/orb/models/customer.rbs index 77584780..5be47fb4 100644 --- a/sig/orb/models/customer.rbs +++ b/sig/orb/models/customer.rbs @@ -6,7 +6,7 @@ module Orb additional_emails: ::Array[String], auto_collection: bool, balance: String, - billing_address: Orb::Models::AddressModel?, + billing_address: Orb::Models::Customer::BillingAddress?, created_at: Time, currency: String?, email: String, @@ -19,8 +19,8 @@ module Orb payment_provider: Orb::Models::Customer::payment_provider?, payment_provider_id: String?, portal_url: String?, - shipping_address: Orb::Models::AddressModel?, - tax_id: Orb::Models::CustomerTaxIDModel?, + shipping_address: Orb::Models::Customer::ShippingAddress?, + tax_id: Orb::Models::Customer::TaxID?, timezone: String, accounting_sync_configuration: Orb::Models::Customer::AccountingSyncConfiguration?, reporting_configuration: Orb::Models::Customer::ReportingConfiguration? @@ -35,7 +35,7 @@ module Orb attr_accessor balance: String - attr_accessor billing_address: Orb::Models::AddressModel? + attr_accessor billing_address: Orb::Models::Customer::BillingAddress? attr_accessor created_at: Time @@ -61,9 +61,9 @@ module Orb attr_accessor portal_url: String? - attr_accessor shipping_address: Orb::Models::AddressModel? + attr_accessor shipping_address: Orb::Models::Customer::ShippingAddress? - attr_accessor tax_id: Orb::Models::CustomerTaxIDModel? + attr_accessor tax_id: Orb::Models::Customer::TaxID? attr_accessor timezone: String @@ -77,7 +77,7 @@ module Orb additional_emails: ::Array[String], auto_collection: bool, balance: String, - billing_address: Orb::Models::AddressModel?, + billing_address: Orb::Models::Customer::BillingAddress?, created_at: Time, currency: String?, email: String, @@ -90,8 +90,8 @@ module Orb payment_provider: Orb::Models::Customer::payment_provider?, payment_provider_id: String?, portal_url: String?, - shipping_address: Orb::Models::AddressModel?, - tax_id: Orb::Models::CustomerTaxIDModel?, + shipping_address: Orb::Models::Customer::ShippingAddress?, + tax_id: Orb::Models::Customer::TaxID?, timezone: String, accounting_sync_configuration: Orb::Models::Customer::AccountingSyncConfiguration?, reporting_configuration: Orb::Models::Customer::ReportingConfiguration? @@ -100,25 +100,96 @@ module Orb def to_hash: -> Orb::Models::customer + type billing_address = + { + city: String?, + country: String?, + :line1 => String?, + :line2 => String?, + postal_code: String?, + state: String? + } + + class BillingAddress < Orb::BaseModel + attr_accessor city: String? + + attr_accessor country: String? + + attr_accessor line1: String? + + attr_accessor line2: String? + + attr_accessor postal_code: String? + + attr_accessor state: String? + + def initialize: + ( + city: String?, + country: String?, + line1: String?, + line2: String?, + postal_code: String?, + state: String? + ) -> void + | ( + ?Orb::Models::Customer::billing_address | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customer::billing_address + end + type hierarchy = { - children: ::Array[Orb::Models::CustomerMinifiedModel], - parent: Orb::Models::CustomerMinifiedModel? + children: ::Array[Orb::Models::Customer::Hierarchy::Child], + parent: Orb::Models::Customer::Hierarchy::Parent? } class Hierarchy < Orb::BaseModel - attr_accessor children: ::Array[Orb::Models::CustomerMinifiedModel] + attr_accessor children: ::Array[Orb::Models::Customer::Hierarchy::Child] - attr_accessor parent: Orb::Models::CustomerMinifiedModel? + attr_accessor parent: Orb::Models::Customer::Hierarchy::Parent? def initialize: ( - children: ::Array[Orb::Models::CustomerMinifiedModel], - parent: Orb::Models::CustomerMinifiedModel? + children: ::Array[Orb::Models::Customer::Hierarchy::Child], + parent: Orb::Models::Customer::Hierarchy::Parent? ) -> void | (?Orb::Models::Customer::hierarchy | Orb::BaseModel data) -> void def to_hash: -> Orb::Models::Customer::hierarchy + + type child = { id: String, external_customer_id: String? } + + class Child < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customer::Hierarchy::child | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customer::Hierarchy::child + end + + type parent = { id: String, external_customer_id: String? } + + class Parent < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customer::Hierarchy::parent | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customer::Hierarchy::parent + end end type payment_provider = @@ -134,6 +205,382 @@ module Orb def self.values: -> ::Array[Orb::Models::Customer::payment_provider] end + type shipping_address = + { + city: String?, + country: String?, + :line1 => String?, + :line2 => String?, + postal_code: String?, + state: String? + } + + class ShippingAddress < Orb::BaseModel + attr_accessor city: String? + + attr_accessor country: String? + + attr_accessor line1: String? + + attr_accessor line2: String? + + attr_accessor postal_code: String? + + attr_accessor state: String? + + def initialize: + ( + city: String?, + country: String?, + line1: String?, + line2: String?, + postal_code: String?, + state: String? + ) -> void + | ( + ?Orb::Models::Customer::shipping_address | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customer::shipping_address + end + + type tax_id = + { + country: Orb::Models::Customer::TaxID::country, + type: Orb::Models::Customer::TaxID::type_, + value: String + } + + class TaxID < Orb::BaseModel + attr_accessor country: Orb::Models::Customer::TaxID::country + + attr_accessor type: Orb::Models::Customer::TaxID::type_ + + attr_accessor value: String + + def initialize: + ( + country: Orb::Models::Customer::TaxID::country, + type: Orb::Models::Customer::TaxID::type_, + value: String + ) -> void + | (?Orb::Models::Customer::tax_id | Orb::BaseModel data) -> void + + def to_hash: -> Orb::Models::Customer::tax_id + + type country = + :AD + | :AE + | :AR + | :AT + | :AU + | :BE + | :BG + | :BH + | :BO + | :BR + | :CA + | :CH + | :CL + | :CN + | :CO + | :CR + | :CY + | :CZ + | :DE + | :DK + | :EE + | :DO + | :EC + | :EG + | :ES + | :EU + | :FI + | :FR + | :GB + | :GE + | :GR + | :HK + | :HR + | :HU + | :ID + | :IE + | :IL + | :IN + | :IS + | :IT + | :JP + | :KE + | :KR + | :KZ + | :LI + | :LT + | :LU + | :LV + | :MT + | :MX + | :MY + | :NG + | :NL + | :NO + | :NZ + | :OM + | :PE + | :PH + | :PL + | :PT + | :RO + | :RS + | :RU + | :SA + | :SE + | :SG + | :SI + | :SK + | :SV + | :TH + | :TR + | :TW + | :UA + | :US + | :UY + | :VE + | :VN + | :ZA + + class Country < Orb::Enum + AD: :AD + AE: :AE + AR: :AR + AT: :AT + AU: :AU + BE: :BE + BG: :BG + BH: :BH + BO: :BO + BR: :BR + CA: :CA + CH: :CH + CL: :CL + CN: :CN + CO: :CO + CR: :CR + CY: :CY + CZ: :CZ + DE: :DE + DK: :DK + EE: :EE + DO: :DO + EC: :EC + EG: :EG + ES: :ES + EU: :EU + FI: :FI + FR: :FR + GB: :GB + GE: :GE + GR: :GR + HK: :HK + HR: :HR + HU: :HU + ID: :ID + IE: :IE + IL: :IL + IN: :IN + IS: :IS + IT: :IT + JP: :JP + KE: :KE + KR: :KR + KZ: :KZ + LI: :LI + LT: :LT + LU: :LU + LV: :LV + MT: :MT + MX: :MX + MY: :MY + NG: :NG + NL: :NL + NO: :NO + NZ: :NZ + OM: :OM + PE: :PE + PH: :PH + PL: :PL + PT: :PT + RO: :RO + RS: :RS + RU: :RU + SA: :SA + SE: :SE + SG: :SG + SI: :SI + SK: :SK + SV: :SV + TH: :TH + TR: :TR + TW: :TW + UA: :UA + US: :US + UY: :UY + VE: :VE + VN: :VN + ZA: :ZA + + def self.values: -> ::Array[Orb::Models::Customer::TaxID::country] + end + + type type_ = + :ad_nrt + | :ae_trn + | :ar_cuit + | :eu_vat + | :au_abn + | :au_arn + | :bg_uic + | :bh_vat + | :bo_tin + | :br_cnpj + | :br_cpf + | :ca_bn + | :ca_gst_hst + | :ca_pst_bc + | :ca_pst_mb + | :ca_pst_sk + | :ca_qst + | :ch_vat + | :cl_tin + | :cn_tin + | :co_nit + | :cr_tin + | :do_rcn + | :ec_ruc + | :eg_tin + | :es_cif + | :eu_oss_vat + | :gb_vat + | :ge_vat + | :hk_br + | :hu_tin + | :id_npwp + | :il_vat + | :in_gst + | :is_vat + | :jp_cn + | :jp_rn + | :jp_trn + | :ke_pin + | :kr_brn + | :kz_bin + | :li_uid + | :mx_rfc + | :my_frp + | :my_itn + | :my_sst + | :ng_tin + | :no_vat + | :no_voec + | :nz_gst + | :om_vat + | :pe_ruc + | :ph_tin + | :ro_tin + | :rs_pib + | :ru_inn + | :ru_kpp + | :sa_vat + | :sg_gst + | :sg_uen + | :si_tin + | :sv_nit + | :th_vat + | :tr_tin + | :tw_vat + | :ua_vat + | :us_ein + | :uy_ruc + | :ve_rif + | :vn_tin + | :za_vat + + class Type < Orb::Enum + AD_NRT: :ad_nrt + AE_TRN: :ae_trn + AR_CUIT: :ar_cuit + EU_VAT: :eu_vat + AU_ABN: :au_abn + AU_ARN: :au_arn + BG_UIC: :bg_uic + BH_VAT: :bh_vat + BO_TIN: :bo_tin + BR_CNPJ: :br_cnpj + BR_CPF: :br_cpf + CA_BN: :ca_bn + CA_GST_HST: :ca_gst_hst + CA_PST_BC: :ca_pst_bc + CA_PST_MB: :ca_pst_mb + CA_PST_SK: :ca_pst_sk + CA_QST: :ca_qst + CH_VAT: :ch_vat + CL_TIN: :cl_tin + CN_TIN: :cn_tin + CO_NIT: :co_nit + CR_TIN: :cr_tin + DO_RCN: :do_rcn + EC_RUC: :ec_ruc + EG_TIN: :eg_tin + ES_CIF: :es_cif + EU_OSS_VAT: :eu_oss_vat + GB_VAT: :gb_vat + GE_VAT: :ge_vat + HK_BR: :hk_br + HU_TIN: :hu_tin + ID_NPWP: :id_npwp + IL_VAT: :il_vat + IN_GST: :in_gst + IS_VAT: :is_vat + JP_CN: :jp_cn + JP_RN: :jp_rn + JP_TRN: :jp_trn + KE_PIN: :ke_pin + KR_BRN: :kr_brn + KZ_BIN: :kz_bin + LI_UID: :li_uid + MX_RFC: :mx_rfc + MY_FRP: :my_frp + MY_ITN: :my_itn + MY_SST: :my_sst + NG_TIN: :ng_tin + NO_VAT: :no_vat + NO_VOEC: :no_voec + NZ_GST: :nz_gst + OM_VAT: :om_vat + PE_RUC: :pe_ruc + PH_TIN: :ph_tin + RO_TIN: :ro_tin + RS_PIB: :rs_pib + RU_INN: :ru_inn + RU_KPP: :ru_kpp + SA_VAT: :sa_vat + SG_GST: :sg_gst + SG_UEN: :sg_uen + SI_TIN: :si_tin + SV_NIT: :sv_nit + TH_VAT: :th_vat + TR_TIN: :tr_tin + TW_VAT: :tw_vat + UA_VAT: :ua_vat + US_EIN: :us_ein + UY_RUC: :uy_ruc + VE_RIF: :ve_rif + VN_TIN: :vn_tin + ZA_VAT: :za_vat + + def self.values: -> ::Array[Orb::Models::Customer::TaxID::type_] + end + end + type accounting_sync_configuration = { accounting_providers: ::Array[Orb::Models::Customer::AccountingSyncConfiguration::AccountingProvider], diff --git a/sig/orb/models/customer_balance_transaction_model.rbs b/sig/orb/models/customer_balance_transaction_model.rbs deleted file mode 100644 index 0bf66c2d..00000000 --- a/sig/orb/models/customer_balance_transaction_model.rbs +++ /dev/null @@ -1,122 +0,0 @@ -module Orb - module Models - type customer_balance_transaction_model = - { - id: String, - action: Orb::Models::CustomerBalanceTransactionModel::action, - amount: String, - created_at: Time, - credit_note: Orb::Models::CustomerBalanceTransactionModel::CreditNote?, - description: String?, - ending_balance: String, - invoice: Orb::Models::CustomerBalanceTransactionModel::Invoice?, - starting_balance: String, - type: Orb::Models::CustomerBalanceTransactionModel::type_ - } - - class CustomerBalanceTransactionModel < Orb::BaseModel - attr_accessor id: String - - attr_accessor action: Orb::Models::CustomerBalanceTransactionModel::action - - attr_accessor amount: String - - attr_accessor created_at: Time - - attr_accessor credit_note: Orb::Models::CustomerBalanceTransactionModel::CreditNote? - - attr_accessor description: String? - - attr_accessor ending_balance: String - - attr_accessor invoice: Orb::Models::CustomerBalanceTransactionModel::Invoice? - - attr_accessor starting_balance: String - - attr_accessor type: Orb::Models::CustomerBalanceTransactionModel::type_ - - def initialize: - ( - id: String, - action: Orb::Models::CustomerBalanceTransactionModel::action, - amount: String, - created_at: Time, - credit_note: Orb::Models::CustomerBalanceTransactionModel::CreditNote?, - description: String?, - ending_balance: String, - invoice: Orb::Models::CustomerBalanceTransactionModel::Invoice?, - starting_balance: String, - type: Orb::Models::CustomerBalanceTransactionModel::type_ - ) -> void - | ( - ?Orb::Models::customer_balance_transaction_model | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::customer_balance_transaction_model - - type action = - :applied_to_invoice - | :manual_adjustment - | :prorated_refund - | :revert_prorated_refund - | :return_from_voiding - | :credit_note_applied - | :credit_note_voided - | :overpayment_refund - | :external_payment - - class Action < Orb::Enum - APPLIED_TO_INVOICE: :applied_to_invoice - MANUAL_ADJUSTMENT: :manual_adjustment - PRORATED_REFUND: :prorated_refund - REVERT_PRORATED_REFUND: :revert_prorated_refund - RETURN_FROM_VOIDING: :return_from_voiding - CREDIT_NOTE_APPLIED: :credit_note_applied - CREDIT_NOTE_VOIDED: :credit_note_voided - OVERPAYMENT_REFUND: :overpayment_refund - EXTERNAL_PAYMENT: :external_payment - - def self.values: -> ::Array[Orb::Models::CustomerBalanceTransactionModel::action] - end - - type credit_note = { id: String } - - class CreditNote < Orb::BaseModel - attr_accessor id: String - - def initialize: - (id: String) -> void - | ( - ?Orb::Models::CustomerBalanceTransactionModel::credit_note - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::CustomerBalanceTransactionModel::credit_note - end - - type invoice = { id: String } - - class Invoice < Orb::BaseModel - attr_accessor id: String - - def initialize: - (id: String) -> void - | ( - ?Orb::Models::CustomerBalanceTransactionModel::invoice - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::CustomerBalanceTransactionModel::invoice - end - - type type_ = :increment | :decrement - - class Type < Orb::Enum - INCREMENT: :increment - DECREMENT: :decrement - - def self.values: -> ::Array[Orb::Models::CustomerBalanceTransactionModel::type_] - end - end - end -end diff --git a/sig/orb/models/customer_costs_model.rbs b/sig/orb/models/customer_costs_model.rbs deleted file mode 100644 index ff0ef1f6..00000000 --- a/sig/orb/models/customer_costs_model.rbs +++ /dev/null @@ -1,16 +0,0 @@ -module Orb - module Models - type customer_costs_model = - { data: ::Array[Orb::Models::AggregatedCostModel] } - - class CustomerCostsModel < Orb::BaseModel - attr_accessor data: ::Array[Orb::Models::AggregatedCostModel] - - def initialize: - (data: ::Array[Orb::Models::AggregatedCostModel]) -> void - | (?Orb::Models::customer_costs_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::customer_costs_model - end - end -end diff --git a/sig/orb/models/customer_create_params.rbs b/sig/orb/models/customer_create_params.rbs index d51e9b47..d31cec12 100644 --- a/sig/orb/models/customer_create_params.rbs +++ b/sig/orb/models/customer_create_params.rbs @@ -4,21 +4,21 @@ module Orb { email: String, name: String, - accounting_sync_configuration: Orb::Models::NewAccountingSyncConfigurationModel?, + accounting_sync_configuration: Orb::Models::CustomerCreateParams::AccountingSyncConfiguration?, additional_emails: ::Array[String]?, auto_collection: bool?, - billing_address: Orb::Models::AddressInputModel?, + billing_address: Orb::Models::CustomerCreateParams::BillingAddress?, currency: String?, email_delivery: bool?, external_customer_id: String?, - hierarchy: Orb::Models::CustomerHierarchyConfigModel?, + hierarchy: Orb::Models::CustomerCreateParams::Hierarchy?, metadata: ::Hash[Symbol, String?]?, payment_provider: Orb::Models::CustomerCreateParams::payment_provider?, payment_provider_id: String?, - reporting_configuration: Orb::Models::NewReportingConfigurationModel?, - shipping_address: Orb::Models::AddressInputModel?, - tax_configuration: Orb::Models::new_tax_configuration_model?, - tax_id: Orb::Models::CustomerTaxIDModel?, + reporting_configuration: Orb::Models::CustomerCreateParams::ReportingConfiguration?, + shipping_address: Orb::Models::CustomerCreateParams::ShippingAddress?, + tax_configuration: Orb::Models::CustomerCreateParams::tax_configuration?, + tax_id: Orb::Models::CustomerCreateParams::TaxID?, timezone: String? } & Orb::request_parameters @@ -31,13 +31,13 @@ module Orb attr_accessor name: String - attr_accessor accounting_sync_configuration: Orb::Models::NewAccountingSyncConfigurationModel? + attr_accessor accounting_sync_configuration: Orb::Models::CustomerCreateParams::AccountingSyncConfiguration? attr_accessor additional_emails: ::Array[String]? attr_accessor auto_collection: bool? - attr_accessor billing_address: Orb::Models::AddressInputModel? + attr_accessor billing_address: Orb::Models::CustomerCreateParams::BillingAddress? attr_accessor currency: String? @@ -45,7 +45,7 @@ module Orb attr_accessor external_customer_id: String? - attr_accessor hierarchy: Orb::Models::CustomerHierarchyConfigModel? + attr_accessor hierarchy: Orb::Models::CustomerCreateParams::Hierarchy? attr_accessor metadata: ::Hash[Symbol, String?]? @@ -53,13 +53,13 @@ module Orb attr_accessor payment_provider_id: String? - attr_accessor reporting_configuration: Orb::Models::NewReportingConfigurationModel? + attr_accessor reporting_configuration: Orb::Models::CustomerCreateParams::ReportingConfiguration? - attr_accessor shipping_address: Orb::Models::AddressInputModel? + attr_accessor shipping_address: Orb::Models::CustomerCreateParams::ShippingAddress? - attr_accessor tax_configuration: Orb::Models::new_tax_configuration_model? + attr_accessor tax_configuration: Orb::Models::CustomerCreateParams::tax_configuration? - attr_accessor tax_id: Orb::Models::CustomerTaxIDModel? + attr_accessor tax_id: Orb::Models::CustomerCreateParams::TaxID? attr_accessor timezone: String? @@ -67,21 +67,21 @@ module Orb ( email: String, name: String, - accounting_sync_configuration: Orb::Models::NewAccountingSyncConfigurationModel?, + accounting_sync_configuration: Orb::Models::CustomerCreateParams::AccountingSyncConfiguration?, additional_emails: ::Array[String]?, auto_collection: bool?, - billing_address: Orb::Models::AddressInputModel?, + billing_address: Orb::Models::CustomerCreateParams::BillingAddress?, currency: String?, email_delivery: bool?, external_customer_id: String?, - hierarchy: Orb::Models::CustomerHierarchyConfigModel?, + hierarchy: Orb::Models::CustomerCreateParams::Hierarchy?, metadata: ::Hash[Symbol, String?]?, payment_provider: Orb::Models::CustomerCreateParams::payment_provider?, payment_provider_id: String?, - reporting_configuration: Orb::Models::NewReportingConfigurationModel?, - shipping_address: Orb::Models::AddressInputModel?, - tax_configuration: Orb::Models::new_tax_configuration_model?, - tax_id: Orb::Models::CustomerTaxIDModel?, + reporting_configuration: Orb::Models::CustomerCreateParams::ReportingConfiguration?, + shipping_address: Orb::Models::CustomerCreateParams::ShippingAddress?, + tax_configuration: Orb::Models::CustomerCreateParams::tax_configuration?, + tax_id: Orb::Models::CustomerCreateParams::TaxID?, timezone: String?, request_options: Orb::request_opts ) -> void @@ -89,6 +89,110 @@ module Orb def to_hash: -> Orb::Models::customer_create_params + type accounting_sync_configuration = + { + accounting_providers: ::Array[Orb::Models::CustomerCreateParams::AccountingSyncConfiguration::AccountingProvider]?, + excluded: bool? + } + + class AccountingSyncConfiguration < Orb::BaseModel + attr_accessor accounting_providers: ::Array[Orb::Models::CustomerCreateParams::AccountingSyncConfiguration::AccountingProvider]? + + attr_accessor excluded: bool? + + def initialize: + ( + accounting_providers: ::Array[Orb::Models::CustomerCreateParams::AccountingSyncConfiguration::AccountingProvider]?, + excluded: bool? + ) -> void + | ( + ?Orb::Models::CustomerCreateParams::accounting_sync_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerCreateParams::accounting_sync_configuration + + type accounting_provider = + { external_provider_id: String, provider_type: String } + + class AccountingProvider < Orb::BaseModel + attr_accessor external_provider_id: String + + attr_accessor provider_type: String + + def initialize: + (external_provider_id: String, provider_type: String) -> void + | ( + ?Orb::Models::CustomerCreateParams::AccountingSyncConfiguration::accounting_provider + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerCreateParams::AccountingSyncConfiguration::accounting_provider + end + end + + type billing_address = + { + city: String?, + country: String?, + :line1 => String?, + :line2 => String?, + postal_code: String?, + state: String? + } + + class BillingAddress < Orb::BaseModel + attr_accessor city: String? + + attr_accessor country: String? + + attr_accessor line1: String? + + attr_accessor line2: String? + + attr_accessor postal_code: String? + + attr_accessor state: String? + + def initialize: + ( + city: String?, + country: String?, + line1: String?, + line2: String?, + postal_code: String?, + state: String? + ) -> void + | ( + ?Orb::Models::CustomerCreateParams::billing_address + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerCreateParams::billing_address + end + + type hierarchy = + { child_customer_ids: ::Array[String], parent_customer_id: String? } + + class Hierarchy < Orb::BaseModel + attr_reader child_customer_ids: ::Array[String]? + + def child_customer_ids=: (::Array[String]) -> ::Array[String] + + attr_accessor parent_customer_id: String? + + def initialize: + ( + child_customer_ids: ::Array[String], + parent_customer_id: String? + ) -> void + | ( + ?Orb::Models::CustomerCreateParams::hierarchy | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerCreateParams::hierarchy + end + type payment_provider = :quickbooks | :"bill.com" | :stripe_charge | :stripe_invoice | :netsuite @@ -101,6 +205,454 @@ module Orb def self.values: -> ::Array[Orb::Models::CustomerCreateParams::payment_provider] end + + type reporting_configuration = { exempt: bool } + + class ReportingConfiguration < Orb::BaseModel + attr_accessor exempt: bool + + def initialize: + (exempt: bool) -> void + | ( + ?Orb::Models::CustomerCreateParams::reporting_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerCreateParams::reporting_configuration + end + + type shipping_address = + { + city: String?, + country: String?, + :line1 => String?, + :line2 => String?, + postal_code: String?, + state: String? + } + + class ShippingAddress < Orb::BaseModel + attr_accessor city: String? + + attr_accessor country: String? + + attr_accessor line1: String? + + attr_accessor line2: String? + + attr_accessor postal_code: String? + + attr_accessor state: String? + + def initialize: + ( + city: String?, + country: String?, + line1: String?, + line2: String?, + postal_code: String?, + state: String? + ) -> void + | ( + ?Orb::Models::CustomerCreateParams::shipping_address + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerCreateParams::shipping_address + end + + type tax_configuration = + Orb::Models::CustomerCreateParams::TaxConfiguration::NewAvalaraTaxConfiguration + | Orb::Models::CustomerCreateParams::TaxConfiguration::NewTaxJarConfiguration + + class TaxConfiguration < Orb::Union + type new_avalara_tax_configuration = + { + tax_exempt: bool, + tax_provider: :avalara, + tax_exemption_code: String? + } + + class NewAvalaraTaxConfiguration < Orb::BaseModel + attr_accessor tax_exempt: bool + + attr_accessor tax_provider: :avalara + + attr_accessor tax_exemption_code: String? + + def initialize: + ( + tax_exempt: bool, + tax_exemption_code: String?, + tax_provider: :avalara + ) -> void + | ( + ?Orb::Models::CustomerCreateParams::TaxConfiguration::new_avalara_tax_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerCreateParams::TaxConfiguration::new_avalara_tax_configuration + end + + type new_tax_jar_configuration = + { tax_exempt: bool, tax_provider: :taxjar } + + class NewTaxJarConfiguration < Orb::BaseModel + attr_accessor tax_exempt: bool + + attr_accessor tax_provider: :taxjar + + def initialize: + (tax_exempt: bool, tax_provider: :taxjar) -> void + | ( + ?Orb::Models::CustomerCreateParams::TaxConfiguration::new_tax_jar_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerCreateParams::TaxConfiguration::new_tax_jar_configuration + end + + private def self.variants: -> [[:avalara, Orb::Models::CustomerCreateParams::TaxConfiguration::NewAvalaraTaxConfiguration], [:taxjar, Orb::Models::CustomerCreateParams::TaxConfiguration::NewTaxJarConfiguration]] + end + + type tax_id = + { + country: Orb::Models::CustomerCreateParams::TaxID::country, + type: Orb::Models::CustomerCreateParams::TaxID::type_, + value: String + } + + class TaxID < Orb::BaseModel + attr_accessor country: Orb::Models::CustomerCreateParams::TaxID::country + + attr_accessor type: Orb::Models::CustomerCreateParams::TaxID::type_ + + attr_accessor value: String + + def initialize: + ( + country: Orb::Models::CustomerCreateParams::TaxID::country, + type: Orb::Models::CustomerCreateParams::TaxID::type_, + value: String + ) -> void + | ( + ?Orb::Models::CustomerCreateParams::tax_id | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerCreateParams::tax_id + + type country = + :AD + | :AE + | :AR + | :AT + | :AU + | :BE + | :BG + | :BH + | :BO + | :BR + | :CA + | :CH + | :CL + | :CN + | :CO + | :CR + | :CY + | :CZ + | :DE + | :DK + | :EE + | :DO + | :EC + | :EG + | :ES + | :EU + | :FI + | :FR + | :GB + | :GE + | :GR + | :HK + | :HR + | :HU + | :ID + | :IE + | :IL + | :IN + | :IS + | :IT + | :JP + | :KE + | :KR + | :KZ + | :LI + | :LT + | :LU + | :LV + | :MT + | :MX + | :MY + | :NG + | :NL + | :NO + | :NZ + | :OM + | :PE + | :PH + | :PL + | :PT + | :RO + | :RS + | :RU + | :SA + | :SE + | :SG + | :SI + | :SK + | :SV + | :TH + | :TR + | :TW + | :UA + | :US + | :UY + | :VE + | :VN + | :ZA + + class Country < Orb::Enum + AD: :AD + AE: :AE + AR: :AR + AT: :AT + AU: :AU + BE: :BE + BG: :BG + BH: :BH + BO: :BO + BR: :BR + CA: :CA + CH: :CH + CL: :CL + CN: :CN + CO: :CO + CR: :CR + CY: :CY + CZ: :CZ + DE: :DE + DK: :DK + EE: :EE + DO: :DO + EC: :EC + EG: :EG + ES: :ES + EU: :EU + FI: :FI + FR: :FR + GB: :GB + GE: :GE + GR: :GR + HK: :HK + HR: :HR + HU: :HU + ID: :ID + IE: :IE + IL: :IL + IN: :IN + IS: :IS + IT: :IT + JP: :JP + KE: :KE + KR: :KR + KZ: :KZ + LI: :LI + LT: :LT + LU: :LU + LV: :LV + MT: :MT + MX: :MX + MY: :MY + NG: :NG + NL: :NL + NO: :NO + NZ: :NZ + OM: :OM + PE: :PE + PH: :PH + PL: :PL + PT: :PT + RO: :RO + RS: :RS + RU: :RU + SA: :SA + SE: :SE + SG: :SG + SI: :SI + SK: :SK + SV: :SV + TH: :TH + TR: :TR + TW: :TW + UA: :UA + US: :US + UY: :UY + VE: :VE + VN: :VN + ZA: :ZA + + def self.values: -> ::Array[Orb::Models::CustomerCreateParams::TaxID::country] + end + + type type_ = + :ad_nrt + | :ae_trn + | :ar_cuit + | :eu_vat + | :au_abn + | :au_arn + | :bg_uic + | :bh_vat + | :bo_tin + | :br_cnpj + | :br_cpf + | :ca_bn + | :ca_gst_hst + | :ca_pst_bc + | :ca_pst_mb + | :ca_pst_sk + | :ca_qst + | :ch_vat + | :cl_tin + | :cn_tin + | :co_nit + | :cr_tin + | :do_rcn + | :ec_ruc + | :eg_tin + | :es_cif + | :eu_oss_vat + | :gb_vat + | :ge_vat + | :hk_br + | :hu_tin + | :id_npwp + | :il_vat + | :in_gst + | :is_vat + | :jp_cn + | :jp_rn + | :jp_trn + | :ke_pin + | :kr_brn + | :kz_bin + | :li_uid + | :mx_rfc + | :my_frp + | :my_itn + | :my_sst + | :ng_tin + | :no_vat + | :no_voec + | :nz_gst + | :om_vat + | :pe_ruc + | :ph_tin + | :ro_tin + | :rs_pib + | :ru_inn + | :ru_kpp + | :sa_vat + | :sg_gst + | :sg_uen + | :si_tin + | :sv_nit + | :th_vat + | :tr_tin + | :tw_vat + | :ua_vat + | :us_ein + | :uy_ruc + | :ve_rif + | :vn_tin + | :za_vat + + class Type < Orb::Enum + AD_NRT: :ad_nrt + AE_TRN: :ae_trn + AR_CUIT: :ar_cuit + EU_VAT: :eu_vat + AU_ABN: :au_abn + AU_ARN: :au_arn + BG_UIC: :bg_uic + BH_VAT: :bh_vat + BO_TIN: :bo_tin + BR_CNPJ: :br_cnpj + BR_CPF: :br_cpf + CA_BN: :ca_bn + CA_GST_HST: :ca_gst_hst + CA_PST_BC: :ca_pst_bc + CA_PST_MB: :ca_pst_mb + CA_PST_SK: :ca_pst_sk + CA_QST: :ca_qst + CH_VAT: :ch_vat + CL_TIN: :cl_tin + CN_TIN: :cn_tin + CO_NIT: :co_nit + CR_TIN: :cr_tin + DO_RCN: :do_rcn + EC_RUC: :ec_ruc + EG_TIN: :eg_tin + ES_CIF: :es_cif + EU_OSS_VAT: :eu_oss_vat + GB_VAT: :gb_vat + GE_VAT: :ge_vat + HK_BR: :hk_br + HU_TIN: :hu_tin + ID_NPWP: :id_npwp + IL_VAT: :il_vat + IN_GST: :in_gst + IS_VAT: :is_vat + JP_CN: :jp_cn + JP_RN: :jp_rn + JP_TRN: :jp_trn + KE_PIN: :ke_pin + KR_BRN: :kr_brn + KZ_BIN: :kz_bin + LI_UID: :li_uid + MX_RFC: :mx_rfc + MY_FRP: :my_frp + MY_ITN: :my_itn + MY_SST: :my_sst + NG_TIN: :ng_tin + NO_VAT: :no_vat + NO_VOEC: :no_voec + NZ_GST: :nz_gst + OM_VAT: :om_vat + PE_RUC: :pe_ruc + PH_TIN: :ph_tin + RO_TIN: :ro_tin + RS_PIB: :rs_pib + RU_INN: :ru_inn + RU_KPP: :ru_kpp + SA_VAT: :sa_vat + SG_GST: :sg_gst + SG_UEN: :sg_uen + SI_TIN: :si_tin + SV_NIT: :sv_nit + TH_VAT: :th_vat + TR_TIN: :tr_tin + TW_VAT: :tw_vat + UA_VAT: :ua_vat + US_EIN: :us_ein + UY_RUC: :uy_ruc + VE_RIF: :ve_rif + VN_TIN: :vn_tin + ZA_VAT: :za_vat + + def self.values: -> ::Array[Orb::Models::CustomerCreateParams::TaxID::type_] + end + end end end end diff --git a/sig/orb/models/customer_credit_balances_model.rbs b/sig/orb/models/customer_credit_balances_model.rbs deleted file mode 100644 index 0f4f8d04..00000000 --- a/sig/orb/models/customer_credit_balances_model.rbs +++ /dev/null @@ -1,79 +0,0 @@ -module Orb - module Models - type customer_credit_balances_model = - { - data: ::Array[Orb::Models::CustomerCreditBalancesModel::Data], - pagination_metadata: Orb::Models::PaginationMetadata - } - - class CustomerCreditBalancesModel < Orb::BaseModel - attr_accessor data: ::Array[Orb::Models::CustomerCreditBalancesModel::Data] - - attr_accessor pagination_metadata: Orb::Models::PaginationMetadata - - def initialize: - ( - data: ::Array[Orb::Models::CustomerCreditBalancesModel::Data], - pagination_metadata: Orb::Models::PaginationMetadata - ) -> void - | ( - ?Orb::Models::customer_credit_balances_model | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::customer_credit_balances_model - - type data = - { - id: String, - balance: Float, - effective_date: Time?, - expiry_date: Time?, - maximum_initial_balance: Float?, - per_unit_cost_basis: String?, - status: Orb::Models::CustomerCreditBalancesModel::Data::status - } - - class Data < Orb::BaseModel - attr_accessor id: String - - attr_accessor balance: Float - - attr_accessor effective_date: Time? - - attr_accessor expiry_date: Time? - - attr_accessor maximum_initial_balance: Float? - - attr_accessor per_unit_cost_basis: String? - - attr_accessor status: Orb::Models::CustomerCreditBalancesModel::Data::status - - def initialize: - ( - id: String, - balance: Float, - effective_date: Time?, - expiry_date: Time?, - maximum_initial_balance: Float?, - per_unit_cost_basis: String?, - status: Orb::Models::CustomerCreditBalancesModel::Data::status - ) -> void - | ( - ?Orb::Models::CustomerCreditBalancesModel::data - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::CustomerCreditBalancesModel::data - - type status = :active | :pending_payment - - class Status < Orb::Enum - ACTIVE: :active - PENDING_PAYMENT: :pending_payment - - def self.values: -> ::Array[Orb::Models::CustomerCreditBalancesModel::Data::status] - end - end - end - end -end diff --git a/sig/orb/models/customer_hierarchy_config_model.rbs b/sig/orb/models/customer_hierarchy_config_model.rbs deleted file mode 100644 index 7d9e9d98..00000000 --- a/sig/orb/models/customer_hierarchy_config_model.rbs +++ /dev/null @@ -1,25 +0,0 @@ -module Orb - module Models - type customer_hierarchy_config_model = - { child_customer_ids: ::Array[String], parent_customer_id: String? } - - class CustomerHierarchyConfigModel < Orb::BaseModel - attr_reader child_customer_ids: ::Array[String]? - - def child_customer_ids=: (::Array[String]) -> ::Array[String] - - attr_accessor parent_customer_id: String? - - def initialize: - ( - child_customer_ids: ::Array[String], - parent_customer_id: String? - ) -> void - | ( - ?Orb::Models::customer_hierarchy_config_model | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::customer_hierarchy_config_model - end - end -end diff --git a/sig/orb/models/customer_minified_model.rbs b/sig/orb/models/customer_minified_model.rbs deleted file mode 100644 index 24beef02..00000000 --- a/sig/orb/models/customer_minified_model.rbs +++ /dev/null @@ -1,17 +0,0 @@ -module Orb - module Models - type customer_minified_model = { id: String, external_customer_id: String? } - - class CustomerMinifiedModel < Orb::BaseModel - attr_accessor id: String - - attr_accessor external_customer_id: String? - - def initialize: - (id: String, external_customer_id: String?) -> void - | (?Orb::Models::customer_minified_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::customer_minified_model - end - end -end diff --git a/sig/orb/models/customer_model.rbs b/sig/orb/models/customer_model.rbs deleted file mode 100644 index 759f4cc0..00000000 --- a/sig/orb/models/customer_model.rbs +++ /dev/null @@ -1,212 +0,0 @@ -module Orb - module Models - type customer_model = - { - id: String, - additional_emails: ::Array[String], - auto_collection: bool, - balance: String, - billing_address: Orb::Models::AddressModel?, - created_at: Time, - currency: String?, - email: String, - email_delivery: bool, - exempt_from_automated_tax: bool?, - external_customer_id: String?, - hierarchy: Orb::Models::CustomerModel::Hierarchy, - metadata: ::Hash[Symbol, String], - name: String, - payment_provider: Orb::Models::CustomerModel::payment_provider?, - payment_provider_id: String?, - portal_url: String?, - shipping_address: Orb::Models::AddressModel?, - tax_id: Orb::Models::CustomerTaxIDModel?, - timezone: String, - accounting_sync_configuration: Orb::Models::CustomerModel::AccountingSyncConfiguration?, - reporting_configuration: Orb::Models::CustomerModel::ReportingConfiguration? - } - - class CustomerModel < Orb::BaseModel - attr_accessor id: String - - attr_accessor additional_emails: ::Array[String] - - attr_accessor auto_collection: bool - - attr_accessor balance: String - - attr_accessor billing_address: Orb::Models::AddressModel? - - attr_accessor created_at: Time - - attr_accessor currency: String? - - attr_accessor email: String - - attr_accessor email_delivery: bool - - attr_accessor exempt_from_automated_tax: bool? - - attr_accessor external_customer_id: String? - - attr_accessor hierarchy: Orb::Models::CustomerModel::Hierarchy - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor name: String - - attr_accessor payment_provider: Orb::Models::CustomerModel::payment_provider? - - attr_accessor payment_provider_id: String? - - attr_accessor portal_url: String? - - attr_accessor shipping_address: Orb::Models::AddressModel? - - attr_accessor tax_id: Orb::Models::CustomerTaxIDModel? - - attr_accessor timezone: String - - attr_accessor accounting_sync_configuration: Orb::Models::CustomerModel::AccountingSyncConfiguration? - - attr_accessor reporting_configuration: Orb::Models::CustomerModel::ReportingConfiguration? - - def initialize: - ( - id: String, - additional_emails: ::Array[String], - auto_collection: bool, - balance: String, - billing_address: Orb::Models::AddressModel?, - created_at: Time, - currency: String?, - email: String, - email_delivery: bool, - exempt_from_automated_tax: bool?, - external_customer_id: String?, - hierarchy: Orb::Models::CustomerModel::Hierarchy, - metadata: ::Hash[Symbol, String], - name: String, - payment_provider: Orb::Models::CustomerModel::payment_provider?, - payment_provider_id: String?, - portal_url: String?, - shipping_address: Orb::Models::AddressModel?, - tax_id: Orb::Models::CustomerTaxIDModel?, - timezone: String, - accounting_sync_configuration: Orb::Models::CustomerModel::AccountingSyncConfiguration?, - reporting_configuration: Orb::Models::CustomerModel::ReportingConfiguration? - ) -> void - | (?Orb::Models::customer_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::customer_model - - type hierarchy = - { - children: ::Array[Orb::Models::CustomerMinifiedModel], - parent: Orb::Models::CustomerMinifiedModel? - } - - class Hierarchy < Orb::BaseModel - attr_accessor children: ::Array[Orb::Models::CustomerMinifiedModel] - - attr_accessor parent: Orb::Models::CustomerMinifiedModel? - - def initialize: - ( - children: ::Array[Orb::Models::CustomerMinifiedModel], - parent: Orb::Models::CustomerMinifiedModel? - ) -> void - | ( - ?Orb::Models::CustomerModel::hierarchy | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::CustomerModel::hierarchy - end - - type payment_provider = - :quickbooks | :"bill.com" | :stripe_charge | :stripe_invoice | :netsuite - - class PaymentProvider < Orb::Enum - QUICKBOOKS: :quickbooks - BILL_COM: :"bill.com" - STRIPE_CHARGE: :stripe_charge - STRIPE_INVOICE: :stripe_invoice - NETSUITE: :netsuite - - def self.values: -> ::Array[Orb::Models::CustomerModel::payment_provider] - end - - type accounting_sync_configuration = - { - accounting_providers: ::Array[Orb::Models::CustomerModel::AccountingSyncConfiguration::AccountingProvider], - excluded: bool - } - - class AccountingSyncConfiguration < Orb::BaseModel - attr_accessor accounting_providers: ::Array[Orb::Models::CustomerModel::AccountingSyncConfiguration::AccountingProvider] - - attr_accessor excluded: bool - - def initialize: - ( - accounting_providers: ::Array[Orb::Models::CustomerModel::AccountingSyncConfiguration::AccountingProvider], - excluded: bool - ) -> void - | ( - ?Orb::Models::CustomerModel::accounting_sync_configuration - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::CustomerModel::accounting_sync_configuration - - type accounting_provider = - { - external_provider_id: String?, - provider_type: Orb::Models::CustomerModel::AccountingSyncConfiguration::AccountingProvider::provider_type - } - - class AccountingProvider < Orb::BaseModel - attr_accessor external_provider_id: String? - - attr_accessor provider_type: Orb::Models::CustomerModel::AccountingSyncConfiguration::AccountingProvider::provider_type - - def initialize: - ( - external_provider_id: String?, - provider_type: Orb::Models::CustomerModel::AccountingSyncConfiguration::AccountingProvider::provider_type - ) -> void - | ( - ?Orb::Models::CustomerModel::AccountingSyncConfiguration::accounting_provider - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::CustomerModel::AccountingSyncConfiguration::accounting_provider - - type provider_type = :quickbooks | :netsuite - - class ProviderType < Orb::Enum - QUICKBOOKS: :quickbooks - NETSUITE: :netsuite - - def self.values: -> ::Array[Orb::Models::CustomerModel::AccountingSyncConfiguration::AccountingProvider::provider_type] - end - end - end - - type reporting_configuration = { exempt: bool } - - class ReportingConfiguration < Orb::BaseModel - attr_accessor exempt: bool - - def initialize: - (exempt: bool) -> void - | ( - ?Orb::Models::CustomerModel::reporting_configuration - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::CustomerModel::reporting_configuration - end - end - end -end diff --git a/sig/orb/models/customer_tax_id_model.rbs b/sig/orb/models/customer_tax_id_model.rbs deleted file mode 100644 index 37da1a6a..00000000 --- a/sig/orb/models/customer_tax_id_model.rbs +++ /dev/null @@ -1,340 +0,0 @@ -module Orb - module Models - type customer_tax_id_model = - { - country: Orb::Models::CustomerTaxIDModel::country, - type: Orb::Models::CustomerTaxIDModel::type_, - value: String - } - - class CustomerTaxIDModel < Orb::BaseModel - attr_accessor country: Orb::Models::CustomerTaxIDModel::country - - attr_accessor type: Orb::Models::CustomerTaxIDModel::type_ - - attr_accessor value: String - - def initialize: - ( - country: Orb::Models::CustomerTaxIDModel::country, - type: Orb::Models::CustomerTaxIDModel::type_, - value: String - ) -> void - | (?Orb::Models::customer_tax_id_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::customer_tax_id_model - - type country = - :AD - | :AE - | :AR - | :AT - | :AU - | :BE - | :BG - | :BH - | :BO - | :BR - | :CA - | :CH - | :CL - | :CN - | :CO - | :CR - | :CY - | :CZ - | :DE - | :DK - | :EE - | :DO - | :EC - | :EG - | :ES - | :EU - | :FI - | :FR - | :GB - | :GE - | :GR - | :HK - | :HR - | :HU - | :ID - | :IE - | :IL - | :IN - | :IS - | :IT - | :JP - | :KE - | :KR - | :KZ - | :LI - | :LT - | :LU - | :LV - | :MT - | :MX - | :MY - | :NG - | :NL - | :NO - | :NZ - | :OM - | :PE - | :PH - | :PL - | :PT - | :RO - | :RS - | :RU - | :SA - | :SE - | :SG - | :SI - | :SK - | :SV - | :TH - | :TR - | :TW - | :UA - | :US - | :UY - | :VE - | :VN - | :ZA - - class Country < Orb::Enum - AD: :AD - AE: :AE - AR: :AR - AT: :AT - AU: :AU - BE: :BE - BG: :BG - BH: :BH - BO: :BO - BR: :BR - CA: :CA - CH: :CH - CL: :CL - CN: :CN - CO: :CO - CR: :CR - CY: :CY - CZ: :CZ - DE: :DE - DK: :DK - EE: :EE - DO: :DO - EC: :EC - EG: :EG - ES: :ES - EU: :EU - FI: :FI - FR: :FR - GB: :GB - GE: :GE - GR: :GR - HK: :HK - HR: :HR - HU: :HU - ID: :ID - IE: :IE - IL: :IL - IN: :IN - IS: :IS - IT: :IT - JP: :JP - KE: :KE - KR: :KR - KZ: :KZ - LI: :LI - LT: :LT - LU: :LU - LV: :LV - MT: :MT - MX: :MX - MY: :MY - NG: :NG - NL: :NL - NO: :NO - NZ: :NZ - OM: :OM - PE: :PE - PH: :PH - PL: :PL - PT: :PT - RO: :RO - RS: :RS - RU: :RU - SA: :SA - SE: :SE - SG: :SG - SI: :SI - SK: :SK - SV: :SV - TH: :TH - TR: :TR - TW: :TW - UA: :UA - US: :US - UY: :UY - VE: :VE - VN: :VN - ZA: :ZA - - def self.values: -> ::Array[Orb::Models::CustomerTaxIDModel::country] - end - - type type_ = - :ad_nrt - | :ae_trn - | :ar_cuit - | :eu_vat - | :au_abn - | :au_arn - | :bg_uic - | :bh_vat - | :bo_tin - | :br_cnpj - | :br_cpf - | :ca_bn - | :ca_gst_hst - | :ca_pst_bc - | :ca_pst_mb - | :ca_pst_sk - | :ca_qst - | :ch_vat - | :cl_tin - | :cn_tin - | :co_nit - | :cr_tin - | :do_rcn - | :ec_ruc - | :eg_tin - | :es_cif - | :eu_oss_vat - | :gb_vat - | :ge_vat - | :hk_br - | :hu_tin - | :id_npwp - | :il_vat - | :in_gst - | :is_vat - | :jp_cn - | :jp_rn - | :jp_trn - | :ke_pin - | :kr_brn - | :kz_bin - | :li_uid - | :mx_rfc - | :my_frp - | :my_itn - | :my_sst - | :ng_tin - | :no_vat - | :no_voec - | :nz_gst - | :om_vat - | :pe_ruc - | :ph_tin - | :ro_tin - | :rs_pib - | :ru_inn - | :ru_kpp - | :sa_vat - | :sg_gst - | :sg_uen - | :si_tin - | :sv_nit - | :th_vat - | :tr_tin - | :tw_vat - | :ua_vat - | :us_ein - | :uy_ruc - | :ve_rif - | :vn_tin - | :za_vat - - class Type < Orb::Enum - AD_NRT: :ad_nrt - AE_TRN: :ae_trn - AR_CUIT: :ar_cuit - EU_VAT: :eu_vat - AU_ABN: :au_abn - AU_ARN: :au_arn - BG_UIC: :bg_uic - BH_VAT: :bh_vat - BO_TIN: :bo_tin - BR_CNPJ: :br_cnpj - BR_CPF: :br_cpf - CA_BN: :ca_bn - CA_GST_HST: :ca_gst_hst - CA_PST_BC: :ca_pst_bc - CA_PST_MB: :ca_pst_mb - CA_PST_SK: :ca_pst_sk - CA_QST: :ca_qst - CH_VAT: :ch_vat - CL_TIN: :cl_tin - CN_TIN: :cn_tin - CO_NIT: :co_nit - CR_TIN: :cr_tin - DO_RCN: :do_rcn - EC_RUC: :ec_ruc - EG_TIN: :eg_tin - ES_CIF: :es_cif - EU_OSS_VAT: :eu_oss_vat - GB_VAT: :gb_vat - GE_VAT: :ge_vat - HK_BR: :hk_br - HU_TIN: :hu_tin - ID_NPWP: :id_npwp - IL_VAT: :il_vat - IN_GST: :in_gst - IS_VAT: :is_vat - JP_CN: :jp_cn - JP_RN: :jp_rn - JP_TRN: :jp_trn - KE_PIN: :ke_pin - KR_BRN: :kr_brn - KZ_BIN: :kz_bin - LI_UID: :li_uid - MX_RFC: :mx_rfc - MY_FRP: :my_frp - MY_ITN: :my_itn - MY_SST: :my_sst - NG_TIN: :ng_tin - NO_VAT: :no_vat - NO_VOEC: :no_voec - NZ_GST: :nz_gst - OM_VAT: :om_vat - PE_RUC: :pe_ruc - PH_TIN: :ph_tin - RO_TIN: :ro_tin - RS_PIB: :rs_pib - RU_INN: :ru_inn - RU_KPP: :ru_kpp - SA_VAT: :sa_vat - SG_GST: :sg_gst - SG_UEN: :sg_uen - SI_TIN: :si_tin - SV_NIT: :sv_nit - TH_VAT: :th_vat - TR_TIN: :tr_tin - TW_VAT: :tw_vat - UA_VAT: :ua_vat - US_EIN: :us_ein - UY_RUC: :uy_ruc - VE_RIF: :ve_rif - VN_TIN: :vn_tin - ZA_VAT: :za_vat - - def self.values: -> ::Array[Orb::Models::CustomerTaxIDModel::type_] - end - end - end -end diff --git a/sig/orb/models/customer_update_by_external_id_params.rbs b/sig/orb/models/customer_update_by_external_id_params.rbs index ae5f585f..e3e9b2ca 100644 --- a/sig/orb/models/customer_update_by_external_id_params.rbs +++ b/sig/orb/models/customer_update_by_external_id_params.rbs @@ -1,19 +1,659 @@ module Orb module Models - type customer_update_by_external_id_params = { } & Orb::request_parameters + type customer_update_by_external_id_params = + { + accounting_sync_configuration: Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration?, + additional_emails: ::Array[String]?, + auto_collection: bool?, + billing_address: Orb::Models::CustomerUpdateByExternalIDParams::BillingAddress?, + currency: String?, + email: String?, + email_delivery: bool?, + external_customer_id: String?, + hierarchy: Orb::Models::CustomerUpdateByExternalIDParams::Hierarchy?, + metadata: ::Hash[Symbol, String?]?, + name: String?, + payment_provider: Orb::Models::CustomerUpdateByExternalIDParams::payment_provider?, + payment_provider_id: String?, + reporting_configuration: Orb::Models::CustomerUpdateByExternalIDParams::ReportingConfiguration?, + shipping_address: Orb::Models::CustomerUpdateByExternalIDParams::ShippingAddress?, + tax_configuration: Orb::Models::CustomerUpdateByExternalIDParams::tax_configuration?, + tax_id: Orb::Models::CustomerUpdateByExternalIDParams::TaxID? + } + & Orb::request_parameters - class CustomerUpdateByExternalIDParams < Orb::Models::EditCustomerModel + class CustomerUpdateByExternalIDParams < Orb::BaseModel extend Orb::RequestParameters::Converter include Orb::RequestParameters + attr_accessor accounting_sync_configuration: Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration? + + attr_accessor additional_emails: ::Array[String]? + + attr_accessor auto_collection: bool? + + attr_accessor billing_address: Orb::Models::CustomerUpdateByExternalIDParams::BillingAddress? + + attr_accessor currency: String? + + attr_accessor email: String? + + attr_accessor email_delivery: bool? + + attr_accessor external_customer_id: String? + + attr_accessor hierarchy: Orb::Models::CustomerUpdateByExternalIDParams::Hierarchy? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor name: String? + + attr_accessor payment_provider: Orb::Models::CustomerUpdateByExternalIDParams::payment_provider? + + attr_accessor payment_provider_id: String? + + attr_accessor reporting_configuration: Orb::Models::CustomerUpdateByExternalIDParams::ReportingConfiguration? + + attr_accessor shipping_address: Orb::Models::CustomerUpdateByExternalIDParams::ShippingAddress? + + attr_accessor tax_configuration: Orb::Models::CustomerUpdateByExternalIDParams::tax_configuration? + + attr_accessor tax_id: Orb::Models::CustomerUpdateByExternalIDParams::TaxID? + def initialize: - (request_options: Orb::request_opts) -> void + ( + accounting_sync_configuration: Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration?, + additional_emails: ::Array[String]?, + auto_collection: bool?, + billing_address: Orb::Models::CustomerUpdateByExternalIDParams::BillingAddress?, + currency: String?, + email: String?, + email_delivery: bool?, + external_customer_id: String?, + hierarchy: Orb::Models::CustomerUpdateByExternalIDParams::Hierarchy?, + metadata: ::Hash[Symbol, String?]?, + name: String?, + payment_provider: Orb::Models::CustomerUpdateByExternalIDParams::payment_provider?, + payment_provider_id: String?, + reporting_configuration: Orb::Models::CustomerUpdateByExternalIDParams::ReportingConfiguration?, + shipping_address: Orb::Models::CustomerUpdateByExternalIDParams::ShippingAddress?, + tax_configuration: Orb::Models::CustomerUpdateByExternalIDParams::tax_configuration?, + tax_id: Orb::Models::CustomerUpdateByExternalIDParams::TaxID?, + request_options: Orb::request_opts + ) -> void | ( ?Orb::Models::customer_update_by_external_id_params | Orb::BaseModel data ) -> void def to_hash: -> Orb::Models::customer_update_by_external_id_params + + type accounting_sync_configuration = + { + accounting_providers: ::Array[Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration::AccountingProvider]?, + excluded: bool? + } + + class AccountingSyncConfiguration < Orb::BaseModel + attr_accessor accounting_providers: ::Array[Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration::AccountingProvider]? + + attr_accessor excluded: bool? + + def initialize: + ( + accounting_providers: ::Array[Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration::AccountingProvider]?, + excluded: bool? + ) -> void + | ( + ?Orb::Models::CustomerUpdateByExternalIDParams::accounting_sync_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerUpdateByExternalIDParams::accounting_sync_configuration + + type accounting_provider = + { external_provider_id: String, provider_type: String } + + class AccountingProvider < Orb::BaseModel + attr_accessor external_provider_id: String + + attr_accessor provider_type: String + + def initialize: + (external_provider_id: String, provider_type: String) -> void + | ( + ?Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration::accounting_provider + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration::accounting_provider + end + end + + type billing_address = + { + city: String?, + country: String?, + :line1 => String?, + :line2 => String?, + postal_code: String?, + state: String? + } + + class BillingAddress < Orb::BaseModel + attr_accessor city: String? + + attr_accessor country: String? + + attr_accessor line1: String? + + attr_accessor line2: String? + + attr_accessor postal_code: String? + + attr_accessor state: String? + + def initialize: + ( + city: String?, + country: String?, + line1: String?, + line2: String?, + postal_code: String?, + state: String? + ) -> void + | ( + ?Orb::Models::CustomerUpdateByExternalIDParams::billing_address + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerUpdateByExternalIDParams::billing_address + end + + type hierarchy = + { child_customer_ids: ::Array[String], parent_customer_id: String? } + + class Hierarchy < Orb::BaseModel + attr_reader child_customer_ids: ::Array[String]? + + def child_customer_ids=: (::Array[String]) -> ::Array[String] + + attr_accessor parent_customer_id: String? + + def initialize: + ( + child_customer_ids: ::Array[String], + parent_customer_id: String? + ) -> void + | ( + ?Orb::Models::CustomerUpdateByExternalIDParams::hierarchy + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerUpdateByExternalIDParams::hierarchy + end + + type payment_provider = + :quickbooks | :"bill.com" | :stripe_charge | :stripe_invoice | :netsuite + + class PaymentProvider < Orb::Enum + QUICKBOOKS: :quickbooks + BILL_COM: :"bill.com" + STRIPE_CHARGE: :stripe_charge + STRIPE_INVOICE: :stripe_invoice + NETSUITE: :netsuite + + def self.values: -> ::Array[Orb::Models::CustomerUpdateByExternalIDParams::payment_provider] + end + + type reporting_configuration = { exempt: bool } + + class ReportingConfiguration < Orb::BaseModel + attr_accessor exempt: bool + + def initialize: + (exempt: bool) -> void + | ( + ?Orb::Models::CustomerUpdateByExternalIDParams::reporting_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerUpdateByExternalIDParams::reporting_configuration + end + + type shipping_address = + { + city: String?, + country: String?, + :line1 => String?, + :line2 => String?, + postal_code: String?, + state: String? + } + + class ShippingAddress < Orb::BaseModel + attr_accessor city: String? + + attr_accessor country: String? + + attr_accessor line1: String? + + attr_accessor line2: String? + + attr_accessor postal_code: String? + + attr_accessor state: String? + + def initialize: + ( + city: String?, + country: String?, + line1: String?, + line2: String?, + postal_code: String?, + state: String? + ) -> void + | ( + ?Orb::Models::CustomerUpdateByExternalIDParams::shipping_address + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerUpdateByExternalIDParams::shipping_address + end + + type tax_configuration = + Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewAvalaraTaxConfiguration + | Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewTaxJarConfiguration + + class TaxConfiguration < Orb::Union + type new_avalara_tax_configuration = + { + tax_exempt: bool, + tax_provider: :avalara, + tax_exemption_code: String? + } + + class NewAvalaraTaxConfiguration < Orb::BaseModel + attr_accessor tax_exempt: bool + + attr_accessor tax_provider: :avalara + + attr_accessor tax_exemption_code: String? + + def initialize: + ( + tax_exempt: bool, + tax_exemption_code: String?, + tax_provider: :avalara + ) -> void + | ( + ?Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::new_avalara_tax_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::new_avalara_tax_configuration + end + + type new_tax_jar_configuration = + { tax_exempt: bool, tax_provider: :taxjar } + + class NewTaxJarConfiguration < Orb::BaseModel + attr_accessor tax_exempt: bool + + attr_accessor tax_provider: :taxjar + + def initialize: + (tax_exempt: bool, tax_provider: :taxjar) -> void + | ( + ?Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::new_tax_jar_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::new_tax_jar_configuration + end + + private def self.variants: -> [[:avalara, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewAvalaraTaxConfiguration], [:taxjar, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewTaxJarConfiguration]] + end + + type tax_id = + { + country: Orb::Models::CustomerUpdateByExternalIDParams::TaxID::country, + type: Orb::Models::CustomerUpdateByExternalIDParams::TaxID::type_, + value: String + } + + class TaxID < Orb::BaseModel + attr_accessor country: Orb::Models::CustomerUpdateByExternalIDParams::TaxID::country + + attr_accessor type: Orb::Models::CustomerUpdateByExternalIDParams::TaxID::type_ + + attr_accessor value: String + + def initialize: + ( + country: Orb::Models::CustomerUpdateByExternalIDParams::TaxID::country, + type: Orb::Models::CustomerUpdateByExternalIDParams::TaxID::type_, + value: String + ) -> void + | ( + ?Orb::Models::CustomerUpdateByExternalIDParams::tax_id + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerUpdateByExternalIDParams::tax_id + + type country = + :AD + | :AE + | :AR + | :AT + | :AU + | :BE + | :BG + | :BH + | :BO + | :BR + | :CA + | :CH + | :CL + | :CN + | :CO + | :CR + | :CY + | :CZ + | :DE + | :DK + | :EE + | :DO + | :EC + | :EG + | :ES + | :EU + | :FI + | :FR + | :GB + | :GE + | :GR + | :HK + | :HR + | :HU + | :ID + | :IE + | :IL + | :IN + | :IS + | :IT + | :JP + | :KE + | :KR + | :KZ + | :LI + | :LT + | :LU + | :LV + | :MT + | :MX + | :MY + | :NG + | :NL + | :NO + | :NZ + | :OM + | :PE + | :PH + | :PL + | :PT + | :RO + | :RS + | :RU + | :SA + | :SE + | :SG + | :SI + | :SK + | :SV + | :TH + | :TR + | :TW + | :UA + | :US + | :UY + | :VE + | :VN + | :ZA + + class Country < Orb::Enum + AD: :AD + AE: :AE + AR: :AR + AT: :AT + AU: :AU + BE: :BE + BG: :BG + BH: :BH + BO: :BO + BR: :BR + CA: :CA + CH: :CH + CL: :CL + CN: :CN + CO: :CO + CR: :CR + CY: :CY + CZ: :CZ + DE: :DE + DK: :DK + EE: :EE + DO: :DO + EC: :EC + EG: :EG + ES: :ES + EU: :EU + FI: :FI + FR: :FR + GB: :GB + GE: :GE + GR: :GR + HK: :HK + HR: :HR + HU: :HU + ID: :ID + IE: :IE + IL: :IL + IN: :IN + IS: :IS + IT: :IT + JP: :JP + KE: :KE + KR: :KR + KZ: :KZ + LI: :LI + LT: :LT + LU: :LU + LV: :LV + MT: :MT + MX: :MX + MY: :MY + NG: :NG + NL: :NL + NO: :NO + NZ: :NZ + OM: :OM + PE: :PE + PH: :PH + PL: :PL + PT: :PT + RO: :RO + RS: :RS + RU: :RU + SA: :SA + SE: :SE + SG: :SG + SI: :SI + SK: :SK + SV: :SV + TH: :TH + TR: :TR + TW: :TW + UA: :UA + US: :US + UY: :UY + VE: :VE + VN: :VN + ZA: :ZA + + def self.values: -> ::Array[Orb::Models::CustomerUpdateByExternalIDParams::TaxID::country] + end + + type type_ = + :ad_nrt + | :ae_trn + | :ar_cuit + | :eu_vat + | :au_abn + | :au_arn + | :bg_uic + | :bh_vat + | :bo_tin + | :br_cnpj + | :br_cpf + | :ca_bn + | :ca_gst_hst + | :ca_pst_bc + | :ca_pst_mb + | :ca_pst_sk + | :ca_qst + | :ch_vat + | :cl_tin + | :cn_tin + | :co_nit + | :cr_tin + | :do_rcn + | :ec_ruc + | :eg_tin + | :es_cif + | :eu_oss_vat + | :gb_vat + | :ge_vat + | :hk_br + | :hu_tin + | :id_npwp + | :il_vat + | :in_gst + | :is_vat + | :jp_cn + | :jp_rn + | :jp_trn + | :ke_pin + | :kr_brn + | :kz_bin + | :li_uid + | :mx_rfc + | :my_frp + | :my_itn + | :my_sst + | :ng_tin + | :no_vat + | :no_voec + | :nz_gst + | :om_vat + | :pe_ruc + | :ph_tin + | :ro_tin + | :rs_pib + | :ru_inn + | :ru_kpp + | :sa_vat + | :sg_gst + | :sg_uen + | :si_tin + | :sv_nit + | :th_vat + | :tr_tin + | :tw_vat + | :ua_vat + | :us_ein + | :uy_ruc + | :ve_rif + | :vn_tin + | :za_vat + + class Type < Orb::Enum + AD_NRT: :ad_nrt + AE_TRN: :ae_trn + AR_CUIT: :ar_cuit + EU_VAT: :eu_vat + AU_ABN: :au_abn + AU_ARN: :au_arn + BG_UIC: :bg_uic + BH_VAT: :bh_vat + BO_TIN: :bo_tin + BR_CNPJ: :br_cnpj + BR_CPF: :br_cpf + CA_BN: :ca_bn + CA_GST_HST: :ca_gst_hst + CA_PST_BC: :ca_pst_bc + CA_PST_MB: :ca_pst_mb + CA_PST_SK: :ca_pst_sk + CA_QST: :ca_qst + CH_VAT: :ch_vat + CL_TIN: :cl_tin + CN_TIN: :cn_tin + CO_NIT: :co_nit + CR_TIN: :cr_tin + DO_RCN: :do_rcn + EC_RUC: :ec_ruc + EG_TIN: :eg_tin + ES_CIF: :es_cif + EU_OSS_VAT: :eu_oss_vat + GB_VAT: :gb_vat + GE_VAT: :ge_vat + HK_BR: :hk_br + HU_TIN: :hu_tin + ID_NPWP: :id_npwp + IL_VAT: :il_vat + IN_GST: :in_gst + IS_VAT: :is_vat + JP_CN: :jp_cn + JP_RN: :jp_rn + JP_TRN: :jp_trn + KE_PIN: :ke_pin + KR_BRN: :kr_brn + KZ_BIN: :kz_bin + LI_UID: :li_uid + MX_RFC: :mx_rfc + MY_FRP: :my_frp + MY_ITN: :my_itn + MY_SST: :my_sst + NG_TIN: :ng_tin + NO_VAT: :no_vat + NO_VOEC: :no_voec + NZ_GST: :nz_gst + OM_VAT: :om_vat + PE_RUC: :pe_ruc + PH_TIN: :ph_tin + RO_TIN: :ro_tin + RS_PIB: :rs_pib + RU_INN: :ru_inn + RU_KPP: :ru_kpp + SA_VAT: :sa_vat + SG_GST: :sg_gst + SG_UEN: :sg_uen + SI_TIN: :si_tin + SV_NIT: :sv_nit + TH_VAT: :th_vat + TR_TIN: :tr_tin + TW_VAT: :tw_vat + UA_VAT: :ua_vat + US_EIN: :us_ein + UY_RUC: :uy_ruc + VE_RIF: :ve_rif + VN_TIN: :vn_tin + ZA_VAT: :za_vat + + def self.values: -> ::Array[Orb::Models::CustomerUpdateByExternalIDParams::TaxID::type_] + end + end end end end diff --git a/sig/orb/models/customer_update_params.rbs b/sig/orb/models/customer_update_params.rbs index 8b447c0a..7f7b92d5 100644 --- a/sig/orb/models/customer_update_params.rbs +++ b/sig/orb/models/customer_update_params.rbs @@ -1,16 +1,654 @@ module Orb module Models - type customer_update_params = { } & Orb::request_parameters + type customer_update_params = + { + accounting_sync_configuration: Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration?, + additional_emails: ::Array[String]?, + auto_collection: bool?, + billing_address: Orb::Models::CustomerUpdateParams::BillingAddress?, + currency: String?, + email: String?, + email_delivery: bool?, + external_customer_id: String?, + hierarchy: Orb::Models::CustomerUpdateParams::Hierarchy?, + metadata: ::Hash[Symbol, String?]?, + name: String?, + payment_provider: Orb::Models::CustomerUpdateParams::payment_provider?, + payment_provider_id: String?, + reporting_configuration: Orb::Models::CustomerUpdateParams::ReportingConfiguration?, + shipping_address: Orb::Models::CustomerUpdateParams::ShippingAddress?, + tax_configuration: Orb::Models::CustomerUpdateParams::tax_configuration?, + tax_id: Orb::Models::CustomerUpdateParams::TaxID? + } + & Orb::request_parameters - class CustomerUpdateParams < Orb::Models::EditCustomerModel + class CustomerUpdateParams < Orb::BaseModel extend Orb::RequestParameters::Converter include Orb::RequestParameters + attr_accessor accounting_sync_configuration: Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration? + + attr_accessor additional_emails: ::Array[String]? + + attr_accessor auto_collection: bool? + + attr_accessor billing_address: Orb::Models::CustomerUpdateParams::BillingAddress? + + attr_accessor currency: String? + + attr_accessor email: String? + + attr_accessor email_delivery: bool? + + attr_accessor external_customer_id: String? + + attr_accessor hierarchy: Orb::Models::CustomerUpdateParams::Hierarchy? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor name: String? + + attr_accessor payment_provider: Orb::Models::CustomerUpdateParams::payment_provider? + + attr_accessor payment_provider_id: String? + + attr_accessor reporting_configuration: Orb::Models::CustomerUpdateParams::ReportingConfiguration? + + attr_accessor shipping_address: Orb::Models::CustomerUpdateParams::ShippingAddress? + + attr_accessor tax_configuration: Orb::Models::CustomerUpdateParams::tax_configuration? + + attr_accessor tax_id: Orb::Models::CustomerUpdateParams::TaxID? + def initialize: - (request_options: Orb::request_opts) -> void + ( + accounting_sync_configuration: Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration?, + additional_emails: ::Array[String]?, + auto_collection: bool?, + billing_address: Orb::Models::CustomerUpdateParams::BillingAddress?, + currency: String?, + email: String?, + email_delivery: bool?, + external_customer_id: String?, + hierarchy: Orb::Models::CustomerUpdateParams::Hierarchy?, + metadata: ::Hash[Symbol, String?]?, + name: String?, + payment_provider: Orb::Models::CustomerUpdateParams::payment_provider?, + payment_provider_id: String?, + reporting_configuration: Orb::Models::CustomerUpdateParams::ReportingConfiguration?, + shipping_address: Orb::Models::CustomerUpdateParams::ShippingAddress?, + tax_configuration: Orb::Models::CustomerUpdateParams::tax_configuration?, + tax_id: Orb::Models::CustomerUpdateParams::TaxID?, + request_options: Orb::request_opts + ) -> void | (?Orb::Models::customer_update_params | Orb::BaseModel data) -> void def to_hash: -> Orb::Models::customer_update_params + + type accounting_sync_configuration = + { + accounting_providers: ::Array[Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration::AccountingProvider]?, + excluded: bool? + } + + class AccountingSyncConfiguration < Orb::BaseModel + attr_accessor accounting_providers: ::Array[Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration::AccountingProvider]? + + attr_accessor excluded: bool? + + def initialize: + ( + accounting_providers: ::Array[Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration::AccountingProvider]?, + excluded: bool? + ) -> void + | ( + ?Orb::Models::CustomerUpdateParams::accounting_sync_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerUpdateParams::accounting_sync_configuration + + type accounting_provider = + { external_provider_id: String, provider_type: String } + + class AccountingProvider < Orb::BaseModel + attr_accessor external_provider_id: String + + attr_accessor provider_type: String + + def initialize: + (external_provider_id: String, provider_type: String) -> void + | ( + ?Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration::accounting_provider + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration::accounting_provider + end + end + + type billing_address = + { + city: String?, + country: String?, + :line1 => String?, + :line2 => String?, + postal_code: String?, + state: String? + } + + class BillingAddress < Orb::BaseModel + attr_accessor city: String? + + attr_accessor country: String? + + attr_accessor line1: String? + + attr_accessor line2: String? + + attr_accessor postal_code: String? + + attr_accessor state: String? + + def initialize: + ( + city: String?, + country: String?, + line1: String?, + line2: String?, + postal_code: String?, + state: String? + ) -> void + | ( + ?Orb::Models::CustomerUpdateParams::billing_address + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerUpdateParams::billing_address + end + + type hierarchy = + { child_customer_ids: ::Array[String], parent_customer_id: String? } + + class Hierarchy < Orb::BaseModel + attr_reader child_customer_ids: ::Array[String]? + + def child_customer_ids=: (::Array[String]) -> ::Array[String] + + attr_accessor parent_customer_id: String? + + def initialize: + ( + child_customer_ids: ::Array[String], + parent_customer_id: String? + ) -> void + | ( + ?Orb::Models::CustomerUpdateParams::hierarchy | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerUpdateParams::hierarchy + end + + type payment_provider = + :quickbooks | :"bill.com" | :stripe_charge | :stripe_invoice | :netsuite + + class PaymentProvider < Orb::Enum + QUICKBOOKS: :quickbooks + BILL_COM: :"bill.com" + STRIPE_CHARGE: :stripe_charge + STRIPE_INVOICE: :stripe_invoice + NETSUITE: :netsuite + + def self.values: -> ::Array[Orb::Models::CustomerUpdateParams::payment_provider] + end + + type reporting_configuration = { exempt: bool } + + class ReportingConfiguration < Orb::BaseModel + attr_accessor exempt: bool + + def initialize: + (exempt: bool) -> void + | ( + ?Orb::Models::CustomerUpdateParams::reporting_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerUpdateParams::reporting_configuration + end + + type shipping_address = + { + city: String?, + country: String?, + :line1 => String?, + :line2 => String?, + postal_code: String?, + state: String? + } + + class ShippingAddress < Orb::BaseModel + attr_accessor city: String? + + attr_accessor country: String? + + attr_accessor line1: String? + + attr_accessor line2: String? + + attr_accessor postal_code: String? + + attr_accessor state: String? + + def initialize: + ( + city: String?, + country: String?, + line1: String?, + line2: String?, + postal_code: String?, + state: String? + ) -> void + | ( + ?Orb::Models::CustomerUpdateParams::shipping_address + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerUpdateParams::shipping_address + end + + type tax_configuration = + Orb::Models::CustomerUpdateParams::TaxConfiguration::NewAvalaraTaxConfiguration + | Orb::Models::CustomerUpdateParams::TaxConfiguration::NewTaxJarConfiguration + + class TaxConfiguration < Orb::Union + type new_avalara_tax_configuration = + { + tax_exempt: bool, + tax_provider: :avalara, + tax_exemption_code: String? + } + + class NewAvalaraTaxConfiguration < Orb::BaseModel + attr_accessor tax_exempt: bool + + attr_accessor tax_provider: :avalara + + attr_accessor tax_exemption_code: String? + + def initialize: + ( + tax_exempt: bool, + tax_exemption_code: String?, + tax_provider: :avalara + ) -> void + | ( + ?Orb::Models::CustomerUpdateParams::TaxConfiguration::new_avalara_tax_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerUpdateParams::TaxConfiguration::new_avalara_tax_configuration + end + + type new_tax_jar_configuration = + { tax_exempt: bool, tax_provider: :taxjar } + + class NewTaxJarConfiguration < Orb::BaseModel + attr_accessor tax_exempt: bool + + attr_accessor tax_provider: :taxjar + + def initialize: + (tax_exempt: bool, tax_provider: :taxjar) -> void + | ( + ?Orb::Models::CustomerUpdateParams::TaxConfiguration::new_tax_jar_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerUpdateParams::TaxConfiguration::new_tax_jar_configuration + end + + private def self.variants: -> [[:avalara, Orb::Models::CustomerUpdateParams::TaxConfiguration::NewAvalaraTaxConfiguration], [:taxjar, Orb::Models::CustomerUpdateParams::TaxConfiguration::NewTaxJarConfiguration]] + end + + type tax_id = + { + country: Orb::Models::CustomerUpdateParams::TaxID::country, + type: Orb::Models::CustomerUpdateParams::TaxID::type_, + value: String + } + + class TaxID < Orb::BaseModel + attr_accessor country: Orb::Models::CustomerUpdateParams::TaxID::country + + attr_accessor type: Orb::Models::CustomerUpdateParams::TaxID::type_ + + attr_accessor value: String + + def initialize: + ( + country: Orb::Models::CustomerUpdateParams::TaxID::country, + type: Orb::Models::CustomerUpdateParams::TaxID::type_, + value: String + ) -> void + | ( + ?Orb::Models::CustomerUpdateParams::tax_id | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::CustomerUpdateParams::tax_id + + type country = + :AD + | :AE + | :AR + | :AT + | :AU + | :BE + | :BG + | :BH + | :BO + | :BR + | :CA + | :CH + | :CL + | :CN + | :CO + | :CR + | :CY + | :CZ + | :DE + | :DK + | :EE + | :DO + | :EC + | :EG + | :ES + | :EU + | :FI + | :FR + | :GB + | :GE + | :GR + | :HK + | :HR + | :HU + | :ID + | :IE + | :IL + | :IN + | :IS + | :IT + | :JP + | :KE + | :KR + | :KZ + | :LI + | :LT + | :LU + | :LV + | :MT + | :MX + | :MY + | :NG + | :NL + | :NO + | :NZ + | :OM + | :PE + | :PH + | :PL + | :PT + | :RO + | :RS + | :RU + | :SA + | :SE + | :SG + | :SI + | :SK + | :SV + | :TH + | :TR + | :TW + | :UA + | :US + | :UY + | :VE + | :VN + | :ZA + + class Country < Orb::Enum + AD: :AD + AE: :AE + AR: :AR + AT: :AT + AU: :AU + BE: :BE + BG: :BG + BH: :BH + BO: :BO + BR: :BR + CA: :CA + CH: :CH + CL: :CL + CN: :CN + CO: :CO + CR: :CR + CY: :CY + CZ: :CZ + DE: :DE + DK: :DK + EE: :EE + DO: :DO + EC: :EC + EG: :EG + ES: :ES + EU: :EU + FI: :FI + FR: :FR + GB: :GB + GE: :GE + GR: :GR + HK: :HK + HR: :HR + HU: :HU + ID: :ID + IE: :IE + IL: :IL + IN: :IN + IS: :IS + IT: :IT + JP: :JP + KE: :KE + KR: :KR + KZ: :KZ + LI: :LI + LT: :LT + LU: :LU + LV: :LV + MT: :MT + MX: :MX + MY: :MY + NG: :NG + NL: :NL + NO: :NO + NZ: :NZ + OM: :OM + PE: :PE + PH: :PH + PL: :PL + PT: :PT + RO: :RO + RS: :RS + RU: :RU + SA: :SA + SE: :SE + SG: :SG + SI: :SI + SK: :SK + SV: :SV + TH: :TH + TR: :TR + TW: :TW + UA: :UA + US: :US + UY: :UY + VE: :VE + VN: :VN + ZA: :ZA + + def self.values: -> ::Array[Orb::Models::CustomerUpdateParams::TaxID::country] + end + + type type_ = + :ad_nrt + | :ae_trn + | :ar_cuit + | :eu_vat + | :au_abn + | :au_arn + | :bg_uic + | :bh_vat + | :bo_tin + | :br_cnpj + | :br_cpf + | :ca_bn + | :ca_gst_hst + | :ca_pst_bc + | :ca_pst_mb + | :ca_pst_sk + | :ca_qst + | :ch_vat + | :cl_tin + | :cn_tin + | :co_nit + | :cr_tin + | :do_rcn + | :ec_ruc + | :eg_tin + | :es_cif + | :eu_oss_vat + | :gb_vat + | :ge_vat + | :hk_br + | :hu_tin + | :id_npwp + | :il_vat + | :in_gst + | :is_vat + | :jp_cn + | :jp_rn + | :jp_trn + | :ke_pin + | :kr_brn + | :kz_bin + | :li_uid + | :mx_rfc + | :my_frp + | :my_itn + | :my_sst + | :ng_tin + | :no_vat + | :no_voec + | :nz_gst + | :om_vat + | :pe_ruc + | :ph_tin + | :ro_tin + | :rs_pib + | :ru_inn + | :ru_kpp + | :sa_vat + | :sg_gst + | :sg_uen + | :si_tin + | :sv_nit + | :th_vat + | :tr_tin + | :tw_vat + | :ua_vat + | :us_ein + | :uy_ruc + | :ve_rif + | :vn_tin + | :za_vat + + class Type < Orb::Enum + AD_NRT: :ad_nrt + AE_TRN: :ae_trn + AR_CUIT: :ar_cuit + EU_VAT: :eu_vat + AU_ABN: :au_abn + AU_ARN: :au_arn + BG_UIC: :bg_uic + BH_VAT: :bh_vat + BO_TIN: :bo_tin + BR_CNPJ: :br_cnpj + BR_CPF: :br_cpf + CA_BN: :ca_bn + CA_GST_HST: :ca_gst_hst + CA_PST_BC: :ca_pst_bc + CA_PST_MB: :ca_pst_mb + CA_PST_SK: :ca_pst_sk + CA_QST: :ca_qst + CH_VAT: :ch_vat + CL_TIN: :cl_tin + CN_TIN: :cn_tin + CO_NIT: :co_nit + CR_TIN: :cr_tin + DO_RCN: :do_rcn + EC_RUC: :ec_ruc + EG_TIN: :eg_tin + ES_CIF: :es_cif + EU_OSS_VAT: :eu_oss_vat + GB_VAT: :gb_vat + GE_VAT: :ge_vat + HK_BR: :hk_br + HU_TIN: :hu_tin + ID_NPWP: :id_npwp + IL_VAT: :il_vat + IN_GST: :in_gst + IS_VAT: :is_vat + JP_CN: :jp_cn + JP_RN: :jp_rn + JP_TRN: :jp_trn + KE_PIN: :ke_pin + KR_BRN: :kr_brn + KZ_BIN: :kz_bin + LI_UID: :li_uid + MX_RFC: :mx_rfc + MY_FRP: :my_frp + MY_ITN: :my_itn + MY_SST: :my_sst + NG_TIN: :ng_tin + NO_VAT: :no_vat + NO_VOEC: :no_voec + NZ_GST: :nz_gst + OM_VAT: :om_vat + PE_RUC: :pe_ruc + PH_TIN: :ph_tin + RO_TIN: :ro_tin + RS_PIB: :rs_pib + RU_INN: :ru_inn + RU_KPP: :ru_kpp + SA_VAT: :sa_vat + SG_GST: :sg_gst + SG_UEN: :sg_uen + SI_TIN: :si_tin + SV_NIT: :sv_nit + TH_VAT: :th_vat + TR_TIN: :tr_tin + TW_VAT: :tw_vat + UA_VAT: :ua_vat + US_EIN: :us_ein + UY_RUC: :uy_ruc + VE_RIF: :ve_rif + VN_TIN: :vn_tin + ZA_VAT: :za_vat + + def self.values: -> ::Array[Orb::Models::CustomerUpdateParams::TaxID::type_] + end + end end end end diff --git a/sig/orb/models/customers/balance_transaction_create_response.rbs b/sig/orb/models/customers/balance_transaction_create_response.rbs new file mode 100644 index 00000000..d664fddd --- /dev/null +++ b/sig/orb/models/customers/balance_transaction_create_response.rbs @@ -0,0 +1,125 @@ +module Orb + module Models + module Customers + type balance_transaction_create_response = + { + id: String, + action: Orb::Models::Customers::BalanceTransactionCreateResponse::action, + amount: String, + created_at: Time, + credit_note: Orb::Models::Customers::BalanceTransactionCreateResponse::CreditNote?, + description: String?, + ending_balance: String, + invoice: Orb::Models::Customers::BalanceTransactionCreateResponse::Invoice?, + starting_balance: String, + type: Orb::Models::Customers::BalanceTransactionCreateResponse::type_ + } + + class BalanceTransactionCreateResponse < Orb::BaseModel + attr_accessor id: String + + attr_accessor action: Orb::Models::Customers::BalanceTransactionCreateResponse::action + + attr_accessor amount: String + + attr_accessor created_at: Time + + attr_accessor credit_note: Orb::Models::Customers::BalanceTransactionCreateResponse::CreditNote? + + attr_accessor description: String? + + attr_accessor ending_balance: String + + attr_accessor invoice: Orb::Models::Customers::BalanceTransactionCreateResponse::Invoice? + + attr_accessor starting_balance: String + + attr_accessor type: Orb::Models::Customers::BalanceTransactionCreateResponse::type_ + + def initialize: + ( + id: String, + action: Orb::Models::Customers::BalanceTransactionCreateResponse::action, + amount: String, + created_at: Time, + credit_note: Orb::Models::Customers::BalanceTransactionCreateResponse::CreditNote?, + description: String?, + ending_balance: String, + invoice: Orb::Models::Customers::BalanceTransactionCreateResponse::Invoice?, + starting_balance: String, + type: Orb::Models::Customers::BalanceTransactionCreateResponse::type_ + ) -> void + | ( + ?Orb::Models::Customers::balance_transaction_create_response + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::balance_transaction_create_response + + type action = + :applied_to_invoice + | :manual_adjustment + | :prorated_refund + | :revert_prorated_refund + | :return_from_voiding + | :credit_note_applied + | :credit_note_voided + | :overpayment_refund + | :external_payment + + class Action < Orb::Enum + APPLIED_TO_INVOICE: :applied_to_invoice + MANUAL_ADJUSTMENT: :manual_adjustment + PRORATED_REFUND: :prorated_refund + REVERT_PRORATED_REFUND: :revert_prorated_refund + RETURN_FROM_VOIDING: :return_from_voiding + CREDIT_NOTE_APPLIED: :credit_note_applied + CREDIT_NOTE_VOIDED: :credit_note_voided + OVERPAYMENT_REFUND: :overpayment_refund + EXTERNAL_PAYMENT: :external_payment + + def self.values: -> ::Array[Orb::Models::Customers::BalanceTransactionCreateResponse::action] + end + + type credit_note = { id: String } + + class CreditNote < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Customers::BalanceTransactionCreateResponse::credit_note + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::BalanceTransactionCreateResponse::credit_note + end + + type invoice = { id: String } + + class Invoice < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Customers::BalanceTransactionCreateResponse::invoice + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::BalanceTransactionCreateResponse::invoice + end + + type type_ = :increment | :decrement + + class Type < Orb::Enum + INCREMENT: :increment + DECREMENT: :decrement + + def self.values: -> ::Array[Orb::Models::Customers::BalanceTransactionCreateResponse::type_] + end + end + end + end +end diff --git a/sig/orb/models/customers/balance_transaction_list_response.rbs b/sig/orb/models/customers/balance_transaction_list_response.rbs new file mode 100644 index 00000000..3300dc9a --- /dev/null +++ b/sig/orb/models/customers/balance_transaction_list_response.rbs @@ -0,0 +1,125 @@ +module Orb + module Models + module Customers + type balance_transaction_list_response = + { + id: String, + action: Orb::Models::Customers::BalanceTransactionListResponse::action, + amount: String, + created_at: Time, + credit_note: Orb::Models::Customers::BalanceTransactionListResponse::CreditNote?, + description: String?, + ending_balance: String, + invoice: Orb::Models::Customers::BalanceTransactionListResponse::Invoice?, + starting_balance: String, + type: Orb::Models::Customers::BalanceTransactionListResponse::type_ + } + + class BalanceTransactionListResponse < Orb::BaseModel + attr_accessor id: String + + attr_accessor action: Orb::Models::Customers::BalanceTransactionListResponse::action + + attr_accessor amount: String + + attr_accessor created_at: Time + + attr_accessor credit_note: Orb::Models::Customers::BalanceTransactionListResponse::CreditNote? + + attr_accessor description: String? + + attr_accessor ending_balance: String + + attr_accessor invoice: Orb::Models::Customers::BalanceTransactionListResponse::Invoice? + + attr_accessor starting_balance: String + + attr_accessor type: Orb::Models::Customers::BalanceTransactionListResponse::type_ + + def initialize: + ( + id: String, + action: Orb::Models::Customers::BalanceTransactionListResponse::action, + amount: String, + created_at: Time, + credit_note: Orb::Models::Customers::BalanceTransactionListResponse::CreditNote?, + description: String?, + ending_balance: String, + invoice: Orb::Models::Customers::BalanceTransactionListResponse::Invoice?, + starting_balance: String, + type: Orb::Models::Customers::BalanceTransactionListResponse::type_ + ) -> void + | ( + ?Orb::Models::Customers::balance_transaction_list_response + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::balance_transaction_list_response + + type action = + :applied_to_invoice + | :manual_adjustment + | :prorated_refund + | :revert_prorated_refund + | :return_from_voiding + | :credit_note_applied + | :credit_note_voided + | :overpayment_refund + | :external_payment + + class Action < Orb::Enum + APPLIED_TO_INVOICE: :applied_to_invoice + MANUAL_ADJUSTMENT: :manual_adjustment + PRORATED_REFUND: :prorated_refund + REVERT_PRORATED_REFUND: :revert_prorated_refund + RETURN_FROM_VOIDING: :return_from_voiding + CREDIT_NOTE_APPLIED: :credit_note_applied + CREDIT_NOTE_VOIDED: :credit_note_voided + OVERPAYMENT_REFUND: :overpayment_refund + EXTERNAL_PAYMENT: :external_payment + + def self.values: -> ::Array[Orb::Models::Customers::BalanceTransactionListResponse::action] + end + + type credit_note = { id: String } + + class CreditNote < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Customers::BalanceTransactionListResponse::credit_note + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::BalanceTransactionListResponse::credit_note + end + + type invoice = { id: String } + + class Invoice < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Customers::BalanceTransactionListResponse::invoice + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::BalanceTransactionListResponse::invoice + end + + type type_ = :increment | :decrement + + class Type < Orb::Enum + INCREMENT: :increment + DECREMENT: :decrement + + def self.values: -> ::Array[Orb::Models::Customers::BalanceTransactionListResponse::type_] + end + end + end + end +end diff --git a/sig/orb/models/customers/cost_list_by_external_id_response.rbs b/sig/orb/models/customers/cost_list_by_external_id_response.rbs new file mode 100644 index 00000000..02812deb --- /dev/null +++ b/sig/orb/models/customers/cost_list_by_external_id_response.rbs @@ -0,0 +1,97 @@ +module Orb + module Models + module Customers + type cost_list_by_external_id_response = + { + data: ::Array[Orb::Models::Customers::CostListByExternalIDResponse::Data] + } + + class CostListByExternalIDResponse < Orb::BaseModel + attr_accessor data: ::Array[Orb::Models::Customers::CostListByExternalIDResponse::Data] + + def initialize: + ( + data: ::Array[Orb::Models::Customers::CostListByExternalIDResponse::Data] + ) -> void + | ( + ?Orb::Models::Customers::cost_list_by_external_id_response + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::cost_list_by_external_id_response + + type data = + { + per_price_costs: ::Array[Orb::Models::Customers::CostListByExternalIDResponse::Data::PerPriceCost], + subtotal: String, + timeframe_end: Time, + timeframe_start: Time, + total: String + } + + class Data < Orb::BaseModel + attr_accessor per_price_costs: ::Array[Orb::Models::Customers::CostListByExternalIDResponse::Data::PerPriceCost] + + attr_accessor subtotal: String + + attr_accessor timeframe_end: Time + + attr_accessor timeframe_start: Time + + attr_accessor total: String + + def initialize: + ( + per_price_costs: ::Array[Orb::Models::Customers::CostListByExternalIDResponse::Data::PerPriceCost], + subtotal: String, + timeframe_end: Time, + timeframe_start: Time, + total: String + ) -> void + | ( + ?Orb::Models::Customers::CostListByExternalIDResponse::data + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::CostListByExternalIDResponse::data + + type per_price_cost = + { + price: Orb::Models::price, + price_id: String, + subtotal: String, + total: String, + quantity: Float? + } + + class PerPriceCost < Orb::BaseModel + attr_accessor price: Orb::Models::price + + attr_accessor price_id: String + + attr_accessor subtotal: String + + attr_accessor total: String + + attr_accessor quantity: Float? + + def initialize: + ( + price: Orb::Models::price, + price_id: String, + subtotal: String, + total: String, + quantity: Float? + ) -> void + | ( + ?Orb::Models::Customers::CostListByExternalIDResponse::Data::per_price_cost + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::CostListByExternalIDResponse::Data::per_price_cost + end + end + end + end + end +end diff --git a/sig/orb/models/customers/cost_list_response.rbs b/sig/orb/models/customers/cost_list_response.rbs new file mode 100644 index 00000000..b8069b16 --- /dev/null +++ b/sig/orb/models/customers/cost_list_response.rbs @@ -0,0 +1,94 @@ +module Orb + module Models + module Customers + type cost_list_response = + { data: ::Array[Orb::Models::Customers::CostListResponse::Data] } + + class CostListResponse < Orb::BaseModel + attr_accessor data: ::Array[Orb::Models::Customers::CostListResponse::Data] + + def initialize: + ( + data: ::Array[Orb::Models::Customers::CostListResponse::Data] + ) -> void + | ( + ?Orb::Models::Customers::cost_list_response | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::cost_list_response + + type data = + { + per_price_costs: ::Array[Orb::Models::Customers::CostListResponse::Data::PerPriceCost], + subtotal: String, + timeframe_end: Time, + timeframe_start: Time, + total: String + } + + class Data < Orb::BaseModel + attr_accessor per_price_costs: ::Array[Orb::Models::Customers::CostListResponse::Data::PerPriceCost] + + attr_accessor subtotal: String + + attr_accessor timeframe_end: Time + + attr_accessor timeframe_start: Time + + attr_accessor total: String + + def initialize: + ( + per_price_costs: ::Array[Orb::Models::Customers::CostListResponse::Data::PerPriceCost], + subtotal: String, + timeframe_end: Time, + timeframe_start: Time, + total: String + ) -> void + | ( + ?Orb::Models::Customers::CostListResponse::data + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::CostListResponse::data + + type per_price_cost = + { + price: Orb::Models::price, + price_id: String, + subtotal: String, + total: String, + quantity: Float? + } + + class PerPriceCost < Orb::BaseModel + attr_accessor price: Orb::Models::price + + attr_accessor price_id: String + + attr_accessor subtotal: String + + attr_accessor total: String + + attr_accessor quantity: Float? + + def initialize: + ( + price: Orb::Models::price, + price_id: String, + subtotal: String, + total: String, + quantity: Float? + ) -> void + | ( + ?Orb::Models::Customers::CostListResponse::Data::per_price_cost + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::CostListResponse::Data::per_price_cost + end + end + end + end + end +end diff --git a/sig/orb/models/customers/credit_list_by_external_id_response.rbs b/sig/orb/models/customers/credit_list_by_external_id_response.rbs new file mode 100644 index 00000000..03447192 --- /dev/null +++ b/sig/orb/models/customers/credit_list_by_external_id_response.rbs @@ -0,0 +1,58 @@ +module Orb + module Models + module Customers + type credit_list_by_external_id_response = + { + id: String, + balance: Float, + effective_date: Time?, + expiry_date: Time?, + maximum_initial_balance: Float?, + per_unit_cost_basis: String?, + status: Orb::Models::Customers::CreditListByExternalIDResponse::status + } + + class CreditListByExternalIDResponse < Orb::BaseModel + attr_accessor id: String + + attr_accessor balance: Float + + attr_accessor effective_date: Time? + + attr_accessor expiry_date: Time? + + attr_accessor maximum_initial_balance: Float? + + attr_accessor per_unit_cost_basis: String? + + attr_accessor status: Orb::Models::Customers::CreditListByExternalIDResponse::status + + def initialize: + ( + id: String, + balance: Float, + effective_date: Time?, + expiry_date: Time?, + maximum_initial_balance: Float?, + per_unit_cost_basis: String?, + status: Orb::Models::Customers::CreditListByExternalIDResponse::status + ) -> void + | ( + ?Orb::Models::Customers::credit_list_by_external_id_response + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::credit_list_by_external_id_response + + type status = :active | :pending_payment + + class Status < Orb::Enum + ACTIVE: :active + PENDING_PAYMENT: :pending_payment + + def self.values: -> ::Array[Orb::Models::Customers::CreditListByExternalIDResponse::status] + end + end + end + end +end diff --git a/sig/orb/models/customers/credit_list_response.rbs b/sig/orb/models/customers/credit_list_response.rbs new file mode 100644 index 00000000..29e70e1f --- /dev/null +++ b/sig/orb/models/customers/credit_list_response.rbs @@ -0,0 +1,57 @@ +module Orb + module Models + module Customers + type credit_list_response = + { + id: String, + balance: Float, + effective_date: Time?, + expiry_date: Time?, + maximum_initial_balance: Float?, + per_unit_cost_basis: String?, + status: Orb::Models::Customers::CreditListResponse::status + } + + class CreditListResponse < Orb::BaseModel + attr_accessor id: String + + attr_accessor balance: Float + + attr_accessor effective_date: Time? + + attr_accessor expiry_date: Time? + + attr_accessor maximum_initial_balance: Float? + + attr_accessor per_unit_cost_basis: String? + + attr_accessor status: Orb::Models::Customers::CreditListResponse::status + + def initialize: + ( + id: String, + balance: Float, + effective_date: Time?, + expiry_date: Time?, + maximum_initial_balance: Float?, + per_unit_cost_basis: String?, + status: Orb::Models::Customers::CreditListResponse::status + ) -> void + | ( + ?Orb::Models::Customers::credit_list_response | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::credit_list_response + + type status = :active | :pending_payment + + class Status < Orb::Enum + ACTIVE: :active + PENDING_PAYMENT: :pending_payment + + def self.values: -> ::Array[Orb::Models::Customers::CreditListResponse::status] + end + end + end + end +end diff --git a/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs b/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs new file mode 100644 index 00000000..607e9452 --- /dev/null +++ b/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs @@ -0,0 +1,882 @@ +module Orb + module Models + module Customers + module Credits + type ledger_create_entry_by_external_id_response = + Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry + | Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry + | Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry + | Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry + | Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry + | Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry + | Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry + + class LedgerCreateEntryByExternalIDResponse < Orb::Union + type increment_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::entry_status, + entry_type: :increment, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float + } + + class IncrementLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::entry_status + + attr_accessor entry_type: :increment + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor starting_balance: Float + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + entry_type: :increment + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::increment_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::increment_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry::entry_status] + end + end + + type decrement_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::entry_status, + entry_type: :decrement, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + event_id: String?, + invoice_id: String?, + price_id: String? + } + + class DecrementLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::entry_status + + attr_accessor entry_type: :decrement + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor starting_balance: Float + + attr_accessor event_id: String? + + attr_accessor invoice_id: String? + + attr_accessor price_id: String? + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + event_id: String?, + invoice_id: String?, + price_id: String?, + entry_type: :decrement + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::decrement_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::decrement_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry::entry_status] + end + end + + type expiration_change_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::entry_status, + entry_type: :expiration_change, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + new_block_expiry_date: Time?, + starting_balance: Float + } + + class ExpirationChangeLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::entry_status + + attr_accessor entry_type: :expiration_change + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor new_block_expiry_date: Time? + + attr_accessor starting_balance: Float + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + new_block_expiry_date: Time?, + starting_balance: Float, + entry_type: :expiration_change + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::expiration_change_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::expiration_change_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry::entry_status] + end + end + + type credit_block_expiry_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::entry_status, + entry_type: :credit_block_expiry, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float + } + + class CreditBlockExpiryLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::entry_status + + attr_accessor entry_type: :credit_block_expiry + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor starting_balance: Float + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + entry_type: :credit_block_expiry + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::credit_block_expiry_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::credit_block_expiry_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry::entry_status] + end + end + + type void_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::entry_status, + entry_type: :void, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + void_amount: Float, + void_reason: String? + } + + class VoidLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::entry_status + + attr_accessor entry_type: :void + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor starting_balance: Float + + attr_accessor void_amount: Float + + attr_accessor void_reason: String? + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + void_amount: Float, + void_reason: String?, + entry_type: :void + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::void_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::void_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry::entry_status] + end + end + + type void_initiated_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::entry_status, + entry_type: :void_initiated, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + new_block_expiry_date: Time, + starting_balance: Float, + void_amount: Float, + void_reason: String? + } + + class VoidInitiatedLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::entry_status + + attr_accessor entry_type: :void_initiated + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor new_block_expiry_date: Time + + attr_accessor starting_balance: Float + + attr_accessor void_amount: Float + + attr_accessor void_reason: String? + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + new_block_expiry_date: Time, + starting_balance: Float, + void_amount: Float, + void_reason: String?, + entry_type: :void_initiated + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::void_initiated_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::void_initiated_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry::entry_status] + end + end + + type amendment_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::entry_status, + entry_type: :amendment, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float + } + + class AmendmentLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::entry_status + + attr_accessor entry_type: :amendment + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor starting_balance: Float + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + entry_type: :amendment + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::amendment_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::amendment_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry::entry_status] + end + end + + private def self.variants: -> [[:increment, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry], [:decrement, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry], [:expiration_change, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry], [:credit_block_expiry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry], [:void, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry], [:void_initiated, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry], [:amendment, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry]] + end + end + end + end +end diff --git a/sig/orb/models/customers/credits/ledger_create_entry_response.rbs b/sig/orb/models/customers/credits/ledger_create_entry_response.rbs new file mode 100644 index 00000000..fb91936f --- /dev/null +++ b/sig/orb/models/customers/credits/ledger_create_entry_response.rbs @@ -0,0 +1,882 @@ +module Orb + module Models + module Customers + module Credits + type ledger_create_entry_response = + Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry + | Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry + | Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry + | Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry + | Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry + | Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry + | Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry + + class LedgerCreateEntryResponse < Orb::Union + type increment_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::entry_status, + entry_type: :increment, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float + } + + class IncrementLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::entry_status + + attr_accessor entry_type: :increment + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor starting_balance: Float + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + entry_type: :increment + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryResponse::increment_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryResponse::increment_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry::entry_status] + end + end + + type decrement_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::entry_status, + entry_type: :decrement, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + event_id: String?, + invoice_id: String?, + price_id: String? + } + + class DecrementLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::entry_status + + attr_accessor entry_type: :decrement + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor starting_balance: Float + + attr_accessor event_id: String? + + attr_accessor invoice_id: String? + + attr_accessor price_id: String? + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + event_id: String?, + invoice_id: String?, + price_id: String?, + entry_type: :decrement + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryResponse::decrement_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryResponse::decrement_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry::entry_status] + end + end + + type expiration_change_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::entry_status, + entry_type: :expiration_change, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + new_block_expiry_date: Time?, + starting_balance: Float + } + + class ExpirationChangeLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::entry_status + + attr_accessor entry_type: :expiration_change + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor new_block_expiry_date: Time? + + attr_accessor starting_balance: Float + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + new_block_expiry_date: Time?, + starting_balance: Float, + entry_type: :expiration_change + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryResponse::expiration_change_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryResponse::expiration_change_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry::entry_status] + end + end + + type credit_block_expiry_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::entry_status, + entry_type: :credit_block_expiry, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float + } + + class CreditBlockExpiryLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::entry_status + + attr_accessor entry_type: :credit_block_expiry + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor starting_balance: Float + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + entry_type: :credit_block_expiry + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryResponse::credit_block_expiry_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryResponse::credit_block_expiry_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry::entry_status] + end + end + + type void_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::entry_status, + entry_type: :void, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + void_amount: Float, + void_reason: String? + } + + class VoidLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::entry_status + + attr_accessor entry_type: :void + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor starting_balance: Float + + attr_accessor void_amount: Float + + attr_accessor void_reason: String? + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + void_amount: Float, + void_reason: String?, + entry_type: :void + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryResponse::void_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryResponse::void_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry::entry_status] + end + end + + type void_initiated_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::entry_status, + entry_type: :void_initiated, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + new_block_expiry_date: Time, + starting_balance: Float, + void_amount: Float, + void_reason: String? + } + + class VoidInitiatedLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::entry_status + + attr_accessor entry_type: :void_initiated + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor new_block_expiry_date: Time + + attr_accessor starting_balance: Float + + attr_accessor void_amount: Float + + attr_accessor void_reason: String? + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + new_block_expiry_date: Time, + starting_balance: Float, + void_amount: Float, + void_reason: String?, + entry_type: :void_initiated + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryResponse::void_initiated_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryResponse::void_initiated_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry::entry_status] + end + end + + type amendment_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::entry_status, + entry_type: :amendment, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float + } + + class AmendmentLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::entry_status + + attr_accessor entry_type: :amendment + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor starting_balance: Float + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + entry_type: :amendment + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryResponse::amendment_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryResponse::amendment_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry::entry_status] + end + end + + private def self.variants: -> [[:increment, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry], [:decrement, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry], [:expiration_change, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry], [:credit_block_expiry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry], [:void, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry], [:void_initiated, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry], [:amendment, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry]] + end + end + end + end +end diff --git a/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs b/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs new file mode 100644 index 00000000..26b23612 --- /dev/null +++ b/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs @@ -0,0 +1,882 @@ +module Orb + module Models + module Customers + module Credits + type ledger_list_by_external_id_response = + Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry + | Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry + | Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry + | Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry + | Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry + | Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry + | Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry + + class LedgerListByExternalIDResponse < Orb::Union + type increment_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::entry_status, + entry_type: :increment, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float + } + + class IncrementLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::entry_status + + attr_accessor entry_type: :increment + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor starting_balance: Float + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + entry_type: :increment + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::increment_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::increment_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry::entry_status] + end + end + + type decrement_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::entry_status, + entry_type: :decrement, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + event_id: String?, + invoice_id: String?, + price_id: String? + } + + class DecrementLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::entry_status + + attr_accessor entry_type: :decrement + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor starting_balance: Float + + attr_accessor event_id: String? + + attr_accessor invoice_id: String? + + attr_accessor price_id: String? + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + event_id: String?, + invoice_id: String?, + price_id: String?, + entry_type: :decrement + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::decrement_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::decrement_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry::entry_status] + end + end + + type expiration_change_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::entry_status, + entry_type: :expiration_change, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + new_block_expiry_date: Time?, + starting_balance: Float + } + + class ExpirationChangeLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::entry_status + + attr_accessor entry_type: :expiration_change + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor new_block_expiry_date: Time? + + attr_accessor starting_balance: Float + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + new_block_expiry_date: Time?, + starting_balance: Float, + entry_type: :expiration_change + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::expiration_change_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::expiration_change_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry::entry_status] + end + end + + type credit_block_expiry_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::entry_status, + entry_type: :credit_block_expiry, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float + } + + class CreditBlockExpiryLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::entry_status + + attr_accessor entry_type: :credit_block_expiry + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor starting_balance: Float + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + entry_type: :credit_block_expiry + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::credit_block_expiry_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::credit_block_expiry_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry::entry_status] + end + end + + type void_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::entry_status, + entry_type: :void, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + void_amount: Float, + void_reason: String? + } + + class VoidLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::entry_status + + attr_accessor entry_type: :void + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor starting_balance: Float + + attr_accessor void_amount: Float + + attr_accessor void_reason: String? + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + void_amount: Float, + void_reason: String?, + entry_type: :void + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::void_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::void_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry::entry_status] + end + end + + type void_initiated_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::entry_status, + entry_type: :void_initiated, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + new_block_expiry_date: Time, + starting_balance: Float, + void_amount: Float, + void_reason: String? + } + + class VoidInitiatedLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::entry_status + + attr_accessor entry_type: :void_initiated + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor new_block_expiry_date: Time + + attr_accessor starting_balance: Float + + attr_accessor void_amount: Float + + attr_accessor void_reason: String? + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + new_block_expiry_date: Time, + starting_balance: Float, + void_amount: Float, + void_reason: String?, + entry_type: :void_initiated + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::void_initiated_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::void_initiated_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry::entry_status] + end + end + + type amendment_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::entry_status, + entry_type: :amendment, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float + } + + class AmendmentLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::entry_status + + attr_accessor entry_type: :amendment + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor starting_balance: Float + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + entry_type: :amendment + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::amendment_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::amendment_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry::entry_status] + end + end + + private def self.variants: -> [[:increment, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry], [:decrement, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry], [:expiration_change, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry], [:credit_block_expiry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry], [:void, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry], [:void_initiated, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry], [:amendment, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry]] + end + end + end + end +end diff --git a/sig/orb/models/customers/credits/ledger_list_response.rbs b/sig/orb/models/customers/credits/ledger_list_response.rbs new file mode 100644 index 00000000..0d139062 --- /dev/null +++ b/sig/orb/models/customers/credits/ledger_list_response.rbs @@ -0,0 +1,882 @@ +module Orb + module Models + module Customers + module Credits + type ledger_list_response = + Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry + | Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry + | Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry + | Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry + | Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry + | Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry + | Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry + + class LedgerListResponse < Orb::Union + type increment_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::entry_status, + entry_type: :increment, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float + } + + class IncrementLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::entry_status + + attr_accessor entry_type: :increment + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor starting_balance: Float + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + entry_type: :increment + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListResponse::increment_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListResponse::increment_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry::entry_status] + end + end + + type decrement_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::entry_status, + entry_type: :decrement, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + event_id: String?, + invoice_id: String?, + price_id: String? + } + + class DecrementLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::entry_status + + attr_accessor entry_type: :decrement + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor starting_balance: Float + + attr_accessor event_id: String? + + attr_accessor invoice_id: String? + + attr_accessor price_id: String? + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + event_id: String?, + invoice_id: String?, + price_id: String?, + entry_type: :decrement + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListResponse::decrement_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListResponse::decrement_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry::entry_status] + end + end + + type expiration_change_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::entry_status, + entry_type: :expiration_change, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + new_block_expiry_date: Time?, + starting_balance: Float + } + + class ExpirationChangeLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::entry_status + + attr_accessor entry_type: :expiration_change + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor new_block_expiry_date: Time? + + attr_accessor starting_balance: Float + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + new_block_expiry_date: Time?, + starting_balance: Float, + entry_type: :expiration_change + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListResponse::expiration_change_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListResponse::expiration_change_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry::entry_status] + end + end + + type credit_block_expiry_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::entry_status, + entry_type: :credit_block_expiry, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float + } + + class CreditBlockExpiryLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::entry_status + + attr_accessor entry_type: :credit_block_expiry + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor starting_balance: Float + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + entry_type: :credit_block_expiry + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListResponse::credit_block_expiry_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListResponse::credit_block_expiry_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry::entry_status] + end + end + + type void_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::entry_status, + entry_type: :void, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + void_amount: Float, + void_reason: String? + } + + class VoidLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::entry_status + + attr_accessor entry_type: :void + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor starting_balance: Float + + attr_accessor void_amount: Float + + attr_accessor void_reason: String? + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + void_amount: Float, + void_reason: String?, + entry_type: :void + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListResponse::void_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListResponse::void_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry::entry_status] + end + end + + type void_initiated_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::entry_status, + entry_type: :void_initiated, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + new_block_expiry_date: Time, + starting_balance: Float, + void_amount: Float, + void_reason: String? + } + + class VoidInitiatedLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::entry_status + + attr_accessor entry_type: :void_initiated + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor new_block_expiry_date: Time + + attr_accessor starting_balance: Float + + attr_accessor void_amount: Float + + attr_accessor void_reason: String? + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + new_block_expiry_date: Time, + starting_balance: Float, + void_amount: Float, + void_reason: String?, + entry_type: :void_initiated + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListResponse::void_initiated_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListResponse::void_initiated_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry::entry_status] + end + end + + type amendment_ledger_entry = + { + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::entry_status, + entry_type: :amendment, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float + } + + class AmendmentLedgerEntry < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: Float + + attr_accessor created_at: Time + + attr_accessor credit_block: Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::CreditBlock + + attr_accessor currency: String + + attr_accessor customer: Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::Customer + + attr_accessor description: String? + + attr_accessor ending_balance: Float + + attr_accessor entry_status: Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::entry_status + + attr_accessor entry_type: :amendment + + attr_accessor ledger_sequence_number: Integer + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor starting_balance: Float + + def initialize: + ( + id: String, + amount: Float, + created_at: Time, + credit_block: Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::CreditBlock, + currency: String, + customer: Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::Customer, + description: String?, + ending_balance: Float, + entry_status: Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::entry_status, + ledger_sequence_number: Integer, + metadata: ::Hash[Symbol, String], + starting_balance: Float, + entry_type: :amendment + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListResponse::amendment_ledger_entry + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListResponse::amendment_ledger_entry + + type credit_block = + { id: String, expiry_date: Time?, per_unit_cost_basis: String? } + + class CreditBlock < Orb::BaseModel + attr_accessor id: String + + attr_accessor expiry_date: Time? + + attr_accessor per_unit_cost_basis: String? + + def initialize: + ( + id: String, + expiry_date: Time?, + per_unit_cost_basis: String? + ) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::credit_block + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::credit_block + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::customer + end + + type entry_status = :committed | :pending + + class EntryStatus < Orb::Enum + COMMITTED: :committed + PENDING: :pending + + def self.values: -> ::Array[Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry::entry_status] + end + end + + private def self.variants: -> [[:increment, Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry], [:decrement, Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry], [:expiration_change, Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry], [:credit_block_expiry, Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry], [:void, Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry], [:void_initiated, Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry], [:amendment, Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry]] + end + end + end + end +end diff --git a/sig/orb/models/customers/credits/top_up_create_by_external_id_response.rbs b/sig/orb/models/customers/credits/top_up_create_by_external_id_response.rbs new file mode 100644 index 00000000..e5583d6b --- /dev/null +++ b/sig/orb/models/customers/credits/top_up_create_by_external_id_response.rbs @@ -0,0 +1,98 @@ +module Orb + module Models + module Customers + module Credits + type top_up_create_by_external_id_response = + { + id: String, + amount: String, + currency: String, + invoice_settings: Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::InvoiceSettings, + per_unit_cost_basis: String, + threshold: String, + expires_after: Integer?, + expires_after_unit: Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::expires_after_unit? + } + + class TopUpCreateByExternalIDResponse < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: String + + attr_accessor currency: String + + attr_accessor invoice_settings: Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::InvoiceSettings + + attr_accessor per_unit_cost_basis: String + + attr_accessor threshold: String + + attr_accessor expires_after: Integer? + + attr_accessor expires_after_unit: Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::expires_after_unit? + + def initialize: + ( + id: String, + amount: String, + currency: String, + invoice_settings: Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::InvoiceSettings, + per_unit_cost_basis: String, + threshold: String, + expires_after: Integer?, + expires_after_unit: Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::expires_after_unit? + ) -> void + | ( + ?Orb::Models::Customers::Credits::top_up_create_by_external_id_response + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::top_up_create_by_external_id_response + + type invoice_settings = + { + auto_collection: bool, + net_terms: Integer, + memo: String?, + require_successful_payment: bool + } + + class InvoiceSettings < Orb::BaseModel + attr_accessor auto_collection: bool + + attr_accessor net_terms: Integer + + attr_accessor memo: String? + + attr_reader require_successful_payment: bool? + + def require_successful_payment=: (bool) -> bool + + def initialize: + ( + auto_collection: bool, + net_terms: Integer, + memo: String?, + require_successful_payment: bool + ) -> void + | ( + ?Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::invoice_settings + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::invoice_settings + end + + type expires_after_unit = :day | :month + + class ExpiresAfterUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::expires_after_unit] + end + end + end + end + end +end diff --git a/sig/orb/models/customers/credits/top_up_create_response.rbs b/sig/orb/models/customers/credits/top_up_create_response.rbs new file mode 100644 index 00000000..d41e64d8 --- /dev/null +++ b/sig/orb/models/customers/credits/top_up_create_response.rbs @@ -0,0 +1,98 @@ +module Orb + module Models + module Customers + module Credits + type top_up_create_response = + { + id: String, + amount: String, + currency: String, + invoice_settings: Orb::Models::Customers::Credits::TopUpCreateResponse::InvoiceSettings, + per_unit_cost_basis: String, + threshold: String, + expires_after: Integer?, + expires_after_unit: Orb::Models::Customers::Credits::TopUpCreateResponse::expires_after_unit? + } + + class TopUpCreateResponse < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: String + + attr_accessor currency: String + + attr_accessor invoice_settings: Orb::Models::Customers::Credits::TopUpCreateResponse::InvoiceSettings + + attr_accessor per_unit_cost_basis: String + + attr_accessor threshold: String + + attr_accessor expires_after: Integer? + + attr_accessor expires_after_unit: Orb::Models::Customers::Credits::TopUpCreateResponse::expires_after_unit? + + def initialize: + ( + id: String, + amount: String, + currency: String, + invoice_settings: Orb::Models::Customers::Credits::TopUpCreateResponse::InvoiceSettings, + per_unit_cost_basis: String, + threshold: String, + expires_after: Integer?, + expires_after_unit: Orb::Models::Customers::Credits::TopUpCreateResponse::expires_after_unit? + ) -> void + | ( + ?Orb::Models::Customers::Credits::top_up_create_response + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::top_up_create_response + + type invoice_settings = + { + auto_collection: bool, + net_terms: Integer, + memo: String?, + require_successful_payment: bool + } + + class InvoiceSettings < Orb::BaseModel + attr_accessor auto_collection: bool + + attr_accessor net_terms: Integer + + attr_accessor memo: String? + + attr_reader require_successful_payment: bool? + + def require_successful_payment=: (bool) -> bool + + def initialize: + ( + auto_collection: bool, + net_terms: Integer, + memo: String?, + require_successful_payment: bool + ) -> void + | ( + ?Orb::Models::Customers::Credits::TopUpCreateResponse::invoice_settings + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::TopUpCreateResponse::invoice_settings + end + + type expires_after_unit = :day | :month + + class ExpiresAfterUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Customers::Credits::TopUpCreateResponse::expires_after_unit] + end + end + end + end + end +end diff --git a/sig/orb/models/customers/credits/top_up_list_by_external_id_response.rbs b/sig/orb/models/customers/credits/top_up_list_by_external_id_response.rbs new file mode 100644 index 00000000..6b16b132 --- /dev/null +++ b/sig/orb/models/customers/credits/top_up_list_by_external_id_response.rbs @@ -0,0 +1,98 @@ +module Orb + module Models + module Customers + module Credits + type top_up_list_by_external_id_response = + { + id: String, + amount: String, + currency: String, + invoice_settings: Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::InvoiceSettings, + per_unit_cost_basis: String, + threshold: String, + expires_after: Integer?, + expires_after_unit: Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::expires_after_unit? + } + + class TopUpListByExternalIDResponse < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: String + + attr_accessor currency: String + + attr_accessor invoice_settings: Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::InvoiceSettings + + attr_accessor per_unit_cost_basis: String + + attr_accessor threshold: String + + attr_accessor expires_after: Integer? + + attr_accessor expires_after_unit: Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::expires_after_unit? + + def initialize: + ( + id: String, + amount: String, + currency: String, + invoice_settings: Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::InvoiceSettings, + per_unit_cost_basis: String, + threshold: String, + expires_after: Integer?, + expires_after_unit: Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::expires_after_unit? + ) -> void + | ( + ?Orb::Models::Customers::Credits::top_up_list_by_external_id_response + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::top_up_list_by_external_id_response + + type invoice_settings = + { + auto_collection: bool, + net_terms: Integer, + memo: String?, + require_successful_payment: bool + } + + class InvoiceSettings < Orb::BaseModel + attr_accessor auto_collection: bool + + attr_accessor net_terms: Integer + + attr_accessor memo: String? + + attr_reader require_successful_payment: bool? + + def require_successful_payment=: (bool) -> bool + + def initialize: + ( + auto_collection: bool, + net_terms: Integer, + memo: String?, + require_successful_payment: bool + ) -> void + | ( + ?Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::invoice_settings + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::invoice_settings + end + + type expires_after_unit = :day | :month + + class ExpiresAfterUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::expires_after_unit] + end + end + end + end + end +end diff --git a/sig/orb/models/customers/credits/top_up_list_response.rbs b/sig/orb/models/customers/credits/top_up_list_response.rbs new file mode 100644 index 00000000..e6fc16a2 --- /dev/null +++ b/sig/orb/models/customers/credits/top_up_list_response.rbs @@ -0,0 +1,98 @@ +module Orb + module Models + module Customers + module Credits + type top_up_list_response = + { + id: String, + amount: String, + currency: String, + invoice_settings: Orb::Models::Customers::Credits::TopUpListResponse::InvoiceSettings, + per_unit_cost_basis: String, + threshold: String, + expires_after: Integer?, + expires_after_unit: Orb::Models::Customers::Credits::TopUpListResponse::expires_after_unit? + } + + class TopUpListResponse < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: String + + attr_accessor currency: String + + attr_accessor invoice_settings: Orb::Models::Customers::Credits::TopUpListResponse::InvoiceSettings + + attr_accessor per_unit_cost_basis: String + + attr_accessor threshold: String + + attr_accessor expires_after: Integer? + + attr_accessor expires_after_unit: Orb::Models::Customers::Credits::TopUpListResponse::expires_after_unit? + + def initialize: + ( + id: String, + amount: String, + currency: String, + invoice_settings: Orb::Models::Customers::Credits::TopUpListResponse::InvoiceSettings, + per_unit_cost_basis: String, + threshold: String, + expires_after: Integer?, + expires_after_unit: Orb::Models::Customers::Credits::TopUpListResponse::expires_after_unit? + ) -> void + | ( + ?Orb::Models::Customers::Credits::top_up_list_response + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::top_up_list_response + + type invoice_settings = + { + auto_collection: bool, + net_terms: Integer, + memo: String?, + require_successful_payment: bool + } + + class InvoiceSettings < Orb::BaseModel + attr_accessor auto_collection: bool + + attr_accessor net_terms: Integer + + attr_accessor memo: String? + + attr_reader require_successful_payment: bool? + + def require_successful_payment=: (bool) -> bool + + def initialize: + ( + auto_collection: bool, + net_terms: Integer, + memo: String?, + require_successful_payment: bool + ) -> void + | ( + ?Orb::Models::Customers::Credits::TopUpListResponse::invoice_settings + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Customers::Credits::TopUpListResponse::invoice_settings + end + + type expires_after_unit = :day | :month + + class ExpiresAfterUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Customers::Credits::TopUpListResponse::expires_after_unit] + end + end + end + end + end +end diff --git a/sig/orb/models/dimensional_price_configuration_model.rbs b/sig/orb/models/dimensional_price_configuration_model.rbs deleted file mode 100644 index 5ac64ada..00000000 --- a/sig/orb/models/dimensional_price_configuration_model.rbs +++ /dev/null @@ -1,24 +0,0 @@ -module Orb - module Models - type dimensional_price_configuration_model = - { dimension_values: ::Array[String], dimensional_price_group_id: String } - - class DimensionalPriceConfigurationModel < Orb::BaseModel - attr_accessor dimension_values: ::Array[String] - - attr_accessor dimensional_price_group_id: String - - def initialize: - ( - dimension_values: ::Array[String], - dimensional_price_group_id: String - ) -> void - | ( - ?Orb::Models::dimensional_price_configuration_model - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::dimensional_price_configuration_model - end - end -end diff --git a/sig/orb/models/dimensional_price_group_model.rbs b/sig/orb/models/dimensional_price_group_model.rbs deleted file mode 100644 index 0d7aa740..00000000 --- a/sig/orb/models/dimensional_price_group_model.rbs +++ /dev/null @@ -1,42 +0,0 @@ -module Orb - module Models - type dimensional_price_group_model = - { - id: String, - billable_metric_id: String, - dimensions: ::Array[String], - external_dimensional_price_group_id: String?, - metadata: ::Hash[Symbol, String], - name: String - } - - class DimensionalPriceGroupModel < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric_id: String - - attr_accessor dimensions: ::Array[String] - - attr_accessor external_dimensional_price_group_id: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor name: String - - def initialize: - ( - id: String, - billable_metric_id: String, - dimensions: ::Array[String], - external_dimensional_price_group_id: String?, - metadata: ::Hash[Symbol, String], - name: String - ) -> void - | ( - ?Orb::Models::dimensional_price_group_model | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::dimensional_price_group_model - end - end -end diff --git a/sig/orb/models/dimensional_price_groups.rbs b/sig/orb/models/dimensional_price_groups.rbs index a0bdb317..68254693 100644 --- a/sig/orb/models/dimensional_price_groups.rbs +++ b/sig/orb/models/dimensional_price_groups.rbs @@ -2,18 +2,18 @@ module Orb module Models type dimensional_price_groups_api = { - data: ::Array[Orb::Models::DimensionalPriceGroupModel], + data: ::Array[Orb::Models::DimensionalPriceGroup], pagination_metadata: Orb::Models::PaginationMetadata } class DimensionalPriceGroupsAPI < Orb::BaseModel - attr_accessor data: ::Array[Orb::Models::DimensionalPriceGroupModel] + attr_accessor data: ::Array[Orb::Models::DimensionalPriceGroup] attr_accessor pagination_metadata: Orb::Models::PaginationMetadata def initialize: ( - data: ::Array[Orb::Models::DimensionalPriceGroupModel], + data: ::Array[Orb::Models::DimensionalPriceGroup], pagination_metadata: Orb::Models::PaginationMetadata ) -> void | ( diff --git a/sig/orb/models/discount_model.rbs b/sig/orb/models/discount_model.rbs deleted file mode 100644 index a863fee1..00000000 --- a/sig/orb/models/discount_model.rbs +++ /dev/null @@ -1,44 +0,0 @@ -module Orb - module Models - type discount_model = - Orb::Models::PercentageDiscount - | Orb::Models::TrialDiscount - | Orb::Models::DiscountModel::UsageDiscount - | Orb::Models::AmountDiscount - - class DiscountModel < Orb::Union - type usage_discount = - { - applies_to_price_ids: ::Array[String], - discount_type: :usage, - usage_discount: Float, - reason: String? - } - - class UsageDiscount < Orb::BaseModel - attr_accessor applies_to_price_ids: ::Array[String] - - attr_accessor discount_type: :usage - - attr_accessor usage_discount: Float - - attr_accessor reason: String? - - def initialize: - ( - applies_to_price_ids: ::Array[String], - usage_discount: Float, - reason: String?, - discount_type: :usage - ) -> void - | ( - ?Orb::Models::DiscountModel::usage_discount | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::DiscountModel::usage_discount - end - - private def self.variants: -> [[:percentage, Orb::Models::PercentageDiscount], [:trial, Orb::Models::TrialDiscount], [:usage, Orb::Models::DiscountModel::UsageDiscount], [:amount, Orb::Models::AmountDiscount]] - end - end -end diff --git a/sig/orb/models/discount_override_model.rbs b/sig/orb/models/discount_override_model.rbs deleted file mode 100644 index 8940f1d7..00000000 --- a/sig/orb/models/discount_override_model.rbs +++ /dev/null @@ -1,42 +0,0 @@ -module Orb - module Models - type discount_override_model = - { - discount_type: Orb::Models::DiscountOverrideModel::discount_type, - amount_discount: String?, - percentage_discount: Float?, - usage_discount: Float? - } - - class DiscountOverrideModel < Orb::BaseModel - attr_accessor discount_type: Orb::Models::DiscountOverrideModel::discount_type - - attr_accessor amount_discount: String? - - attr_accessor percentage_discount: Float? - - attr_accessor usage_discount: Float? - - def initialize: - ( - discount_type: Orb::Models::DiscountOverrideModel::discount_type, - amount_discount: String?, - percentage_discount: Float?, - usage_discount: Float? - ) -> void - | (?Orb::Models::discount_override_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::discount_override_model - - type discount_type = :percentage | :usage | :amount - - class DiscountType < Orb::Enum - PERCENTAGE: :percentage - USAGE: :usage - AMOUNT: :amount - - def self.values: -> ::Array[Orb::Models::DiscountOverrideModel::discount_type] - end - end - end -end diff --git a/sig/orb/models/edit_customer_model.rbs b/sig/orb/models/edit_customer_model.rbs deleted file mode 100644 index 8867283c..00000000 --- a/sig/orb/models/edit_customer_model.rbs +++ /dev/null @@ -1,97 +0,0 @@ -module Orb - module Models - type edit_customer_model = - { - accounting_sync_configuration: Orb::Models::NewAccountingSyncConfigurationModel?, - additional_emails: ::Array[String]?, - auto_collection: bool?, - billing_address: Orb::Models::AddressInputModel?, - currency: String?, - email: String?, - email_delivery: bool?, - external_customer_id: String?, - hierarchy: Orb::Models::CustomerHierarchyConfigModel?, - metadata: ::Hash[Symbol, String?]?, - name: String?, - payment_provider: Orb::Models::EditCustomerModel::payment_provider?, - payment_provider_id: String?, - reporting_configuration: Orb::Models::NewReportingConfigurationModel?, - shipping_address: Orb::Models::AddressInputModel?, - tax_configuration: Orb::Models::new_tax_configuration_model?, - tax_id: Orb::Models::CustomerTaxIDModel? - } - - class EditCustomerModel < Orb::BaseModel - attr_accessor accounting_sync_configuration: Orb::Models::NewAccountingSyncConfigurationModel? - - attr_accessor additional_emails: ::Array[String]? - - attr_accessor auto_collection: bool? - - attr_accessor billing_address: Orb::Models::AddressInputModel? - - attr_accessor currency: String? - - attr_accessor email: String? - - attr_accessor email_delivery: bool? - - attr_accessor external_customer_id: String? - - attr_accessor hierarchy: Orb::Models::CustomerHierarchyConfigModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor name: String? - - attr_accessor payment_provider: Orb::Models::EditCustomerModel::payment_provider? - - attr_accessor payment_provider_id: String? - - attr_accessor reporting_configuration: Orb::Models::NewReportingConfigurationModel? - - attr_accessor shipping_address: Orb::Models::AddressInputModel? - - attr_accessor tax_configuration: Orb::Models::new_tax_configuration_model? - - attr_accessor tax_id: Orb::Models::CustomerTaxIDModel? - - def initialize: - ( - accounting_sync_configuration: Orb::Models::NewAccountingSyncConfigurationModel?, - additional_emails: ::Array[String]?, - auto_collection: bool?, - billing_address: Orb::Models::AddressInputModel?, - currency: String?, - email: String?, - email_delivery: bool?, - external_customer_id: String?, - hierarchy: Orb::Models::CustomerHierarchyConfigModel?, - metadata: ::Hash[Symbol, String?]?, - name: String?, - payment_provider: Orb::Models::EditCustomerModel::payment_provider?, - payment_provider_id: String?, - reporting_configuration: Orb::Models::NewReportingConfigurationModel?, - shipping_address: Orb::Models::AddressInputModel?, - tax_configuration: Orb::Models::new_tax_configuration_model?, - tax_id: Orb::Models::CustomerTaxIDModel? - ) -> void - | (?Orb::Models::edit_customer_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::edit_customer_model - - type payment_provider = - :quickbooks | :"bill.com" | :stripe_charge | :stripe_invoice | :netsuite - - class PaymentProvider < Orb::Enum - QUICKBOOKS: :quickbooks - BILL_COM: :"bill.com" - STRIPE_CHARGE: :stripe_charge - STRIPE_INVOICE: :stripe_invoice - NETSUITE: :netsuite - - def self.values: -> ::Array[Orb::Models::EditCustomerModel::payment_provider] - end - end - end -end diff --git a/sig/orb/models/edit_plan_model.rbs b/sig/orb/models/edit_plan_model.rbs deleted file mode 100644 index abd77222..00000000 --- a/sig/orb/models/edit_plan_model.rbs +++ /dev/null @@ -1,18 +0,0 @@ -module Orb - module Models - type edit_plan_model = - { external_plan_id: String?, metadata: ::Hash[Symbol, String?]? } - - class EditPlanModel < Orb::BaseModel - attr_accessor external_plan_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - (external_plan_id: String?, metadata: ::Hash[Symbol, String?]?) -> void - | (?Orb::Models::edit_plan_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::edit_plan_model - end - end -end diff --git a/sig/orb/models/events/backfill_close_response.rbs b/sig/orb/models/events/backfill_close_response.rbs new file mode 100644 index 00000000..a964fe00 --- /dev/null +++ b/sig/orb/models/events/backfill_close_response.rbs @@ -0,0 +1,75 @@ +module Orb + module Models + module Events + type backfill_close_response = + { + id: String, + close_time: Time?, + created_at: Time, + customer_id: String?, + events_ingested: Integer, + replace_existing_events: bool, + reverted_at: Time?, + status: Orb::Models::Events::BackfillCloseResponse::status, + timeframe_end: Time, + timeframe_start: Time, + deprecation_filter: String? + } + + class BackfillCloseResponse < Orb::BaseModel + attr_accessor id: String + + attr_accessor close_time: Time? + + attr_accessor created_at: Time + + attr_accessor customer_id: String? + + attr_accessor events_ingested: Integer + + attr_accessor replace_existing_events: bool + + attr_accessor reverted_at: Time? + + attr_accessor status: Orb::Models::Events::BackfillCloseResponse::status + + attr_accessor timeframe_end: Time + + attr_accessor timeframe_start: Time + + attr_accessor deprecation_filter: String? + + def initialize: + ( + id: String, + close_time: Time?, + created_at: Time, + customer_id: String?, + events_ingested: Integer, + replace_existing_events: bool, + reverted_at: Time?, + status: Orb::Models::Events::BackfillCloseResponse::status, + timeframe_end: Time, + timeframe_start: Time, + deprecation_filter: String? + ) -> void + | ( + ?Orb::Models::Events::backfill_close_response | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Events::backfill_close_response + + type status = :pending | :reflected | :pending_revert | :reverted + + class Status < Orb::Enum + PENDING: :pending + REFLECTED: :reflected + PENDING_REVERT: :pending_revert + REVERTED: :reverted + + def self.values: -> ::Array[Orb::Models::Events::BackfillCloseResponse::status] + end + end + end + end +end diff --git a/sig/orb/models/events/backfill_create_response.rbs b/sig/orb/models/events/backfill_create_response.rbs new file mode 100644 index 00000000..1660a064 --- /dev/null +++ b/sig/orb/models/events/backfill_create_response.rbs @@ -0,0 +1,75 @@ +module Orb + module Models + module Events + type backfill_create_response = + { + id: String, + close_time: Time?, + created_at: Time, + customer_id: String?, + events_ingested: Integer, + replace_existing_events: bool, + reverted_at: Time?, + status: Orb::Models::Events::BackfillCreateResponse::status, + timeframe_end: Time, + timeframe_start: Time, + deprecation_filter: String? + } + + class BackfillCreateResponse < Orb::BaseModel + attr_accessor id: String + + attr_accessor close_time: Time? + + attr_accessor created_at: Time + + attr_accessor customer_id: String? + + attr_accessor events_ingested: Integer + + attr_accessor replace_existing_events: bool + + attr_accessor reverted_at: Time? + + attr_accessor status: Orb::Models::Events::BackfillCreateResponse::status + + attr_accessor timeframe_end: Time + + attr_accessor timeframe_start: Time + + attr_accessor deprecation_filter: String? + + def initialize: + ( + id: String, + close_time: Time?, + created_at: Time, + customer_id: String?, + events_ingested: Integer, + replace_existing_events: bool, + reverted_at: Time?, + status: Orb::Models::Events::BackfillCreateResponse::status, + timeframe_end: Time, + timeframe_start: Time, + deprecation_filter: String? + ) -> void + | ( + ?Orb::Models::Events::backfill_create_response | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Events::backfill_create_response + + type status = :pending | :reflected | :pending_revert | :reverted + + class Status < Orb::Enum + PENDING: :pending + REFLECTED: :reflected + PENDING_REVERT: :pending_revert + REVERTED: :reverted + + def self.values: -> ::Array[Orb::Models::Events::BackfillCreateResponse::status] + end + end + end + end +end diff --git a/sig/orb/models/events/backfill_fetch_response.rbs b/sig/orb/models/events/backfill_fetch_response.rbs new file mode 100644 index 00000000..f1f81b5b --- /dev/null +++ b/sig/orb/models/events/backfill_fetch_response.rbs @@ -0,0 +1,75 @@ +module Orb + module Models + module Events + type backfill_fetch_response = + { + id: String, + close_time: Time?, + created_at: Time, + customer_id: String?, + events_ingested: Integer, + replace_existing_events: bool, + reverted_at: Time?, + status: Orb::Models::Events::BackfillFetchResponse::status, + timeframe_end: Time, + timeframe_start: Time, + deprecation_filter: String? + } + + class BackfillFetchResponse < Orb::BaseModel + attr_accessor id: String + + attr_accessor close_time: Time? + + attr_accessor created_at: Time + + attr_accessor customer_id: String? + + attr_accessor events_ingested: Integer + + attr_accessor replace_existing_events: bool + + attr_accessor reverted_at: Time? + + attr_accessor status: Orb::Models::Events::BackfillFetchResponse::status + + attr_accessor timeframe_end: Time + + attr_accessor timeframe_start: Time + + attr_accessor deprecation_filter: String? + + def initialize: + ( + id: String, + close_time: Time?, + created_at: Time, + customer_id: String?, + events_ingested: Integer, + replace_existing_events: bool, + reverted_at: Time?, + status: Orb::Models::Events::BackfillFetchResponse::status, + timeframe_end: Time, + timeframe_start: Time, + deprecation_filter: String? + ) -> void + | ( + ?Orb::Models::Events::backfill_fetch_response | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Events::backfill_fetch_response + + type status = :pending | :reflected | :pending_revert | :reverted + + class Status < Orb::Enum + PENDING: :pending + REFLECTED: :reflected + PENDING_REVERT: :pending_revert + REVERTED: :reverted + + def self.values: -> ::Array[Orb::Models::Events::BackfillFetchResponse::status] + end + end + end + end +end diff --git a/sig/orb/models/events/backfill_list_response.rbs b/sig/orb/models/events/backfill_list_response.rbs new file mode 100644 index 00000000..751e66f8 --- /dev/null +++ b/sig/orb/models/events/backfill_list_response.rbs @@ -0,0 +1,75 @@ +module Orb + module Models + module Events + type backfill_list_response = + { + id: String, + close_time: Time?, + created_at: Time, + customer_id: String?, + events_ingested: Integer, + replace_existing_events: bool, + reverted_at: Time?, + status: Orb::Models::Events::BackfillListResponse::status, + timeframe_end: Time, + timeframe_start: Time, + deprecation_filter: String? + } + + class BackfillListResponse < Orb::BaseModel + attr_accessor id: String + + attr_accessor close_time: Time? + + attr_accessor created_at: Time + + attr_accessor customer_id: String? + + attr_accessor events_ingested: Integer + + attr_accessor replace_existing_events: bool + + attr_accessor reverted_at: Time? + + attr_accessor status: Orb::Models::Events::BackfillListResponse::status + + attr_accessor timeframe_end: Time + + attr_accessor timeframe_start: Time + + attr_accessor deprecation_filter: String? + + def initialize: + ( + id: String, + close_time: Time?, + created_at: Time, + customer_id: String?, + events_ingested: Integer, + replace_existing_events: bool, + reverted_at: Time?, + status: Orb::Models::Events::BackfillListResponse::status, + timeframe_end: Time, + timeframe_start: Time, + deprecation_filter: String? + ) -> void + | ( + ?Orb::Models::Events::backfill_list_response | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Events::backfill_list_response + + type status = :pending | :reflected | :pending_revert | :reverted + + class Status < Orb::Enum + PENDING: :pending + REFLECTED: :reflected + PENDING_REVERT: :pending_revert + REVERTED: :reverted + + def self.values: -> ::Array[Orb::Models::Events::BackfillListResponse::status] + end + end + end + end +end diff --git a/sig/orb/models/events/backfill_revert_response.rbs b/sig/orb/models/events/backfill_revert_response.rbs new file mode 100644 index 00000000..85f5b7b3 --- /dev/null +++ b/sig/orb/models/events/backfill_revert_response.rbs @@ -0,0 +1,75 @@ +module Orb + module Models + module Events + type backfill_revert_response = + { + id: String, + close_time: Time?, + created_at: Time, + customer_id: String?, + events_ingested: Integer, + replace_existing_events: bool, + reverted_at: Time?, + status: Orb::Models::Events::BackfillRevertResponse::status, + timeframe_end: Time, + timeframe_start: Time, + deprecation_filter: String? + } + + class BackfillRevertResponse < Orb::BaseModel + attr_accessor id: String + + attr_accessor close_time: Time? + + attr_accessor created_at: Time + + attr_accessor customer_id: String? + + attr_accessor events_ingested: Integer + + attr_accessor replace_existing_events: bool + + attr_accessor reverted_at: Time? + + attr_accessor status: Orb::Models::Events::BackfillRevertResponse::status + + attr_accessor timeframe_end: Time + + attr_accessor timeframe_start: Time + + attr_accessor deprecation_filter: String? + + def initialize: + ( + id: String, + close_time: Time?, + created_at: Time, + customer_id: String?, + events_ingested: Integer, + replace_existing_events: bool, + reverted_at: Time?, + status: Orb::Models::Events::BackfillRevertResponse::status, + timeframe_end: Time, + timeframe_start: Time, + deprecation_filter: String? + ) -> void + | ( + ?Orb::Models::Events::backfill_revert_response | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Events::backfill_revert_response + + type status = :pending | :reflected | :pending_revert | :reverted + + class Status < Orb::Enum + PENDING: :pending + REFLECTED: :reflected + PENDING_REVERT: :pending_revert + REVERTED: :reverted + + def self.values: -> ::Array[Orb::Models::Events::BackfillRevertResponse::status] + end + end + end + end +end diff --git a/sig/orb/models/fixed_fee_quantity_schedule_entry_model.rbs b/sig/orb/models/fixed_fee_quantity_schedule_entry_model.rbs deleted file mode 100644 index 1388510c..00000000 --- a/sig/orb/models/fixed_fee_quantity_schedule_entry_model.rbs +++ /dev/null @@ -1,30 +0,0 @@ -module Orb - module Models - type fixed_fee_quantity_schedule_entry_model = - { end_date: Time?, price_id: String, quantity: Float, start_date: Time } - - class FixedFeeQuantityScheduleEntryModel < Orb::BaseModel - attr_accessor end_date: Time? - - attr_accessor price_id: String - - attr_accessor quantity: Float - - attr_accessor start_date: Time - - def initialize: - ( - end_date: Time?, - price_id: String, - quantity: Float, - start_date: Time - ) -> void - | ( - ?Orb::Models::fixed_fee_quantity_schedule_entry_model - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::fixed_fee_quantity_schedule_entry_model - end - end -end diff --git a/sig/orb/models/invoice.rbs b/sig/orb/models/invoice.rbs index 1567fb3c..3cff062c 100644 --- a/sig/orb/models/invoice.rbs +++ b/sig/orb/models/invoice.rbs @@ -4,14 +4,14 @@ module Orb { id: String, amount_due: String, - auto_collection: Orb::Models::AutoCollectionModel, - billing_address: Orb::Models::AddressModel?, + auto_collection: Orb::Models::Invoice::AutoCollection, + billing_address: Orb::Models::Invoice::BillingAddress?, created_at: Time, - credit_notes: ::Array[Orb::Models::CreditNoteSummaryModel], + credit_notes: ::Array[Orb::Models::Invoice::CreditNote], currency: String, - customer: Orb::Models::CustomerMinifiedModel, - customer_balance_transactions: ::Array[Orb::Models::CustomerBalanceTransactionModel], - customer_tax_id: Orb::Models::CustomerTaxIDModel?, + customer: Orb::Models::Invoice::Customer, + customer_balance_transactions: ::Array[Orb::Models::Invoice::CustomerBalanceTransaction], + customer_tax_id: Orb::Models::Invoice::CustomerTaxID?, discount: top, discounts: ::Array[Orb::Models::invoice_level_discount], due_date: Time?, @@ -23,21 +23,21 @@ module Orb invoice_source: Orb::Models::Invoice::invoice_source, issue_failed_at: Time?, issued_at: Time?, - line_items: ::Array[Orb::Models::InvoiceLineItemModel], - maximum: Orb::Models::MaximumModel?, + line_items: ::Array[Orb::Models::Invoice::LineItem], + maximum: Orb::Models::Invoice::Maximum?, maximum_amount: String?, memo: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Invoice::Minimum?, minimum_amount: String?, paid_at: Time?, - payment_attempts: ::Array[Orb::Models::PaymentAttemptModel], + payment_attempts: ::Array[Orb::Models::Invoice::PaymentAttempt], payment_failed_at: Time?, payment_started_at: Time?, scheduled_issue_at: Time?, - shipping_address: Orb::Models::AddressModel?, + shipping_address: Orb::Models::Invoice::ShippingAddress?, status: Orb::Models::Invoice::status, - subscription: Orb::Models::SubscriptionMinifiedModel?, + subscription: Orb::Models::Invoice::Subscription?, subtotal: String, sync_failed_at: Time?, total: String, @@ -50,21 +50,21 @@ module Orb attr_accessor amount_due: String - attr_accessor auto_collection: Orb::Models::AutoCollectionModel + attr_accessor auto_collection: Orb::Models::Invoice::AutoCollection - attr_accessor billing_address: Orb::Models::AddressModel? + attr_accessor billing_address: Orb::Models::Invoice::BillingAddress? attr_accessor created_at: Time - attr_accessor credit_notes: ::Array[Orb::Models::CreditNoteSummaryModel] + attr_accessor credit_notes: ::Array[Orb::Models::Invoice::CreditNote] attr_accessor currency: String - attr_accessor customer: Orb::Models::CustomerMinifiedModel + attr_accessor customer: Orb::Models::Invoice::Customer - attr_accessor customer_balance_transactions: ::Array[Orb::Models::CustomerBalanceTransactionModel] + attr_accessor customer_balance_transactions: ::Array[Orb::Models::Invoice::CustomerBalanceTransaction] - attr_accessor customer_tax_id: Orb::Models::CustomerTaxIDModel? + attr_accessor customer_tax_id: Orb::Models::Invoice::CustomerTaxID? attr_accessor discount: top @@ -88,9 +88,9 @@ module Orb attr_accessor issued_at: Time? - attr_accessor line_items: ::Array[Orb::Models::InvoiceLineItemModel] + attr_accessor line_items: ::Array[Orb::Models::Invoice::LineItem] - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Invoice::Maximum? attr_accessor maximum_amount: String? @@ -98,13 +98,13 @@ module Orb attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Invoice::Minimum? attr_accessor minimum_amount: String? attr_accessor paid_at: Time? - attr_accessor payment_attempts: ::Array[Orb::Models::PaymentAttemptModel] + attr_accessor payment_attempts: ::Array[Orb::Models::Invoice::PaymentAttempt] attr_accessor payment_failed_at: Time? @@ -112,11 +112,11 @@ module Orb attr_accessor scheduled_issue_at: Time? - attr_accessor shipping_address: Orb::Models::AddressModel? + attr_accessor shipping_address: Orb::Models::Invoice::ShippingAddress? attr_accessor status: Orb::Models::Invoice::status - attr_accessor subscription: Orb::Models::SubscriptionMinifiedModel? + attr_accessor subscription: Orb::Models::Invoice::Subscription? attr_accessor subtotal: String @@ -132,14 +132,14 @@ module Orb ( id: String, amount_due: String, - auto_collection: Orb::Models::AutoCollectionModel, - billing_address: Orb::Models::AddressModel?, + auto_collection: Orb::Models::Invoice::AutoCollection, + billing_address: Orb::Models::Invoice::BillingAddress?, created_at: Time, - credit_notes: ::Array[Orb::Models::CreditNoteSummaryModel], + credit_notes: ::Array[Orb::Models::Invoice::CreditNote], currency: String, - customer: Orb::Models::CustomerMinifiedModel, - customer_balance_transactions: ::Array[Orb::Models::CustomerBalanceTransactionModel], - customer_tax_id: Orb::Models::CustomerTaxIDModel?, + customer: Orb::Models::Invoice::Customer, + customer_balance_transactions: ::Array[Orb::Models::Invoice::CustomerBalanceTransaction], + customer_tax_id: Orb::Models::Invoice::CustomerTaxID?, discount: top, discounts: ::Array[Orb::Models::invoice_level_discount], due_date: Time?, @@ -151,21 +151,21 @@ module Orb invoice_source: Orb::Models::Invoice::invoice_source, issue_failed_at: Time?, issued_at: Time?, - line_items: ::Array[Orb::Models::InvoiceLineItemModel], - maximum: Orb::Models::MaximumModel?, + line_items: ::Array[Orb::Models::Invoice::LineItem], + maximum: Orb::Models::Invoice::Maximum?, maximum_amount: String?, memo: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Invoice::Minimum?, minimum_amount: String?, paid_at: Time?, - payment_attempts: ::Array[Orb::Models::PaymentAttemptModel], + payment_attempts: ::Array[Orb::Models::Invoice::PaymentAttempt], payment_failed_at: Time?, payment_started_at: Time?, scheduled_issue_at: Time?, - shipping_address: Orb::Models::AddressModel?, + shipping_address: Orb::Models::Invoice::ShippingAddress?, status: Orb::Models::Invoice::status, - subscription: Orb::Models::SubscriptionMinifiedModel?, + subscription: Orb::Models::Invoice::Subscription?, subtotal: String, sync_failed_at: Time?, total: String, @@ -176,6 +176,590 @@ module Orb def to_hash: -> Orb::Models::invoice + type auto_collection = + { + enabled: bool?, + next_attempt_at: Time?, + num_attempts: Integer?, + previously_attempted_at: Time? + } + + class AutoCollection < Orb::BaseModel + attr_accessor enabled: bool? + + attr_accessor next_attempt_at: Time? + + attr_accessor num_attempts: Integer? + + attr_accessor previously_attempted_at: Time? + + def initialize: + ( + enabled: bool?, + next_attempt_at: Time?, + num_attempts: Integer?, + previously_attempted_at: Time? + ) -> void + | ( + ?Orb::Models::Invoice::auto_collection | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::auto_collection + end + + type billing_address = + { + city: String?, + country: String?, + :line1 => String?, + :line2 => String?, + postal_code: String?, + state: String? + } + + class BillingAddress < Orb::BaseModel + attr_accessor city: String? + + attr_accessor country: String? + + attr_accessor line1: String? + + attr_accessor line2: String? + + attr_accessor postal_code: String? + + attr_accessor state: String? + + def initialize: + ( + city: String?, + country: String?, + line1: String?, + line2: String?, + postal_code: String?, + state: String? + ) -> void + | ( + ?Orb::Models::Invoice::billing_address | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::billing_address + end + + type credit_note = + { + id: String, + credit_note_number: String, + memo: String?, + reason: String, + total: String, + type: String, + voided_at: Time? + } + + class CreditNote < Orb::BaseModel + attr_accessor id: String + + attr_accessor credit_note_number: String + + attr_accessor memo: String? + + attr_accessor reason: String + + attr_accessor total: String + + attr_accessor type: String + + attr_accessor voided_at: Time? + + def initialize: + ( + id: String, + credit_note_number: String, + memo: String?, + reason: String, + total: String, + type: String, + voided_at: Time? + ) -> void + | (?Orb::Models::Invoice::credit_note | Orb::BaseModel data) -> void + + def to_hash: -> Orb::Models::Invoice::credit_note + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | (?Orb::Models::Invoice::customer | Orb::BaseModel data) -> void + + def to_hash: -> Orb::Models::Invoice::customer + end + + type customer_balance_transaction = + { + id: String, + action: Orb::Models::Invoice::CustomerBalanceTransaction::action, + amount: String, + created_at: Time, + credit_note: Orb::Models::Invoice::CustomerBalanceTransaction::CreditNote?, + description: String?, + ending_balance: String, + invoice: Orb::Models::Invoice::CustomerBalanceTransaction::Invoice?, + starting_balance: String, + type: Orb::Models::Invoice::CustomerBalanceTransaction::type_ + } + + class CustomerBalanceTransaction < Orb::BaseModel + attr_accessor id: String + + attr_accessor action: Orb::Models::Invoice::CustomerBalanceTransaction::action + + attr_accessor amount: String + + attr_accessor created_at: Time + + attr_accessor credit_note: Orb::Models::Invoice::CustomerBalanceTransaction::CreditNote? + + attr_accessor description: String? + + attr_accessor ending_balance: String + + attr_accessor invoice: Orb::Models::Invoice::CustomerBalanceTransaction::Invoice? + + attr_accessor starting_balance: String + + attr_accessor type: Orb::Models::Invoice::CustomerBalanceTransaction::type_ + + def initialize: + ( + id: String, + action: Orb::Models::Invoice::CustomerBalanceTransaction::action, + amount: String, + created_at: Time, + credit_note: Orb::Models::Invoice::CustomerBalanceTransaction::CreditNote?, + description: String?, + ending_balance: String, + invoice: Orb::Models::Invoice::CustomerBalanceTransaction::Invoice?, + starting_balance: String, + type: Orb::Models::Invoice::CustomerBalanceTransaction::type_ + ) -> void + | ( + ?Orb::Models::Invoice::customer_balance_transaction + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::customer_balance_transaction + + type action = + :applied_to_invoice + | :manual_adjustment + | :prorated_refund + | :revert_prorated_refund + | :return_from_voiding + | :credit_note_applied + | :credit_note_voided + | :overpayment_refund + | :external_payment + + class Action < Orb::Enum + APPLIED_TO_INVOICE: :applied_to_invoice + MANUAL_ADJUSTMENT: :manual_adjustment + PRORATED_REFUND: :prorated_refund + REVERT_PRORATED_REFUND: :revert_prorated_refund + RETURN_FROM_VOIDING: :return_from_voiding + CREDIT_NOTE_APPLIED: :credit_note_applied + CREDIT_NOTE_VOIDED: :credit_note_voided + OVERPAYMENT_REFUND: :overpayment_refund + EXTERNAL_PAYMENT: :external_payment + + def self.values: -> ::Array[Orb::Models::Invoice::CustomerBalanceTransaction::action] + end + + type credit_note = { id: String } + + class CreditNote < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Invoice::CustomerBalanceTransaction::credit_note + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::CustomerBalanceTransaction::credit_note + end + + type invoice = { id: String } + + class Invoice < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Invoice::CustomerBalanceTransaction::invoice + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::CustomerBalanceTransaction::invoice + end + + type type_ = :increment | :decrement + + class Type < Orb::Enum + INCREMENT: :increment + DECREMENT: :decrement + + def self.values: -> ::Array[Orb::Models::Invoice::CustomerBalanceTransaction::type_] + end + end + + type customer_tax_id = + { + country: Orb::Models::Invoice::CustomerTaxID::country, + type: Orb::Models::Invoice::CustomerTaxID::type_, + value: String + } + + class CustomerTaxID < Orb::BaseModel + attr_accessor country: Orb::Models::Invoice::CustomerTaxID::country + + attr_accessor type: Orb::Models::Invoice::CustomerTaxID::type_ + + attr_accessor value: String + + def initialize: + ( + country: Orb::Models::Invoice::CustomerTaxID::country, + type: Orb::Models::Invoice::CustomerTaxID::type_, + value: String + ) -> void + | ( + ?Orb::Models::Invoice::customer_tax_id | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::customer_tax_id + + type country = + :AD + | :AE + | :AR + | :AT + | :AU + | :BE + | :BG + | :BH + | :BO + | :BR + | :CA + | :CH + | :CL + | :CN + | :CO + | :CR + | :CY + | :CZ + | :DE + | :DK + | :EE + | :DO + | :EC + | :EG + | :ES + | :EU + | :FI + | :FR + | :GB + | :GE + | :GR + | :HK + | :HR + | :HU + | :ID + | :IE + | :IL + | :IN + | :IS + | :IT + | :JP + | :KE + | :KR + | :KZ + | :LI + | :LT + | :LU + | :LV + | :MT + | :MX + | :MY + | :NG + | :NL + | :NO + | :NZ + | :OM + | :PE + | :PH + | :PL + | :PT + | :RO + | :RS + | :RU + | :SA + | :SE + | :SG + | :SI + | :SK + | :SV + | :TH + | :TR + | :TW + | :UA + | :US + | :UY + | :VE + | :VN + | :ZA + + class Country < Orb::Enum + AD: :AD + AE: :AE + AR: :AR + AT: :AT + AU: :AU + BE: :BE + BG: :BG + BH: :BH + BO: :BO + BR: :BR + CA: :CA + CH: :CH + CL: :CL + CN: :CN + CO: :CO + CR: :CR + CY: :CY + CZ: :CZ + DE: :DE + DK: :DK + EE: :EE + DO: :DO + EC: :EC + EG: :EG + ES: :ES + EU: :EU + FI: :FI + FR: :FR + GB: :GB + GE: :GE + GR: :GR + HK: :HK + HR: :HR + HU: :HU + ID: :ID + IE: :IE + IL: :IL + IN: :IN + IS: :IS + IT: :IT + JP: :JP + KE: :KE + KR: :KR + KZ: :KZ + LI: :LI + LT: :LT + LU: :LU + LV: :LV + MT: :MT + MX: :MX + MY: :MY + NG: :NG + NL: :NL + NO: :NO + NZ: :NZ + OM: :OM + PE: :PE + PH: :PH + PL: :PL + PT: :PT + RO: :RO + RS: :RS + RU: :RU + SA: :SA + SE: :SE + SG: :SG + SI: :SI + SK: :SK + SV: :SV + TH: :TH + TR: :TR + TW: :TW + UA: :UA + US: :US + UY: :UY + VE: :VE + VN: :VN + ZA: :ZA + + def self.values: -> ::Array[Orb::Models::Invoice::CustomerTaxID::country] + end + + type type_ = + :ad_nrt + | :ae_trn + | :ar_cuit + | :eu_vat + | :au_abn + | :au_arn + | :bg_uic + | :bh_vat + | :bo_tin + | :br_cnpj + | :br_cpf + | :ca_bn + | :ca_gst_hst + | :ca_pst_bc + | :ca_pst_mb + | :ca_pst_sk + | :ca_qst + | :ch_vat + | :cl_tin + | :cn_tin + | :co_nit + | :cr_tin + | :do_rcn + | :ec_ruc + | :eg_tin + | :es_cif + | :eu_oss_vat + | :gb_vat + | :ge_vat + | :hk_br + | :hu_tin + | :id_npwp + | :il_vat + | :in_gst + | :is_vat + | :jp_cn + | :jp_rn + | :jp_trn + | :ke_pin + | :kr_brn + | :kz_bin + | :li_uid + | :mx_rfc + | :my_frp + | :my_itn + | :my_sst + | :ng_tin + | :no_vat + | :no_voec + | :nz_gst + | :om_vat + | :pe_ruc + | :ph_tin + | :ro_tin + | :rs_pib + | :ru_inn + | :ru_kpp + | :sa_vat + | :sg_gst + | :sg_uen + | :si_tin + | :sv_nit + | :th_vat + | :tr_tin + | :tw_vat + | :ua_vat + | :us_ein + | :uy_ruc + | :ve_rif + | :vn_tin + | :za_vat + + class Type < Orb::Enum + AD_NRT: :ad_nrt + AE_TRN: :ae_trn + AR_CUIT: :ar_cuit + EU_VAT: :eu_vat + AU_ABN: :au_abn + AU_ARN: :au_arn + BG_UIC: :bg_uic + BH_VAT: :bh_vat + BO_TIN: :bo_tin + BR_CNPJ: :br_cnpj + BR_CPF: :br_cpf + CA_BN: :ca_bn + CA_GST_HST: :ca_gst_hst + CA_PST_BC: :ca_pst_bc + CA_PST_MB: :ca_pst_mb + CA_PST_SK: :ca_pst_sk + CA_QST: :ca_qst + CH_VAT: :ch_vat + CL_TIN: :cl_tin + CN_TIN: :cn_tin + CO_NIT: :co_nit + CR_TIN: :cr_tin + DO_RCN: :do_rcn + EC_RUC: :ec_ruc + EG_TIN: :eg_tin + ES_CIF: :es_cif + EU_OSS_VAT: :eu_oss_vat + GB_VAT: :gb_vat + GE_VAT: :ge_vat + HK_BR: :hk_br + HU_TIN: :hu_tin + ID_NPWP: :id_npwp + IL_VAT: :il_vat + IN_GST: :in_gst + IS_VAT: :is_vat + JP_CN: :jp_cn + JP_RN: :jp_rn + JP_TRN: :jp_trn + KE_PIN: :ke_pin + KR_BRN: :kr_brn + KZ_BIN: :kz_bin + LI_UID: :li_uid + MX_RFC: :mx_rfc + MY_FRP: :my_frp + MY_ITN: :my_itn + MY_SST: :my_sst + NG_TIN: :ng_tin + NO_VAT: :no_vat + NO_VOEC: :no_voec + NZ_GST: :nz_gst + OM_VAT: :om_vat + PE_RUC: :pe_ruc + PH_TIN: :ph_tin + RO_TIN: :ro_tin + RS_PIB: :rs_pib + RU_INN: :ru_inn + RU_KPP: :ru_kpp + SA_VAT: :sa_vat + SG_GST: :sg_gst + SG_UEN: :sg_uen + SI_TIN: :si_tin + SV_NIT: :sv_nit + TH_VAT: :th_vat + TR_TIN: :tr_tin + TW_VAT: :tw_vat + UA_VAT: :ua_vat + US_EIN: :us_ein + UY_RUC: :uy_ruc + VE_RIF: :ve_rif + VN_TIN: :vn_tin + ZA_VAT: :za_vat + + def self.values: -> ::Array[Orb::Models::Invoice::CustomerTaxID::type_] + end + end + type invoice_source = :subscription | :partial | :one_off class InvoiceSource < Orb::Enum @@ -186,6 +770,746 @@ module Orb def self.values: -> ::Array[Orb::Models::Invoice::invoice_source] end + type line_item = + { + id: String, + adjusted_subtotal: String, + adjustments: ::Array[Orb::Models::Invoice::LineItem::adjustment], + amount: String, + credits_applied: String, + discount: Orb::Models::discount?, + end_date: Time, + filter: String?, + grouping: String?, + maximum: Orb::Models::Invoice::LineItem::Maximum?, + maximum_amount: String?, + minimum: Orb::Models::Invoice::LineItem::Minimum?, + minimum_amount: String?, + name: String, + partially_invoiced_amount: String, + price: Orb::Models::price?, + quantity: Float, + start_date: Time, + sub_line_items: ::Array[Orb::Models::Invoice::LineItem::sub_line_item], + subtotal: String, + tax_amounts: ::Array[Orb::Models::Invoice::LineItem::TaxAmount], + usage_customer_ids: ::Array[String]? + } + + class LineItem < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjusted_subtotal: String + + attr_accessor adjustments: ::Array[Orb::Models::Invoice::LineItem::adjustment] + + attr_accessor amount: String + + attr_accessor credits_applied: String + + attr_accessor discount: Orb::Models::discount? + + attr_accessor end_date: Time + + attr_accessor filter: String? + + attr_accessor grouping: String? + + attr_accessor maximum: Orb::Models::Invoice::LineItem::Maximum? + + attr_accessor maximum_amount: String? + + attr_accessor minimum: Orb::Models::Invoice::LineItem::Minimum? + + attr_accessor minimum_amount: String? + + attr_accessor name: String + + attr_accessor partially_invoiced_amount: String + + attr_accessor price: Orb::Models::price? + + attr_accessor quantity: Float + + attr_accessor start_date: Time + + attr_accessor sub_line_items: ::Array[Orb::Models::Invoice::LineItem::sub_line_item] + + attr_accessor subtotal: String + + attr_accessor tax_amounts: ::Array[Orb::Models::Invoice::LineItem::TaxAmount] + + attr_accessor usage_customer_ids: ::Array[String]? + + def initialize: + ( + id: String, + adjusted_subtotal: String, + adjustments: ::Array[Orb::Models::Invoice::LineItem::adjustment], + amount: String, + credits_applied: String, + discount: Orb::Models::discount?, + end_date: Time, + filter: String?, + grouping: String?, + maximum: Orb::Models::Invoice::LineItem::Maximum?, + maximum_amount: String?, + minimum: Orb::Models::Invoice::LineItem::Minimum?, + minimum_amount: String?, + name: String, + partially_invoiced_amount: String, + price: Orb::Models::price?, + quantity: Float, + start_date: Time, + sub_line_items: ::Array[Orb::Models::Invoice::LineItem::sub_line_item], + subtotal: String, + tax_amounts: ::Array[Orb::Models::Invoice::LineItem::TaxAmount], + usage_customer_ids: ::Array[String]? + ) -> void + | (?Orb::Models::Invoice::line_item | Orb::BaseModel data) -> void + + def to_hash: -> Orb::Models::Invoice::line_item + + type adjustment = + Orb::Models::Invoice::LineItem::Adjustment::MonetaryUsageDiscountAdjustment + | Orb::Models::Invoice::LineItem::Adjustment::MonetaryAmountDiscountAdjustment + | Orb::Models::Invoice::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment + | Orb::Models::Invoice::LineItem::Adjustment::MonetaryMinimumAdjustment + | Orb::Models::Invoice::LineItem::Adjustment::MonetaryMaximumAdjustment + + class Adjustment < Orb::Union + type monetary_usage_discount_adjustment = + { + id: String, + adjustment_type: :usage_discount, + amount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + reason: String?, + usage_discount: Float + } + + class MonetaryUsageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :usage_discount + + attr_accessor amount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor reason: String? + + attr_accessor usage_discount: Float + + def initialize: + ( + id: String, + amount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + reason: String?, + usage_discount: Float, + adjustment_type: :usage_discount + ) -> void + | ( + ?Orb::Models::Invoice::LineItem::Adjustment::monetary_usage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::LineItem::Adjustment::monetary_usage_discount_adjustment + end + + type monetary_amount_discount_adjustment = + { + id: String, + adjustment_type: :amount_discount, + amount: String, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + reason: String? + } + + class MonetaryAmountDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :amount_discount + + attr_accessor amount: String + + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor reason: String? + + def initialize: + ( + id: String, + amount: String, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + reason: String?, + adjustment_type: :amount_discount + ) -> void + | ( + ?Orb::Models::Invoice::LineItem::Adjustment::monetary_amount_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::LineItem::Adjustment::monetary_amount_discount_adjustment + end + + type monetary_percentage_discount_adjustment = + { + id: String, + adjustment_type: :percentage_discount, + amount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + reason: String? + } + + class MonetaryPercentageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :percentage_discount + + attr_accessor amount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor percentage_discount: Float + + attr_accessor reason: String? + + def initialize: + ( + id: String, + amount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + reason: String?, + adjustment_type: :percentage_discount + ) -> void + | ( + ?Orb::Models::Invoice::LineItem::Adjustment::monetary_percentage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::LineItem::Adjustment::monetary_percentage_discount_adjustment + end + + type monetary_minimum_adjustment = + { + id: String, + adjustment_type: :minimum, + amount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + reason: String? + } + + class MonetaryMinimumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :minimum + + attr_accessor amount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor item_id: String + + attr_accessor minimum_amount: String + + attr_accessor reason: String? + + def initialize: + ( + id: String, + amount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + reason: String?, + adjustment_type: :minimum + ) -> void + | ( + ?Orb::Models::Invoice::LineItem::Adjustment::monetary_minimum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::LineItem::Adjustment::monetary_minimum_adjustment + end + + type monetary_maximum_adjustment = + { + id: String, + adjustment_type: :maximum, + amount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + reason: String? + } + + class MonetaryMaximumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :maximum + + attr_accessor amount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor maximum_amount: String + + attr_accessor reason: String? + + def initialize: + ( + id: String, + amount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + reason: String?, + adjustment_type: :maximum + ) -> void + | ( + ?Orb::Models::Invoice::LineItem::Adjustment::monetary_maximum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::LineItem::Adjustment::monetary_maximum_adjustment + end + + private def self.variants: -> [[:usage_discount, Orb::Models::Invoice::LineItem::Adjustment::MonetaryUsageDiscountAdjustment], [:amount_discount, Orb::Models::Invoice::LineItem::Adjustment::MonetaryAmountDiscountAdjustment], [:percentage_discount, Orb::Models::Invoice::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment], [:minimum, Orb::Models::Invoice::LineItem::Adjustment::MonetaryMinimumAdjustment], [:maximum, Orb::Models::Invoice::LineItem::Adjustment::MonetaryMaximumAdjustment]] + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Invoice::LineItem::maximum | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::LineItem::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Invoice::LineItem::minimum | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::LineItem::minimum + end + + type sub_line_item = + Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem + | Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem + | Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem + + class SubLineItem < Orb::Union + type matrix_sub_line_item = + { + amount: String, + grouping: Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::Grouping?, + matrix_config: Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig, + name: String, + quantity: Float, + type: :matrix + } + + class MatrixSubLineItem < Orb::BaseModel + attr_accessor amount: String + + attr_accessor grouping: Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::Grouping? + + attr_accessor matrix_config: Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig + + attr_accessor name: String + + attr_accessor quantity: Float + + attr_accessor type: :matrix + + def initialize: + ( + amount: String, + grouping: Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::Grouping?, + matrix_config: Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig, + name: String, + quantity: Float, + type: :matrix + ) -> void + | ( + ?Orb::Models::Invoice::LineItem::SubLineItem::matrix_sub_line_item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::LineItem::SubLineItem::matrix_sub_line_item + + type grouping = { key: String, value: String? } + + class Grouping < Orb::BaseModel + attr_accessor key: String + + attr_accessor value: String? + + def initialize: + (key: String, value: String?) -> void + | ( + ?Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::grouping + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::grouping + end + + type matrix_config = { dimension_values: ::Array[String?] } + + class MatrixConfig < Orb::BaseModel + attr_accessor dimension_values: ::Array[String?] + + def initialize: + (dimension_values: ::Array[String?]) -> void + | ( + ?Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::matrix_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::matrix_config + end + end + + type tier_sub_line_item = + { + amount: String, + grouping: Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::Grouping?, + name: String, + quantity: Float, + tier_config: Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::TierConfig, + type: :tier + } + + class TierSubLineItem < Orb::BaseModel + attr_accessor amount: String + + attr_accessor grouping: Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::Grouping? + + attr_accessor name: String + + attr_accessor quantity: Float + + attr_accessor tier_config: Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::TierConfig + + attr_accessor type: :tier + + def initialize: + ( + amount: String, + grouping: Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::Grouping?, + name: String, + quantity: Float, + tier_config: Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::TierConfig, + type: :tier + ) -> void + | ( + ?Orb::Models::Invoice::LineItem::SubLineItem::tier_sub_line_item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::LineItem::SubLineItem::tier_sub_line_item + + type grouping = { key: String, value: String? } + + class Grouping < Orb::BaseModel + attr_accessor key: String + + attr_accessor value: String? + + def initialize: + (key: String, value: String?) -> void + | ( + ?Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::grouping + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::grouping + end + + type tier_config = + { first_unit: Float, last_unit: Float?, unit_amount: String } + + class TierConfig < Orb::BaseModel + attr_accessor first_unit: Float + + attr_accessor last_unit: Float? + + attr_accessor unit_amount: String + + def initialize: + ( + first_unit: Float, + last_unit: Float?, + unit_amount: String + ) -> void + | ( + ?Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::tier_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::tier_config + end + end + + type other_sub_line_item = + { + amount: String, + grouping: Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem::Grouping?, + name: String, + quantity: Float, + type: :"'null'" + } + + class OtherSubLineItem < Orb::BaseModel + attr_accessor amount: String + + attr_accessor grouping: Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem::Grouping? + + attr_accessor name: String + + attr_accessor quantity: Float + + attr_accessor type: :"'null'" + + def initialize: + ( + amount: String, + grouping: Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem::Grouping?, + name: String, + quantity: Float, + type: :"'null'" + ) -> void + | ( + ?Orb::Models::Invoice::LineItem::SubLineItem::other_sub_line_item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::LineItem::SubLineItem::other_sub_line_item + + type grouping = { key: String, value: String? } + + class Grouping < Orb::BaseModel + attr_accessor key: String + + attr_accessor value: String? + + def initialize: + (key: String, value: String?) -> void + | ( + ?Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem::grouping + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem::grouping + end + end + + private def self.variants: -> [[:matrix, Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem], [:tier, Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem], [:"'null'", Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem]] + end + + type tax_amount = + { + amount: String, + tax_rate_description: String, + tax_rate_percentage: String? + } + + class TaxAmount < Orb::BaseModel + attr_accessor amount: String + + attr_accessor tax_rate_description: String + + attr_accessor tax_rate_percentage: String? + + def initialize: + ( + amount: String, + tax_rate_description: String, + tax_rate_percentage: String? + ) -> void + | ( + ?Orb::Models::Invoice::LineItem::tax_amount | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::LineItem::tax_amount + end + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | (?Orb::Models::Invoice::maximum | Orb::BaseModel data) -> void + + def to_hash: -> Orb::Models::Invoice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | (?Orb::Models::Invoice::minimum | Orb::BaseModel data) -> void + + def to_hash: -> Orb::Models::Invoice::minimum + end + + type payment_attempt = + { + id: String, + amount: String, + created_at: Time, + payment_provider: Orb::Models::Invoice::PaymentAttempt::payment_provider?, + payment_provider_id: String?, + succeeded: bool + } + + class PaymentAttempt < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: String + + attr_accessor created_at: Time + + attr_accessor payment_provider: Orb::Models::Invoice::PaymentAttempt::payment_provider? + + attr_accessor payment_provider_id: String? + + attr_accessor succeeded: bool + + def initialize: + ( + id: String, + amount: String, + created_at: Time, + payment_provider: Orb::Models::Invoice::PaymentAttempt::payment_provider?, + payment_provider_id: String?, + succeeded: bool + ) -> void + | ( + ?Orb::Models::Invoice::payment_attempt | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::payment_attempt + + type payment_provider = :stripe + + class PaymentProvider < Orb::Enum + STRIPE: :stripe + + def self.values: -> ::Array[Orb::Models::Invoice::PaymentAttempt::payment_provider] + end + end + + type shipping_address = + { + city: String?, + country: String?, + :line1 => String?, + :line2 => String?, + postal_code: String?, + state: String? + } + + class ShippingAddress < Orb::BaseModel + attr_accessor city: String? + + attr_accessor country: String? + + attr_accessor line1: String? + + attr_accessor line2: String? + + attr_accessor postal_code: String? + + attr_accessor state: String? + + def initialize: + ( + city: String?, + country: String?, + line1: String?, + line2: String?, + postal_code: String?, + state: String? + ) -> void + | ( + ?Orb::Models::Invoice::shipping_address | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Invoice::shipping_address + end + type status = :issued | :paid | :synced | :void | :draft class Status < Orb::Enum @@ -197,6 +1521,18 @@ module Orb def self.values: -> ::Array[Orb::Models::Invoice::status] end + + type subscription = { id: String } + + class Subscription < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | (?Orb::Models::Invoice::subscription | Orb::BaseModel data) -> void + + def to_hash: -> Orb::Models::Invoice::subscription + end end end end diff --git a/sig/orb/models/invoice_create_params.rbs b/sig/orb/models/invoice_create_params.rbs index e48a5e68..ee7149e0 100644 --- a/sig/orb/models/invoice_create_params.rbs +++ b/sig/orb/models/invoice_create_params.rbs @@ -67,7 +67,7 @@ module Orb name: String, quantity: Float, start_date: Date, - unit_config: Orb::Models::UnitConfigModel + unit_config: Orb::Models::InvoiceCreateParams::LineItem::UnitConfig } class LineItem < Orb::BaseModel @@ -83,7 +83,7 @@ module Orb attr_accessor start_date: Date - attr_accessor unit_config: Orb::Models::UnitConfigModel + attr_accessor unit_config: Orb::Models::InvoiceCreateParams::LineItem::UnitConfig def initialize: ( @@ -93,7 +93,7 @@ module Orb name: String, quantity: Float, start_date: Date, - unit_config: Orb::Models::UnitConfigModel + unit_config: Orb::Models::InvoiceCreateParams::LineItem::UnitConfig ) -> void | ( ?Orb::Models::InvoiceCreateParams::line_item | Orb::BaseModel data @@ -108,6 +108,21 @@ module Orb def self.values: -> ::Array[Orb::Models::InvoiceCreateParams::LineItem::model_type] end + + type unit_config = { unit_amount: String } + + class UnitConfig < Orb::BaseModel + attr_accessor unit_amount: String + + def initialize: + (unit_amount: String) -> void + | ( + ?Orb::Models::InvoiceCreateParams::LineItem::unit_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceCreateParams::LineItem::unit_config + end end end end diff --git a/sig/orb/models/invoice_fetch_upcoming_response.rbs b/sig/orb/models/invoice_fetch_upcoming_response.rbs index 90f7062e..83cf8f58 100644 --- a/sig/orb/models/invoice_fetch_upcoming_response.rbs +++ b/sig/orb/models/invoice_fetch_upcoming_response.rbs @@ -4,14 +4,14 @@ module Orb { id: String, amount_due: String, - auto_collection: Orb::Models::AutoCollectionModel, - billing_address: Orb::Models::AddressModel?, + auto_collection: Orb::Models::InvoiceFetchUpcomingResponse::AutoCollection, + billing_address: Orb::Models::InvoiceFetchUpcomingResponse::BillingAddress?, created_at: Time, - credit_notes: ::Array[Orb::Models::CreditNoteSummaryModel], + credit_notes: ::Array[Orb::Models::InvoiceFetchUpcomingResponse::CreditNote], currency: String, - customer: Orb::Models::CustomerMinifiedModel, - customer_balance_transactions: ::Array[Orb::Models::CustomerBalanceTransactionModel], - customer_tax_id: Orb::Models::CustomerTaxIDModel?, + customer: Orb::Models::InvoiceFetchUpcomingResponse::Customer, + customer_balance_transactions: ::Array[Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction], + customer_tax_id: Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID?, discount: top, discounts: ::Array[Orb::Models::invoice_level_discount], due_date: Time?, @@ -22,21 +22,21 @@ module Orb invoice_source: Orb::Models::InvoiceFetchUpcomingResponse::invoice_source, issue_failed_at: Time?, issued_at: Time?, - line_items: ::Array[Orb::Models::InvoiceLineItemModel], - maximum: Orb::Models::MaximumModel?, + line_items: ::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem], + maximum: Orb::Models::InvoiceFetchUpcomingResponse::Maximum?, maximum_amount: String?, memo: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::InvoiceFetchUpcomingResponse::Minimum?, minimum_amount: String?, paid_at: Time?, - payment_attempts: ::Array[Orb::Models::PaymentAttemptModel], + payment_attempts: ::Array[Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt], payment_failed_at: Time?, payment_started_at: Time?, scheduled_issue_at: Time?, - shipping_address: Orb::Models::AddressModel?, + shipping_address: Orb::Models::InvoiceFetchUpcomingResponse::ShippingAddress?, status: Orb::Models::InvoiceFetchUpcomingResponse::status, - subscription: Orb::Models::SubscriptionMinifiedModel?, + subscription: Orb::Models::InvoiceFetchUpcomingResponse::Subscription?, subtotal: String, sync_failed_at: Time?, target_date: Time, @@ -50,21 +50,21 @@ module Orb attr_accessor amount_due: String - attr_accessor auto_collection: Orb::Models::AutoCollectionModel + attr_accessor auto_collection: Orb::Models::InvoiceFetchUpcomingResponse::AutoCollection - attr_accessor billing_address: Orb::Models::AddressModel? + attr_accessor billing_address: Orb::Models::InvoiceFetchUpcomingResponse::BillingAddress? attr_accessor created_at: Time - attr_accessor credit_notes: ::Array[Orb::Models::CreditNoteSummaryModel] + attr_accessor credit_notes: ::Array[Orb::Models::InvoiceFetchUpcomingResponse::CreditNote] attr_accessor currency: String - attr_accessor customer: Orb::Models::CustomerMinifiedModel + attr_accessor customer: Orb::Models::InvoiceFetchUpcomingResponse::Customer - attr_accessor customer_balance_transactions: ::Array[Orb::Models::CustomerBalanceTransactionModel] + attr_accessor customer_balance_transactions: ::Array[Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction] - attr_accessor customer_tax_id: Orb::Models::CustomerTaxIDModel? + attr_accessor customer_tax_id: Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID? attr_accessor discount: top @@ -86,9 +86,9 @@ module Orb attr_accessor issued_at: Time? - attr_accessor line_items: ::Array[Orb::Models::InvoiceLineItemModel] + attr_accessor line_items: ::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem] - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::InvoiceFetchUpcomingResponse::Maximum? attr_accessor maximum_amount: String? @@ -96,13 +96,13 @@ module Orb attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::InvoiceFetchUpcomingResponse::Minimum? attr_accessor minimum_amount: String? attr_accessor paid_at: Time? - attr_accessor payment_attempts: ::Array[Orb::Models::PaymentAttemptModel] + attr_accessor payment_attempts: ::Array[Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt] attr_accessor payment_failed_at: Time? @@ -110,11 +110,11 @@ module Orb attr_accessor scheduled_issue_at: Time? - attr_accessor shipping_address: Orb::Models::AddressModel? + attr_accessor shipping_address: Orb::Models::InvoiceFetchUpcomingResponse::ShippingAddress? attr_accessor status: Orb::Models::InvoiceFetchUpcomingResponse::status - attr_accessor subscription: Orb::Models::SubscriptionMinifiedModel? + attr_accessor subscription: Orb::Models::InvoiceFetchUpcomingResponse::Subscription? attr_accessor subtotal: String @@ -132,14 +132,14 @@ module Orb ( id: String, amount_due: String, - auto_collection: Orb::Models::AutoCollectionModel, - billing_address: Orb::Models::AddressModel?, + auto_collection: Orb::Models::InvoiceFetchUpcomingResponse::AutoCollection, + billing_address: Orb::Models::InvoiceFetchUpcomingResponse::BillingAddress?, created_at: Time, - credit_notes: ::Array[Orb::Models::CreditNoteSummaryModel], + credit_notes: ::Array[Orb::Models::InvoiceFetchUpcomingResponse::CreditNote], currency: String, - customer: Orb::Models::CustomerMinifiedModel, - customer_balance_transactions: ::Array[Orb::Models::CustomerBalanceTransactionModel], - customer_tax_id: Orb::Models::CustomerTaxIDModel?, + customer: Orb::Models::InvoiceFetchUpcomingResponse::Customer, + customer_balance_transactions: ::Array[Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction], + customer_tax_id: Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID?, discount: top, discounts: ::Array[Orb::Models::invoice_level_discount], due_date: Time?, @@ -150,21 +150,21 @@ module Orb invoice_source: Orb::Models::InvoiceFetchUpcomingResponse::invoice_source, issue_failed_at: Time?, issued_at: Time?, - line_items: ::Array[Orb::Models::InvoiceLineItemModel], - maximum: Orb::Models::MaximumModel?, + line_items: ::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem], + maximum: Orb::Models::InvoiceFetchUpcomingResponse::Maximum?, maximum_amount: String?, memo: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::InvoiceFetchUpcomingResponse::Minimum?, minimum_amount: String?, paid_at: Time?, - payment_attempts: ::Array[Orb::Models::PaymentAttemptModel], + payment_attempts: ::Array[Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt], payment_failed_at: Time?, payment_started_at: Time?, scheduled_issue_at: Time?, - shipping_address: Orb::Models::AddressModel?, + shipping_address: Orb::Models::InvoiceFetchUpcomingResponse::ShippingAddress?, status: Orb::Models::InvoiceFetchUpcomingResponse::status, - subscription: Orb::Models::SubscriptionMinifiedModel?, + subscription: Orb::Models::InvoiceFetchUpcomingResponse::Subscription?, subtotal: String, sync_failed_at: Time?, target_date: Time, @@ -178,6 +178,599 @@ module Orb def to_hash: -> Orb::Models::invoice_fetch_upcoming_response + type auto_collection = + { + enabled: bool?, + next_attempt_at: Time?, + num_attempts: Integer?, + previously_attempted_at: Time? + } + + class AutoCollection < Orb::BaseModel + attr_accessor enabled: bool? + + attr_accessor next_attempt_at: Time? + + attr_accessor num_attempts: Integer? + + attr_accessor previously_attempted_at: Time? + + def initialize: + ( + enabled: bool?, + next_attempt_at: Time?, + num_attempts: Integer?, + previously_attempted_at: Time? + ) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::auto_collection + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::auto_collection + end + + type billing_address = + { + city: String?, + country: String?, + :line1 => String?, + :line2 => String?, + postal_code: String?, + state: String? + } + + class BillingAddress < Orb::BaseModel + attr_accessor city: String? + + attr_accessor country: String? + + attr_accessor line1: String? + + attr_accessor line2: String? + + attr_accessor postal_code: String? + + attr_accessor state: String? + + def initialize: + ( + city: String?, + country: String?, + line1: String?, + line2: String?, + postal_code: String?, + state: String? + ) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::billing_address + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::billing_address + end + + type credit_note = + { + id: String, + credit_note_number: String, + memo: String?, + reason: String, + total: String, + type: String, + voided_at: Time? + } + + class CreditNote < Orb::BaseModel + attr_accessor id: String + + attr_accessor credit_note_number: String + + attr_accessor memo: String? + + attr_accessor reason: String + + attr_accessor total: String + + attr_accessor type: String + + attr_accessor voided_at: Time? + + def initialize: + ( + id: String, + credit_note_number: String, + memo: String?, + reason: String, + total: String, + type: String, + voided_at: Time? + ) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::credit_note + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::credit_note + end + + type customer = { id: String, external_customer_id: String? } + + class Customer < Orb::BaseModel + attr_accessor id: String + + attr_accessor external_customer_id: String? + + def initialize: + (id: String, external_customer_id: String?) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::customer + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::customer + end + + type customer_balance_transaction = + { + id: String, + action: Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::action, + amount: String, + created_at: Time, + credit_note: Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::CreditNote?, + description: String?, + ending_balance: String, + invoice: Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Invoice?, + starting_balance: String, + type: Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::type_ + } + + class CustomerBalanceTransaction < Orb::BaseModel + attr_accessor id: String + + attr_accessor action: Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::action + + attr_accessor amount: String + + attr_accessor created_at: Time + + attr_accessor credit_note: Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::CreditNote? + + attr_accessor description: String? + + attr_accessor ending_balance: String + + attr_accessor invoice: Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Invoice? + + attr_accessor starting_balance: String + + attr_accessor type: Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::type_ + + def initialize: + ( + id: String, + action: Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::action, + amount: String, + created_at: Time, + credit_note: Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::CreditNote?, + description: String?, + ending_balance: String, + invoice: Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Invoice?, + starting_balance: String, + type: Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::type_ + ) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::customer_balance_transaction + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::customer_balance_transaction + + type action = + :applied_to_invoice + | :manual_adjustment + | :prorated_refund + | :revert_prorated_refund + | :return_from_voiding + | :credit_note_applied + | :credit_note_voided + | :overpayment_refund + | :external_payment + + class Action < Orb::Enum + APPLIED_TO_INVOICE: :applied_to_invoice + MANUAL_ADJUSTMENT: :manual_adjustment + PRORATED_REFUND: :prorated_refund + REVERT_PRORATED_REFUND: :revert_prorated_refund + RETURN_FROM_VOIDING: :return_from_voiding + CREDIT_NOTE_APPLIED: :credit_note_applied + CREDIT_NOTE_VOIDED: :credit_note_voided + OVERPAYMENT_REFUND: :overpayment_refund + EXTERNAL_PAYMENT: :external_payment + + def self.values: -> ::Array[Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::action] + end + + type credit_note = { id: String } + + class CreditNote < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::credit_note + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::credit_note + end + + type invoice = { id: String } + + class Invoice < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::invoice + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::invoice + end + + type type_ = :increment | :decrement + + class Type < Orb::Enum + INCREMENT: :increment + DECREMENT: :decrement + + def self.values: -> ::Array[Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::type_] + end + end + + type customer_tax_id = + { + country: Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::country, + type: Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::type_, + value: String + } + + class CustomerTaxID < Orb::BaseModel + attr_accessor country: Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::country + + attr_accessor type: Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::type_ + + attr_accessor value: String + + def initialize: + ( + country: Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::country, + type: Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::type_, + value: String + ) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::customer_tax_id + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::customer_tax_id + + type country = + :AD + | :AE + | :AR + | :AT + | :AU + | :BE + | :BG + | :BH + | :BO + | :BR + | :CA + | :CH + | :CL + | :CN + | :CO + | :CR + | :CY + | :CZ + | :DE + | :DK + | :EE + | :DO + | :EC + | :EG + | :ES + | :EU + | :FI + | :FR + | :GB + | :GE + | :GR + | :HK + | :HR + | :HU + | :ID + | :IE + | :IL + | :IN + | :IS + | :IT + | :JP + | :KE + | :KR + | :KZ + | :LI + | :LT + | :LU + | :LV + | :MT + | :MX + | :MY + | :NG + | :NL + | :NO + | :NZ + | :OM + | :PE + | :PH + | :PL + | :PT + | :RO + | :RS + | :RU + | :SA + | :SE + | :SG + | :SI + | :SK + | :SV + | :TH + | :TR + | :TW + | :UA + | :US + | :UY + | :VE + | :VN + | :ZA + + class Country < Orb::Enum + AD: :AD + AE: :AE + AR: :AR + AT: :AT + AU: :AU + BE: :BE + BG: :BG + BH: :BH + BO: :BO + BR: :BR + CA: :CA + CH: :CH + CL: :CL + CN: :CN + CO: :CO + CR: :CR + CY: :CY + CZ: :CZ + DE: :DE + DK: :DK + EE: :EE + DO: :DO + EC: :EC + EG: :EG + ES: :ES + EU: :EU + FI: :FI + FR: :FR + GB: :GB + GE: :GE + GR: :GR + HK: :HK + HR: :HR + HU: :HU + ID: :ID + IE: :IE + IL: :IL + IN: :IN + IS: :IS + IT: :IT + JP: :JP + KE: :KE + KR: :KR + KZ: :KZ + LI: :LI + LT: :LT + LU: :LU + LV: :LV + MT: :MT + MX: :MX + MY: :MY + NG: :NG + NL: :NL + NO: :NO + NZ: :NZ + OM: :OM + PE: :PE + PH: :PH + PL: :PL + PT: :PT + RO: :RO + RS: :RS + RU: :RU + SA: :SA + SE: :SE + SG: :SG + SI: :SI + SK: :SK + SV: :SV + TH: :TH + TR: :TR + TW: :TW + UA: :UA + US: :US + UY: :UY + VE: :VE + VN: :VN + ZA: :ZA + + def self.values: -> ::Array[Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::country] + end + + type type_ = + :ad_nrt + | :ae_trn + | :ar_cuit + | :eu_vat + | :au_abn + | :au_arn + | :bg_uic + | :bh_vat + | :bo_tin + | :br_cnpj + | :br_cpf + | :ca_bn + | :ca_gst_hst + | :ca_pst_bc + | :ca_pst_mb + | :ca_pst_sk + | :ca_qst + | :ch_vat + | :cl_tin + | :cn_tin + | :co_nit + | :cr_tin + | :do_rcn + | :ec_ruc + | :eg_tin + | :es_cif + | :eu_oss_vat + | :gb_vat + | :ge_vat + | :hk_br + | :hu_tin + | :id_npwp + | :il_vat + | :in_gst + | :is_vat + | :jp_cn + | :jp_rn + | :jp_trn + | :ke_pin + | :kr_brn + | :kz_bin + | :li_uid + | :mx_rfc + | :my_frp + | :my_itn + | :my_sst + | :ng_tin + | :no_vat + | :no_voec + | :nz_gst + | :om_vat + | :pe_ruc + | :ph_tin + | :ro_tin + | :rs_pib + | :ru_inn + | :ru_kpp + | :sa_vat + | :sg_gst + | :sg_uen + | :si_tin + | :sv_nit + | :th_vat + | :tr_tin + | :tw_vat + | :ua_vat + | :us_ein + | :uy_ruc + | :ve_rif + | :vn_tin + | :za_vat + + class Type < Orb::Enum + AD_NRT: :ad_nrt + AE_TRN: :ae_trn + AR_CUIT: :ar_cuit + EU_VAT: :eu_vat + AU_ABN: :au_abn + AU_ARN: :au_arn + BG_UIC: :bg_uic + BH_VAT: :bh_vat + BO_TIN: :bo_tin + BR_CNPJ: :br_cnpj + BR_CPF: :br_cpf + CA_BN: :ca_bn + CA_GST_HST: :ca_gst_hst + CA_PST_BC: :ca_pst_bc + CA_PST_MB: :ca_pst_mb + CA_PST_SK: :ca_pst_sk + CA_QST: :ca_qst + CH_VAT: :ch_vat + CL_TIN: :cl_tin + CN_TIN: :cn_tin + CO_NIT: :co_nit + CR_TIN: :cr_tin + DO_RCN: :do_rcn + EC_RUC: :ec_ruc + EG_TIN: :eg_tin + ES_CIF: :es_cif + EU_OSS_VAT: :eu_oss_vat + GB_VAT: :gb_vat + GE_VAT: :ge_vat + HK_BR: :hk_br + HU_TIN: :hu_tin + ID_NPWP: :id_npwp + IL_VAT: :il_vat + IN_GST: :in_gst + IS_VAT: :is_vat + JP_CN: :jp_cn + JP_RN: :jp_rn + JP_TRN: :jp_trn + KE_PIN: :ke_pin + KR_BRN: :kr_brn + KZ_BIN: :kz_bin + LI_UID: :li_uid + MX_RFC: :mx_rfc + MY_FRP: :my_frp + MY_ITN: :my_itn + MY_SST: :my_sst + NG_TIN: :ng_tin + NO_VAT: :no_vat + NO_VOEC: :no_voec + NZ_GST: :nz_gst + OM_VAT: :om_vat + PE_RUC: :pe_ruc + PH_TIN: :ph_tin + RO_TIN: :ro_tin + RS_PIB: :rs_pib + RU_INN: :ru_inn + RU_KPP: :ru_kpp + SA_VAT: :sa_vat + SG_GST: :sg_gst + SG_UEN: :sg_uen + SI_TIN: :si_tin + SV_NIT: :sv_nit + TH_VAT: :th_vat + TR_TIN: :tr_tin + TW_VAT: :tw_vat + UA_VAT: :ua_vat + US_EIN: :us_ein + UY_RUC: :uy_ruc + VE_RIF: :ve_rif + VN_TIN: :vn_tin + ZA_VAT: :za_vat + + def self.values: -> ::Array[Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::type_] + end + end + type invoice_source = :subscription | :partial | :one_off class InvoiceSource < Orb::Enum @@ -188,6 +781,760 @@ module Orb def self.values: -> ::Array[Orb::Models::InvoiceFetchUpcomingResponse::invoice_source] end + type line_item = + { + id: String, + adjusted_subtotal: String, + adjustments: ::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::adjustment], + amount: String, + credits_applied: String, + discount: Orb::Models::discount?, + end_date: Time, + filter: String?, + grouping: String?, + maximum: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Maximum?, + maximum_amount: String?, + minimum: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Minimum?, + minimum_amount: String?, + name: String, + partially_invoiced_amount: String, + price: Orb::Models::price?, + quantity: Float, + start_date: Time, + sub_line_items: ::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::sub_line_item], + subtotal: String, + tax_amounts: ::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::TaxAmount], + usage_customer_ids: ::Array[String]? + } + + class LineItem < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjusted_subtotal: String + + attr_accessor adjustments: ::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::adjustment] + + attr_accessor amount: String + + attr_accessor credits_applied: String + + attr_accessor discount: Orb::Models::discount? + + attr_accessor end_date: Time + + attr_accessor filter: String? + + attr_accessor grouping: String? + + attr_accessor maximum: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Maximum? + + attr_accessor maximum_amount: String? + + attr_accessor minimum: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Minimum? + + attr_accessor minimum_amount: String? + + attr_accessor name: String + + attr_accessor partially_invoiced_amount: String + + attr_accessor price: Orb::Models::price? + + attr_accessor quantity: Float + + attr_accessor start_date: Time + + attr_accessor sub_line_items: ::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::sub_line_item] + + attr_accessor subtotal: String + + attr_accessor tax_amounts: ::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::TaxAmount] + + attr_accessor usage_customer_ids: ::Array[String]? + + def initialize: + ( + id: String, + adjusted_subtotal: String, + adjustments: ::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::adjustment], + amount: String, + credits_applied: String, + discount: Orb::Models::discount?, + end_date: Time, + filter: String?, + grouping: String?, + maximum: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Maximum?, + maximum_amount: String?, + minimum: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Minimum?, + minimum_amount: String?, + name: String, + partially_invoiced_amount: String, + price: Orb::Models::price?, + quantity: Float, + start_date: Time, + sub_line_items: ::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::sub_line_item], + subtotal: String, + tax_amounts: ::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::TaxAmount], + usage_customer_ids: ::Array[String]? + ) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::line_item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::line_item + + type adjustment = + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryUsageDiscountAdjustment + | Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryAmountDiscountAdjustment + | Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment + | Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMinimumAdjustment + | Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMaximumAdjustment + + class Adjustment < Orb::Union + type monetary_usage_discount_adjustment = + { + id: String, + adjustment_type: :usage_discount, + amount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + reason: String?, + usage_discount: Float + } + + class MonetaryUsageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :usage_discount + + attr_accessor amount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor reason: String? + + attr_accessor usage_discount: Float + + def initialize: + ( + id: String, + amount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + reason: String?, + usage_discount: Float, + adjustment_type: :usage_discount + ) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::monetary_usage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::monetary_usage_discount_adjustment + end + + type monetary_amount_discount_adjustment = + { + id: String, + adjustment_type: :amount_discount, + amount: String, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + reason: String? + } + + class MonetaryAmountDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :amount_discount + + attr_accessor amount: String + + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor reason: String? + + def initialize: + ( + id: String, + amount: String, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + reason: String?, + adjustment_type: :amount_discount + ) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::monetary_amount_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::monetary_amount_discount_adjustment + end + + type monetary_percentage_discount_adjustment = + { + id: String, + adjustment_type: :percentage_discount, + amount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + reason: String? + } + + class MonetaryPercentageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :percentage_discount + + attr_accessor amount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor percentage_discount: Float + + attr_accessor reason: String? + + def initialize: + ( + id: String, + amount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + reason: String?, + adjustment_type: :percentage_discount + ) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::monetary_percentage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::monetary_percentage_discount_adjustment + end + + type monetary_minimum_adjustment = + { + id: String, + adjustment_type: :minimum, + amount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + reason: String? + } + + class MonetaryMinimumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :minimum + + attr_accessor amount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor item_id: String + + attr_accessor minimum_amount: String + + attr_accessor reason: String? + + def initialize: + ( + id: String, + amount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + reason: String?, + adjustment_type: :minimum + ) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::monetary_minimum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::monetary_minimum_adjustment + end + + type monetary_maximum_adjustment = + { + id: String, + adjustment_type: :maximum, + amount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + reason: String? + } + + class MonetaryMaximumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :maximum + + attr_accessor amount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor maximum_amount: String + + attr_accessor reason: String? + + def initialize: + ( + id: String, + amount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + reason: String?, + adjustment_type: :maximum + ) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::monetary_maximum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::monetary_maximum_adjustment + end + + private def self.variants: -> [[:usage_discount, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryUsageDiscountAdjustment], [:amount_discount, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryAmountDiscountAdjustment], [:percentage_discount, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment], [:minimum, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMinimumAdjustment], [:maximum, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMaximumAdjustment]] + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::LineItem::maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::LineItem::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::LineItem::minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::LineItem::minimum + end + + type sub_line_item = + Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem + | Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem + | Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem + + class SubLineItem < Orb::Union + type matrix_sub_line_item = + { + amount: String, + grouping: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::Grouping?, + matrix_config: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig, + name: String, + quantity: Float, + type: :matrix + } + + class MatrixSubLineItem < Orb::BaseModel + attr_accessor amount: String + + attr_accessor grouping: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::Grouping? + + attr_accessor matrix_config: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig + + attr_accessor name: String + + attr_accessor quantity: Float + + attr_accessor type: :matrix + + def initialize: + ( + amount: String, + grouping: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::Grouping?, + matrix_config: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig, + name: String, + quantity: Float, + type: :matrix + ) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::matrix_sub_line_item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::matrix_sub_line_item + + type grouping = { key: String, value: String? } + + class Grouping < Orb::BaseModel + attr_accessor key: String + + attr_accessor value: String? + + def initialize: + (key: String, value: String?) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::grouping + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::grouping + end + + type matrix_config = { dimension_values: ::Array[String?] } + + class MatrixConfig < Orb::BaseModel + attr_accessor dimension_values: ::Array[String?] + + def initialize: + (dimension_values: ::Array[String?]) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::matrix_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::matrix_config + end + end + + type tier_sub_line_item = + { + amount: String, + grouping: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::Grouping?, + name: String, + quantity: Float, + tier_config: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::TierConfig, + type: :tier + } + + class TierSubLineItem < Orb::BaseModel + attr_accessor amount: String + + attr_accessor grouping: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::Grouping? + + attr_accessor name: String + + attr_accessor quantity: Float + + attr_accessor tier_config: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::TierConfig + + attr_accessor type: :tier + + def initialize: + ( + amount: String, + grouping: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::Grouping?, + name: String, + quantity: Float, + tier_config: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::TierConfig, + type: :tier + ) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::tier_sub_line_item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::tier_sub_line_item + + type grouping = { key: String, value: String? } + + class Grouping < Orb::BaseModel + attr_accessor key: String + + attr_accessor value: String? + + def initialize: + (key: String, value: String?) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::grouping + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::grouping + end + + type tier_config = + { first_unit: Float, last_unit: Float?, unit_amount: String } + + class TierConfig < Orb::BaseModel + attr_accessor first_unit: Float + + attr_accessor last_unit: Float? + + attr_accessor unit_amount: String + + def initialize: + ( + first_unit: Float, + last_unit: Float?, + unit_amount: String + ) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::tier_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::tier_config + end + end + + type other_sub_line_item = + { + amount: String, + grouping: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem::Grouping?, + name: String, + quantity: Float, + type: :"'null'" + } + + class OtherSubLineItem < Orb::BaseModel + attr_accessor amount: String + + attr_accessor grouping: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem::Grouping? + + attr_accessor name: String + + attr_accessor quantity: Float + + attr_accessor type: :"'null'" + + def initialize: + ( + amount: String, + grouping: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem::Grouping?, + name: String, + quantity: Float, + type: :"'null'" + ) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::other_sub_line_item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::other_sub_line_item + + type grouping = { key: String, value: String? } + + class Grouping < Orb::BaseModel + attr_accessor key: String + + attr_accessor value: String? + + def initialize: + (key: String, value: String?) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem::grouping + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem::grouping + end + end + + private def self.variants: -> [[:matrix, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem], [:tier, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem], [:"'null'", Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem]] + end + + type tax_amount = + { + amount: String, + tax_rate_description: String, + tax_rate_percentage: String? + } + + class TaxAmount < Orb::BaseModel + attr_accessor amount: String + + attr_accessor tax_rate_description: String + + attr_accessor tax_rate_percentage: String? + + def initialize: + ( + amount: String, + tax_rate_description: String, + tax_rate_percentage: String? + ) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::LineItem::tax_amount + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::LineItem::tax_amount + end + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::minimum + end + + type payment_attempt = + { + id: String, + amount: String, + created_at: Time, + payment_provider: Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt::payment_provider?, + payment_provider_id: String?, + succeeded: bool + } + + class PaymentAttempt < Orb::BaseModel + attr_accessor id: String + + attr_accessor amount: String + + attr_accessor created_at: Time + + attr_accessor payment_provider: Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt::payment_provider? + + attr_accessor payment_provider_id: String? + + attr_accessor succeeded: bool + + def initialize: + ( + id: String, + amount: String, + created_at: Time, + payment_provider: Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt::payment_provider?, + payment_provider_id: String?, + succeeded: bool + ) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::payment_attempt + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::payment_attempt + + type payment_provider = :stripe + + class PaymentProvider < Orb::Enum + STRIPE: :stripe + + def self.values: -> ::Array[Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt::payment_provider] + end + end + + type shipping_address = + { + city: String?, + country: String?, + :line1 => String?, + :line2 => String?, + postal_code: String?, + state: String? + } + + class ShippingAddress < Orb::BaseModel + attr_accessor city: String? + + attr_accessor country: String? + + attr_accessor line1: String? + + attr_accessor line2: String? + + attr_accessor postal_code: String? + + attr_accessor state: String? + + def initialize: + ( + city: String?, + country: String?, + line1: String?, + line2: String?, + postal_code: String?, + state: String? + ) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::shipping_address + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::shipping_address + end + type status = :issued | :paid | :synced | :void | :draft class Status < Orb::Enum @@ -199,6 +1546,21 @@ module Orb def self.values: -> ::Array[Orb::Models::InvoiceFetchUpcomingResponse::status] end + + type subscription = { id: String } + + class Subscription < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::InvoiceFetchUpcomingResponse::subscription + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::subscription + end end end end diff --git a/sig/orb/models/invoice_level_discount_model.rbs b/sig/orb/models/invoice_level_discount_model.rbs deleted file mode 100644 index ced1e230..00000000 --- a/sig/orb/models/invoice_level_discount_model.rbs +++ /dev/null @@ -1,12 +0,0 @@ -module Orb - module Models - type invoice_level_discount_model = - Orb::Models::PercentageDiscount - | Orb::Models::AmountDiscount - | Orb::Models::TrialDiscount - - class InvoiceLevelDiscountModel < Orb::Union - private def self.variants: -> [[:percentage, Orb::Models::PercentageDiscount], [:amount, Orb::Models::AmountDiscount], [:trial, Orb::Models::TrialDiscount]] - end - end -end diff --git a/sig/orb/models/invoice_line_item_model.rbs b/sig/orb/models/invoice_line_item_create_response.rbs similarity index 51% rename from sig/orb/models/invoice_line_item_model.rbs rename to sig/orb/models/invoice_line_item_create_response.rbs index 721ab486..1b29914c 100644 --- a/sig/orb/models/invoice_line_item_model.rbs +++ b/sig/orb/models/invoice_line_item_create_response.rbs @@ -1,37 +1,37 @@ module Orb module Models - type invoice_line_item_model = + type invoice_line_item_create_response = { id: String, adjusted_subtotal: String, - adjustments: ::Array[Orb::Models::InvoiceLineItemModel::adjustment], + adjustments: ::Array[Orb::Models::InvoiceLineItemCreateResponse::adjustment], amount: String, credits_applied: String, discount: Orb::Models::discount?, end_date: Time, filter: String?, grouping: String?, - maximum: Orb::Models::MaximumModel?, + maximum: Orb::Models::InvoiceLineItemCreateResponse::Maximum?, maximum_amount: String?, - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::InvoiceLineItemCreateResponse::Minimum?, minimum_amount: String?, name: String, partially_invoiced_amount: String, - price: Orb::Models::price_model?, + price: Orb::Models::price?, quantity: Float, start_date: Time, - sub_line_items: ::Array[Orb::Models::InvoiceLineItemModel::sub_line_item], + sub_line_items: ::Array[Orb::Models::InvoiceLineItemCreateResponse::sub_line_item], subtotal: String, - tax_amounts: ::Array[Orb::Models::TaxAmountModel], + tax_amounts: ::Array[Orb::Models::InvoiceLineItemCreateResponse::TaxAmount], usage_customer_ids: ::Array[String]? } - class InvoiceLineItemModel < Orb::BaseModel + class InvoiceLineItemCreateResponse < Orb::BaseModel attr_accessor id: String attr_accessor adjusted_subtotal: String - attr_accessor adjustments: ::Array[Orb::Models::InvoiceLineItemModel::adjustment] + attr_accessor adjustments: ::Array[Orb::Models::InvoiceLineItemCreateResponse::adjustment] attr_accessor amount: String @@ -45,11 +45,11 @@ module Orb attr_accessor grouping: String? - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::InvoiceLineItemCreateResponse::Maximum? attr_accessor maximum_amount: String? - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::InvoiceLineItemCreateResponse::Minimum? attr_accessor minimum_amount: String? @@ -57,17 +57,17 @@ module Orb attr_accessor partially_invoiced_amount: String - attr_accessor price: Orb::Models::price_model? + attr_accessor price: Orb::Models::price? attr_accessor quantity: Float attr_accessor start_date: Time - attr_accessor sub_line_items: ::Array[Orb::Models::InvoiceLineItemModel::sub_line_item] + attr_accessor sub_line_items: ::Array[Orb::Models::InvoiceLineItemCreateResponse::sub_line_item] attr_accessor subtotal: String - attr_accessor tax_amounts: ::Array[Orb::Models::TaxAmountModel] + attr_accessor tax_amounts: ::Array[Orb::Models::InvoiceLineItemCreateResponse::TaxAmount] attr_accessor usage_customer_ids: ::Array[String]? @@ -75,37 +75,39 @@ module Orb ( id: String, adjusted_subtotal: String, - adjustments: ::Array[Orb::Models::InvoiceLineItemModel::adjustment], + adjustments: ::Array[Orb::Models::InvoiceLineItemCreateResponse::adjustment], amount: String, credits_applied: String, discount: Orb::Models::discount?, end_date: Time, filter: String?, grouping: String?, - maximum: Orb::Models::MaximumModel?, + maximum: Orb::Models::InvoiceLineItemCreateResponse::Maximum?, maximum_amount: String?, - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::InvoiceLineItemCreateResponse::Minimum?, minimum_amount: String?, name: String, partially_invoiced_amount: String, - price: Orb::Models::price_model?, + price: Orb::Models::price?, quantity: Float, start_date: Time, - sub_line_items: ::Array[Orb::Models::InvoiceLineItemModel::sub_line_item], + sub_line_items: ::Array[Orb::Models::InvoiceLineItemCreateResponse::sub_line_item], subtotal: String, - tax_amounts: ::Array[Orb::Models::TaxAmountModel], + tax_amounts: ::Array[Orb::Models::InvoiceLineItemCreateResponse::TaxAmount], usage_customer_ids: ::Array[String]? ) -> void - | (?Orb::Models::invoice_line_item_model | Orb::BaseModel data) -> void + | ( + ?Orb::Models::invoice_line_item_create_response | Orb::BaseModel data + ) -> void - def to_hash: -> Orb::Models::invoice_line_item_model + def to_hash: -> Orb::Models::invoice_line_item_create_response type adjustment = - Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryUsageDiscountAdjustment - | Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryAmountDiscountAdjustment - | Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryPercentageDiscountAdjustment - | Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryMinimumAdjustment - | Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryMaximumAdjustment + Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryUsageDiscountAdjustment + | Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryAmountDiscountAdjustment + | Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryPercentageDiscountAdjustment + | Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMinimumAdjustment + | Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMaximumAdjustment class Adjustment < Orb::Union type monetary_usage_discount_adjustment = @@ -145,11 +147,11 @@ module Orb adjustment_type: :usage_discount ) -> void | ( - ?Orb::Models::InvoiceLineItemModel::Adjustment::monetary_usage_discount_adjustment + ?Orb::Models::InvoiceLineItemCreateResponse::Adjustment::monetary_usage_discount_adjustment | Orb::BaseModel data ) -> void - def to_hash: -> Orb::Models::InvoiceLineItemModel::Adjustment::monetary_usage_discount_adjustment + def to_hash: -> Orb::Models::InvoiceLineItemCreateResponse::Adjustment::monetary_usage_discount_adjustment end type monetary_amount_discount_adjustment = @@ -189,11 +191,11 @@ module Orb adjustment_type: :amount_discount ) -> void | ( - ?Orb::Models::InvoiceLineItemModel::Adjustment::monetary_amount_discount_adjustment + ?Orb::Models::InvoiceLineItemCreateResponse::Adjustment::monetary_amount_discount_adjustment | Orb::BaseModel data ) -> void - def to_hash: -> Orb::Models::InvoiceLineItemModel::Adjustment::monetary_amount_discount_adjustment + def to_hash: -> Orb::Models::InvoiceLineItemCreateResponse::Adjustment::monetary_amount_discount_adjustment end type monetary_percentage_discount_adjustment = @@ -233,11 +235,11 @@ module Orb adjustment_type: :percentage_discount ) -> void | ( - ?Orb::Models::InvoiceLineItemModel::Adjustment::monetary_percentage_discount_adjustment + ?Orb::Models::InvoiceLineItemCreateResponse::Adjustment::monetary_percentage_discount_adjustment | Orb::BaseModel data ) -> void - def to_hash: -> Orb::Models::InvoiceLineItemModel::Adjustment::monetary_percentage_discount_adjustment + def to_hash: -> Orb::Models::InvoiceLineItemCreateResponse::Adjustment::monetary_percentage_discount_adjustment end type monetary_minimum_adjustment = @@ -281,11 +283,11 @@ module Orb adjustment_type: :minimum ) -> void | ( - ?Orb::Models::InvoiceLineItemModel::Adjustment::monetary_minimum_adjustment + ?Orb::Models::InvoiceLineItemCreateResponse::Adjustment::monetary_minimum_adjustment | Orb::BaseModel data ) -> void - def to_hash: -> Orb::Models::InvoiceLineItemModel::Adjustment::monetary_minimum_adjustment + def to_hash: -> Orb::Models::InvoiceLineItemCreateResponse::Adjustment::monetary_minimum_adjustment end type monetary_maximum_adjustment = @@ -325,27 +327,69 @@ module Orb adjustment_type: :maximum ) -> void | ( - ?Orb::Models::InvoiceLineItemModel::Adjustment::monetary_maximum_adjustment + ?Orb::Models::InvoiceLineItemCreateResponse::Adjustment::monetary_maximum_adjustment | Orb::BaseModel data ) -> void - def to_hash: -> Orb::Models::InvoiceLineItemModel::Adjustment::monetary_maximum_adjustment + def to_hash: -> Orb::Models::InvoiceLineItemCreateResponse::Adjustment::monetary_maximum_adjustment end - private def self.variants: -> [[:usage_discount, Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryUsageDiscountAdjustment], [:amount_discount, Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryAmountDiscountAdjustment], [:percentage_discount, Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryPercentageDiscountAdjustment], [:minimum, Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryMinimumAdjustment], [:maximum, Orb::Models::InvoiceLineItemModel::Adjustment::MonetaryMaximumAdjustment]] + private def self.variants: -> [[:usage_discount, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryUsageDiscountAdjustment], [:amount_discount, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryAmountDiscountAdjustment], [:percentage_discount, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryPercentageDiscountAdjustment], [:minimum, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMinimumAdjustment], [:maximum, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMaximumAdjustment]] + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::InvoiceLineItemCreateResponse::maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceLineItemCreateResponse::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::InvoiceLineItemCreateResponse::minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceLineItemCreateResponse::minimum end type sub_line_item = - Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem - | Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem - | Orb::Models::InvoiceLineItemModel::SubLineItem::OtherSubLineItem + Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem + | Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem + | Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem class SubLineItem < Orb::Union type matrix_sub_line_item = { amount: String, - grouping: Orb::Models::SubLineItemGroupingModel?, - matrix_config: Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem::MatrixConfig, + grouping: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::Grouping?, + matrix_config: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::MatrixConfig, name: String, quantity: Float, type: :matrix @@ -354,9 +398,9 @@ module Orb class MatrixSubLineItem < Orb::BaseModel attr_accessor amount: String - attr_accessor grouping: Orb::Models::SubLineItemGroupingModel? + attr_accessor grouping: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::Grouping? - attr_accessor matrix_config: Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem::MatrixConfig + attr_accessor matrix_config: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::MatrixConfig attr_accessor name: String @@ -367,18 +411,35 @@ module Orb def initialize: ( amount: String, - grouping: Orb::Models::SubLineItemGroupingModel?, - matrix_config: Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem::MatrixConfig, + grouping: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::Grouping?, + matrix_config: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::MatrixConfig, name: String, quantity: Float, type: :matrix ) -> void | ( - ?Orb::Models::InvoiceLineItemModel::SubLineItem::matrix_sub_line_item + ?Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::matrix_sub_line_item | Orb::BaseModel data ) -> void - def to_hash: -> Orb::Models::InvoiceLineItemModel::SubLineItem::matrix_sub_line_item + def to_hash: -> Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::matrix_sub_line_item + + type grouping = { key: String, value: String? } + + class Grouping < Orb::BaseModel + attr_accessor key: String + + attr_accessor value: String? + + def initialize: + (key: String, value: String?) -> void + | ( + ?Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::grouping + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::grouping + end type matrix_config = { dimension_values: ::Array[String?] } @@ -388,52 +449,69 @@ module Orb def initialize: (dimension_values: ::Array[String?]) -> void | ( - ?Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem::matrix_config + ?Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::matrix_config | Orb::BaseModel data ) -> void - def to_hash: -> Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem::matrix_config + def to_hash: -> Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem::matrix_config end end type tier_sub_line_item = { amount: String, - grouping: Orb::Models::SubLineItemGroupingModel?, + grouping: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::Grouping?, name: String, quantity: Float, - tier_config: Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem::TierConfig, + tier_config: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::TierConfig, type: :tier } class TierSubLineItem < Orb::BaseModel attr_accessor amount: String - attr_accessor grouping: Orb::Models::SubLineItemGroupingModel? + attr_accessor grouping: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::Grouping? attr_accessor name: String attr_accessor quantity: Float - attr_accessor tier_config: Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem::TierConfig + attr_accessor tier_config: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::TierConfig attr_accessor type: :tier def initialize: ( amount: String, - grouping: Orb::Models::SubLineItemGroupingModel?, + grouping: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::Grouping?, name: String, quantity: Float, - tier_config: Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem::TierConfig, + tier_config: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::TierConfig, type: :tier ) -> void | ( - ?Orb::Models::InvoiceLineItemModel::SubLineItem::tier_sub_line_item + ?Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::tier_sub_line_item | Orb::BaseModel data ) -> void - def to_hash: -> Orb::Models::InvoiceLineItemModel::SubLineItem::tier_sub_line_item + def to_hash: -> Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::tier_sub_line_item + + type grouping = { key: String, value: String? } + + class Grouping < Orb::BaseModel + attr_accessor key: String + + attr_accessor value: String? + + def initialize: + (key: String, value: String?) -> void + | ( + ?Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::grouping + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::grouping + end type tier_config = { first_unit: Float, last_unit: Float?, unit_amount: String } @@ -452,18 +530,18 @@ module Orb unit_amount: String ) -> void | ( - ?Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem::tier_config + ?Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::tier_config | Orb::BaseModel data ) -> void - def to_hash: -> Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem::tier_config + def to_hash: -> Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem::tier_config end end type other_sub_line_item = { amount: String, - grouping: Orb::Models::SubLineItemGroupingModel?, + grouping: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem::Grouping?, name: String, quantity: Float, type: :"'null'" @@ -472,7 +550,7 @@ module Orb class OtherSubLineItem < Orb::BaseModel attr_accessor amount: String - attr_accessor grouping: Orb::Models::SubLineItemGroupingModel? + attr_accessor grouping: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem::Grouping? attr_accessor name: String @@ -483,20 +561,65 @@ module Orb def initialize: ( amount: String, - grouping: Orb::Models::SubLineItemGroupingModel?, + grouping: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem::Grouping?, name: String, quantity: Float, type: :"'null'" ) -> void | ( - ?Orb::Models::InvoiceLineItemModel::SubLineItem::other_sub_line_item + ?Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::other_sub_line_item | Orb::BaseModel data ) -> void - def to_hash: -> Orb::Models::InvoiceLineItemModel::SubLineItem::other_sub_line_item + def to_hash: -> Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::other_sub_line_item + + type grouping = { key: String, value: String? } + + class Grouping < Orb::BaseModel + attr_accessor key: String + + attr_accessor value: String? + + def initialize: + (key: String, value: String?) -> void + | ( + ?Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem::grouping + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem::grouping + end end - private def self.variants: -> [[:matrix, Orb::Models::InvoiceLineItemModel::SubLineItem::MatrixSubLineItem], [:tier, Orb::Models::InvoiceLineItemModel::SubLineItem::TierSubLineItem], [:"'null'", Orb::Models::InvoiceLineItemModel::SubLineItem::OtherSubLineItem]] + private def self.variants: -> [[:matrix, Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem], [:tier, Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem], [:"'null'", Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem]] + end + + type tax_amount = + { + amount: String, + tax_rate_description: String, + tax_rate_percentage: String? + } + + class TaxAmount < Orb::BaseModel + attr_accessor amount: String + + attr_accessor tax_rate_description: String + + attr_accessor tax_rate_percentage: String? + + def initialize: + ( + amount: String, + tax_rate_description: String, + tax_rate_percentage: String? + ) -> void + | ( + ?Orb::Models::InvoiceLineItemCreateResponse::tax_amount + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::InvoiceLineItemCreateResponse::tax_amount end end end diff --git a/sig/orb/models/invoice_model.rbs b/sig/orb/models/invoice_model.rbs deleted file mode 100644 index f6d629d3..00000000 --- a/sig/orb/models/invoice_model.rbs +++ /dev/null @@ -1,202 +0,0 @@ -module Orb - module Models - type invoice_model = - { - id: String, - amount_due: String, - auto_collection: Orb::Models::AutoCollectionModel, - billing_address: Orb::Models::AddressModel?, - created_at: Time, - credit_notes: ::Array[Orb::Models::CreditNoteSummaryModel], - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - customer_balance_transactions: ::Array[Orb::Models::CustomerBalanceTransactionModel], - customer_tax_id: Orb::Models::CustomerTaxIDModel?, - discount: top, - discounts: ::Array[Orb::Models::invoice_level_discount], - due_date: Time?, - eligible_to_issue_at: Time?, - hosted_invoice_url: String?, - invoice_date: Time, - invoice_number: String, - invoice_pdf: String?, - invoice_source: Orb::Models::InvoiceModel::invoice_source, - issue_failed_at: Time?, - issued_at: Time?, - line_items: ::Array[Orb::Models::InvoiceLineItemModel], - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - memo: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - paid_at: Time?, - payment_attempts: ::Array[Orb::Models::PaymentAttemptModel], - payment_failed_at: Time?, - payment_started_at: Time?, - scheduled_issue_at: Time?, - shipping_address: Orb::Models::AddressModel?, - status: Orb::Models::InvoiceModel::status, - subscription: Orb::Models::SubscriptionMinifiedModel?, - subtotal: String, - sync_failed_at: Time?, - total: String, - voided_at: Time?, - will_auto_issue: bool - } - - class InvoiceModel < Orb::BaseModel - attr_accessor id: String - - attr_accessor amount_due: String - - attr_accessor auto_collection: Orb::Models::AutoCollectionModel - - attr_accessor billing_address: Orb::Models::AddressModel? - - attr_accessor created_at: Time - - attr_accessor credit_notes: ::Array[Orb::Models::CreditNoteSummaryModel] - - attr_accessor currency: String - - attr_accessor customer: Orb::Models::CustomerMinifiedModel - - attr_accessor customer_balance_transactions: ::Array[Orb::Models::CustomerBalanceTransactionModel] - - attr_accessor customer_tax_id: Orb::Models::CustomerTaxIDModel? - - attr_accessor discount: top - - attr_accessor discounts: ::Array[Orb::Models::invoice_level_discount] - - attr_accessor due_date: Time? - - attr_accessor eligible_to_issue_at: Time? - - attr_accessor hosted_invoice_url: String? - - attr_accessor invoice_date: Time - - attr_accessor invoice_number: String - - attr_accessor invoice_pdf: String? - - attr_accessor invoice_source: Orb::Models::InvoiceModel::invoice_source - - attr_accessor issue_failed_at: Time? - - attr_accessor issued_at: Time? - - attr_accessor line_items: ::Array[Orb::Models::InvoiceLineItemModel] - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor memo: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor paid_at: Time? - - attr_accessor payment_attempts: ::Array[Orb::Models::PaymentAttemptModel] - - attr_accessor payment_failed_at: Time? - - attr_accessor payment_started_at: Time? - - attr_accessor scheduled_issue_at: Time? - - attr_accessor shipping_address: Orb::Models::AddressModel? - - attr_accessor status: Orb::Models::InvoiceModel::status - - attr_accessor subscription: Orb::Models::SubscriptionMinifiedModel? - - attr_accessor subtotal: String - - attr_accessor sync_failed_at: Time? - - attr_accessor total: String - - attr_accessor voided_at: Time? - - attr_accessor will_auto_issue: bool - - def initialize: - ( - id: String, - amount_due: String, - auto_collection: Orb::Models::AutoCollectionModel, - billing_address: Orb::Models::AddressModel?, - created_at: Time, - credit_notes: ::Array[Orb::Models::CreditNoteSummaryModel], - currency: String, - customer: Orb::Models::CustomerMinifiedModel, - customer_balance_transactions: ::Array[Orb::Models::CustomerBalanceTransactionModel], - customer_tax_id: Orb::Models::CustomerTaxIDModel?, - discount: top, - discounts: ::Array[Orb::Models::invoice_level_discount], - due_date: Time?, - eligible_to_issue_at: Time?, - hosted_invoice_url: String?, - invoice_date: Time, - invoice_number: String, - invoice_pdf: String?, - invoice_source: Orb::Models::InvoiceModel::invoice_source, - issue_failed_at: Time?, - issued_at: Time?, - line_items: ::Array[Orb::Models::InvoiceLineItemModel], - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - memo: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - paid_at: Time?, - payment_attempts: ::Array[Orb::Models::PaymentAttemptModel], - payment_failed_at: Time?, - payment_started_at: Time?, - scheduled_issue_at: Time?, - shipping_address: Orb::Models::AddressModel?, - status: Orb::Models::InvoiceModel::status, - subscription: Orb::Models::SubscriptionMinifiedModel?, - subtotal: String, - sync_failed_at: Time?, - total: String, - voided_at: Time?, - will_auto_issue: bool - ) -> void - | (?Orb::Models::invoice_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::invoice_model - - type invoice_source = :subscription | :partial | :one_off - - class InvoiceSource < Orb::Enum - SUBSCRIPTION: :subscription - PARTIAL: :partial - ONE_OFF: :one_off - - def self.values: -> ::Array[Orb::Models::InvoiceModel::invoice_source] - end - - type status = :issued | :paid | :synced | :void | :draft - - class Status < Orb::Enum - ISSUED: :issued - PAID: :paid - SYNCED: :synced - VOID: :void - DRAFT: :draft - - def self.values: -> ::Array[Orb::Models::InvoiceModel::status] - end - end - end -end diff --git a/sig/orb/models/item.rbs b/sig/orb/models/item.rbs index fb5386cb..d7ad1b56 100644 --- a/sig/orb/models/item.rbs +++ b/sig/orb/models/item.rbs @@ -4,7 +4,7 @@ module Orb { id: String, created_at: Time, - external_connections: ::Array[Orb::Models::ItemExternalConnectionModel], + external_connections: ::Array[Orb::Models::Item::ExternalConnection], name: String } @@ -13,7 +13,7 @@ module Orb attr_accessor created_at: Time - attr_accessor external_connections: ::Array[Orb::Models::ItemExternalConnectionModel] + attr_accessor external_connections: ::Array[Orb::Models::Item::ExternalConnection] attr_accessor name: String @@ -21,12 +21,56 @@ module Orb ( id: String, created_at: Time, - external_connections: ::Array[Orb::Models::ItemExternalConnectionModel], + external_connections: ::Array[Orb::Models::Item::ExternalConnection], name: String ) -> void | (?Orb::Models::item | Orb::BaseModel data) -> void def to_hash: -> Orb::Models::item + + type external_connection = + { + external_connection_name: Orb::Models::Item::ExternalConnection::external_connection_name, + external_entity_id: String + } + + class ExternalConnection < Orb::BaseModel + attr_accessor external_connection_name: Orb::Models::Item::ExternalConnection::external_connection_name + + attr_accessor external_entity_id: String + + def initialize: + ( + external_connection_name: Orb::Models::Item::ExternalConnection::external_connection_name, + external_entity_id: String + ) -> void + | ( + ?Orb::Models::Item::external_connection | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Item::external_connection + + type external_connection_name = + :stripe + | :quickbooks + | :"bill.com" + | :netsuite + | :taxjar + | :avalara + | :anrok + + class ExternalConnectionName < Orb::Enum + STRIPE: :stripe + QUICKBOOKS: :quickbooks + BILL_COM: :"bill.com" + NETSUITE: :netsuite + TAXJAR: :taxjar + AVALARA: :avalara + ANROK: :anrok + + def self.values: -> ::Array[Orb::Models::Item::ExternalConnection::external_connection_name] + end + end end end end diff --git a/sig/orb/models/item_external_connection_model.rbs b/sig/orb/models/item_external_connection_model.rbs deleted file mode 100644 index 1bc9fd69..00000000 --- a/sig/orb/models/item_external_connection_model.rbs +++ /dev/null @@ -1,47 +0,0 @@ -module Orb - module Models - type item_external_connection_model = - { - external_connection_name: Orb::Models::ItemExternalConnectionModel::external_connection_name, - external_entity_id: String - } - - class ItemExternalConnectionModel < Orb::BaseModel - attr_accessor external_connection_name: Orb::Models::ItemExternalConnectionModel::external_connection_name - - attr_accessor external_entity_id: String - - def initialize: - ( - external_connection_name: Orb::Models::ItemExternalConnectionModel::external_connection_name, - external_entity_id: String - ) -> void - | ( - ?Orb::Models::item_external_connection_model | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::item_external_connection_model - - type external_connection_name = - :stripe - | :quickbooks - | :"bill.com" - | :netsuite - | :taxjar - | :avalara - | :anrok - - class ExternalConnectionName < Orb::Enum - STRIPE: :stripe - QUICKBOOKS: :quickbooks - BILL_COM: :"bill.com" - NETSUITE: :netsuite - TAXJAR: :taxjar - AVALARA: :avalara - ANROK: :anrok - - def self.values: -> ::Array[Orb::Models::ItemExternalConnectionModel::external_connection_name] - end - end - end -end diff --git a/sig/orb/models/item_model.rbs b/sig/orb/models/item_model.rbs deleted file mode 100644 index 99ed159f..00000000 --- a/sig/orb/models/item_model.rbs +++ /dev/null @@ -1,32 +0,0 @@ -module Orb - module Models - type item_model = - { - id: String, - created_at: Time, - external_connections: ::Array[Orb::Models::ItemExternalConnectionModel], - name: String - } - - class ItemModel < Orb::BaseModel - attr_accessor id: String - - attr_accessor created_at: Time - - attr_accessor external_connections: ::Array[Orb::Models::ItemExternalConnectionModel] - - attr_accessor name: String - - def initialize: - ( - id: String, - created_at: Time, - external_connections: ::Array[Orb::Models::ItemExternalConnectionModel], - name: String - ) -> void - | (?Orb::Models::item_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::item_model - end - end -end diff --git a/sig/orb/models/item_slim_model.rbs b/sig/orb/models/item_slim_model.rbs deleted file mode 100644 index bee1b65e..00000000 --- a/sig/orb/models/item_slim_model.rbs +++ /dev/null @@ -1,17 +0,0 @@ -module Orb - module Models - type item_slim_model = { id: String, name: String } - - class ItemSlimModel < Orb::BaseModel - attr_accessor id: String - - attr_accessor name: String - - def initialize: - (id: String, name: String) -> void - | (?Orb::Models::item_slim_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::item_slim_model - end - end -end diff --git a/sig/orb/models/item_update_params.rbs b/sig/orb/models/item_update_params.rbs index b4303792..ba3f721a 100644 --- a/sig/orb/models/item_update_params.rbs +++ b/sig/orb/models/item_update_params.rbs @@ -2,7 +2,7 @@ module Orb module Models type item_update_params = { - external_connections: ::Array[Orb::Models::ItemExternalConnectionModel]?, + external_connections: ::Array[Orb::Models::ItemUpdateParams::ExternalConnection]?, name: String? } & Orb::request_parameters @@ -11,19 +11,64 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters - attr_accessor external_connections: ::Array[Orb::Models::ItemExternalConnectionModel]? + attr_accessor external_connections: ::Array[Orb::Models::ItemUpdateParams::ExternalConnection]? attr_accessor name: String? def initialize: ( - external_connections: ::Array[Orb::Models::ItemExternalConnectionModel]?, + external_connections: ::Array[Orb::Models::ItemUpdateParams::ExternalConnection]?, name: String?, request_options: Orb::request_opts ) -> void | (?Orb::Models::item_update_params | Orb::BaseModel data) -> void def to_hash: -> Orb::Models::item_update_params + + type external_connection = + { + external_connection_name: Orb::Models::ItemUpdateParams::ExternalConnection::external_connection_name, + external_entity_id: String + } + + class ExternalConnection < Orb::BaseModel + attr_accessor external_connection_name: Orb::Models::ItemUpdateParams::ExternalConnection::external_connection_name + + attr_accessor external_entity_id: String + + def initialize: + ( + external_connection_name: Orb::Models::ItemUpdateParams::ExternalConnection::external_connection_name, + external_entity_id: String + ) -> void + | ( + ?Orb::Models::ItemUpdateParams::external_connection + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ItemUpdateParams::external_connection + + type external_connection_name = + :stripe + | :quickbooks + | :"bill.com" + | :netsuite + | :taxjar + | :avalara + | :anrok + + class ExternalConnectionName < Orb::Enum + STRIPE: :stripe + QUICKBOOKS: :quickbooks + BILL_COM: :"bill.com" + NETSUITE: :netsuite + TAXJAR: :taxjar + AVALARA: :avalara + ANROK: :anrok + + def self.values: -> ::Array[Orb::Models::ItemUpdateParams::ExternalConnection::external_connection_name] + end + end end end end diff --git a/sig/orb/models/matrix_config_model.rbs b/sig/orb/models/matrix_config_model.rbs deleted file mode 100644 index 88a859b8..00000000 --- a/sig/orb/models/matrix_config_model.rbs +++ /dev/null @@ -1,28 +0,0 @@ -module Orb - module Models - type matrix_config_model = - { - default_unit_amount: String, - dimensions: ::Array[String?], - matrix_values: ::Array[Orb::Models::MatrixValueModel] - } - - class MatrixConfigModel < Orb::BaseModel - attr_accessor default_unit_amount: String - - attr_accessor dimensions: ::Array[String?] - - attr_accessor matrix_values: ::Array[Orb::Models::MatrixValueModel] - - def initialize: - ( - default_unit_amount: String, - dimensions: ::Array[String?], - matrix_values: ::Array[Orb::Models::MatrixValueModel] - ) -> void - | (?Orb::Models::matrix_config_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::matrix_config_model - end - end -end diff --git a/sig/orb/models/matrix_value_model.rbs b/sig/orb/models/matrix_value_model.rbs deleted file mode 100644 index 87065f0f..00000000 --- a/sig/orb/models/matrix_value_model.rbs +++ /dev/null @@ -1,18 +0,0 @@ -module Orb - module Models - type matrix_value_model = - { dimension_values: ::Array[String?], unit_amount: String } - - class MatrixValueModel < Orb::BaseModel - attr_accessor dimension_values: ::Array[String?] - - attr_accessor unit_amount: String - - def initialize: - (dimension_values: ::Array[String?], unit_amount: String) -> void - | (?Orb::Models::matrix_value_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::matrix_value_model - end - end -end diff --git a/sig/orb/models/matrix_with_allocation_config_model.rbs b/sig/orb/models/matrix_with_allocation_config_model.rbs deleted file mode 100644 index 5a7ad415..00000000 --- a/sig/orb/models/matrix_with_allocation_config_model.rbs +++ /dev/null @@ -1,35 +0,0 @@ -module Orb - module Models - type matrix_with_allocation_config_model = - { - allocation: Float, - default_unit_amount: String, - dimensions: ::Array[String?], - matrix_values: ::Array[Orb::Models::MatrixValueModel] - } - - class MatrixWithAllocationConfigModel < Orb::BaseModel - attr_accessor allocation: Float - - attr_accessor default_unit_amount: String - - attr_accessor dimensions: ::Array[String?] - - attr_accessor matrix_values: ::Array[Orb::Models::MatrixValueModel] - - def initialize: - ( - allocation: Float, - default_unit_amount: String, - dimensions: ::Array[String?], - matrix_values: ::Array[Orb::Models::MatrixValueModel] - ) -> void - | ( - ?Orb::Models::matrix_with_allocation_config_model - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::matrix_with_allocation_config_model - end - end -end diff --git a/sig/orb/models/maximum_interval_model.rbs b/sig/orb/models/maximum_interval_model.rbs deleted file mode 100644 index 82a03a73..00000000 --- a/sig/orb/models/maximum_interval_model.rbs +++ /dev/null @@ -1,36 +0,0 @@ -module Orb - module Models - type maximum_interval_model = - { - applies_to_price_ids: ::Array[String], - applies_to_price_interval_ids: ::Array[String], - end_date: Time?, - maximum_amount: String, - start_date: Time - } - - class MaximumIntervalModel < Orb::BaseModel - attr_accessor applies_to_price_ids: ::Array[String] - - attr_accessor applies_to_price_interval_ids: ::Array[String] - - attr_accessor end_date: Time? - - attr_accessor maximum_amount: String - - attr_accessor start_date: Time - - def initialize: - ( - applies_to_price_ids: ::Array[String], - applies_to_price_interval_ids: ::Array[String], - end_date: Time?, - maximum_amount: String, - start_date: Time - ) -> void - | (?Orb::Models::maximum_interval_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::maximum_interval_model - end - end -end diff --git a/sig/orb/models/maximum_model.rbs b/sig/orb/models/maximum_model.rbs deleted file mode 100644 index b811cd18..00000000 --- a/sig/orb/models/maximum_model.rbs +++ /dev/null @@ -1,18 +0,0 @@ -module Orb - module Models - type maximum_model = - { applies_to_price_ids: ::Array[String], maximum_amount: String } - - class MaximumModel < Orb::BaseModel - attr_accessor applies_to_price_ids: ::Array[String] - - attr_accessor maximum_amount: String - - def initialize: - (applies_to_price_ids: ::Array[String], maximum_amount: String) -> void - | (?Orb::Models::maximum_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::maximum_model - end - end -end diff --git a/sig/orb/models/minimum_interval_model.rbs b/sig/orb/models/minimum_interval_model.rbs deleted file mode 100644 index 3ea4d824..00000000 --- a/sig/orb/models/minimum_interval_model.rbs +++ /dev/null @@ -1,36 +0,0 @@ -module Orb - module Models - type minimum_interval_model = - { - applies_to_price_ids: ::Array[String], - applies_to_price_interval_ids: ::Array[String], - end_date: Time?, - minimum_amount: String, - start_date: Time - } - - class MinimumIntervalModel < Orb::BaseModel - attr_accessor applies_to_price_ids: ::Array[String] - - attr_accessor applies_to_price_interval_ids: ::Array[String] - - attr_accessor end_date: Time? - - attr_accessor minimum_amount: String - - attr_accessor start_date: Time - - def initialize: - ( - applies_to_price_ids: ::Array[String], - applies_to_price_interval_ids: ::Array[String], - end_date: Time?, - minimum_amount: String, - start_date: Time - ) -> void - | (?Orb::Models::minimum_interval_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::minimum_interval_model - end - end -end diff --git a/sig/orb/models/minimum_model.rbs b/sig/orb/models/minimum_model.rbs deleted file mode 100644 index 10520b34..00000000 --- a/sig/orb/models/minimum_model.rbs +++ /dev/null @@ -1,18 +0,0 @@ -module Orb - module Models - type minimum_model = - { applies_to_price_ids: ::Array[String], minimum_amount: String } - - class MinimumModel < Orb::BaseModel - attr_accessor applies_to_price_ids: ::Array[String] - - attr_accessor minimum_amount: String - - def initialize: - (applies_to_price_ids: ::Array[String], minimum_amount: String) -> void - | (?Orb::Models::minimum_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::minimum_model - end - end -end diff --git a/sig/orb/models/mutated_subscription_model.rbs b/sig/orb/models/mutated_subscription_model.rbs deleted file mode 100644 index db957ade..00000000 --- a/sig/orb/models/mutated_subscription_model.rbs +++ /dev/null @@ -1,137 +0,0 @@ -module Orb - module Models - type mutated_subscription_model = - { - id: String, - active_plan_phase_order: Integer?, - adjustment_intervals: ::Array[Orb::Models::AdjustmentIntervalModel], - auto_collection: bool?, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, - billing_cycle_day: Integer, - created_at: Time, - current_billing_period_end_date: Time?, - current_billing_period_start_date: Time?, - customer: Orb::Models::CustomerModel, - default_invoice_memo: String?, - discount_intervals: ::Array[Orb::Models::MutatedSubscriptionModel::discount_interval], - end_date: Time?, - fixed_fee_quantity_schedule: ::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel], - invoicing_threshold: String?, - maximum_intervals: ::Array[Orb::Models::MaximumIntervalModel], - metadata: ::Hash[Symbol, String], - minimum_intervals: ::Array[Orb::Models::MinimumIntervalModel], - net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: ::Array[Orb::Models::PriceIntervalModel], - redeemed_coupon: Orb::Models::CouponRedemptionModel?, - start_date: Time, - status: Orb::Models::MutatedSubscriptionModel::status, - trial_info: Orb::Models::SubscriptionTrialInfoModel - } - - class MutatedSubscriptionModel < Orb::BaseModel - attr_accessor id: String - - attr_accessor active_plan_phase_order: Integer? - - attr_accessor adjustment_intervals: ::Array[Orb::Models::AdjustmentIntervalModel] - - attr_accessor auto_collection: bool? - - attr_accessor billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel - - attr_accessor billing_cycle_day: Integer - - attr_accessor created_at: Time - - attr_accessor current_billing_period_end_date: Time? - - attr_accessor current_billing_period_start_date: Time? - - attr_accessor customer: Orb::Models::CustomerModel - - attr_accessor default_invoice_memo: String? - - attr_accessor discount_intervals: ::Array[Orb::Models::MutatedSubscriptionModel::discount_interval] - - attr_accessor end_date: Time? - - attr_accessor fixed_fee_quantity_schedule: ::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel] - - attr_accessor invoicing_threshold: String? - - attr_accessor maximum_intervals: ::Array[Orb::Models::MaximumIntervalModel] - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum_intervals: ::Array[Orb::Models::MinimumIntervalModel] - - attr_accessor net_terms: Integer - - attr_accessor plan: Orb::Models::PlanModel - - attr_accessor price_intervals: ::Array[Orb::Models::PriceIntervalModel] - - attr_accessor redeemed_coupon: Orb::Models::CouponRedemptionModel? - - attr_accessor start_date: Time - - attr_accessor status: Orb::Models::MutatedSubscriptionModel::status - - attr_accessor trial_info: Orb::Models::SubscriptionTrialInfoModel - - def initialize: - ( - id: String, - active_plan_phase_order: Integer?, - adjustment_intervals: ::Array[Orb::Models::AdjustmentIntervalModel], - auto_collection: bool?, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, - billing_cycle_day: Integer, - created_at: Time, - current_billing_period_end_date: Time?, - current_billing_period_start_date: Time?, - customer: Orb::Models::CustomerModel, - default_invoice_memo: String?, - discount_intervals: ::Array[Orb::Models::MutatedSubscriptionModel::discount_interval], - end_date: Time?, - fixed_fee_quantity_schedule: ::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel], - invoicing_threshold: String?, - maximum_intervals: ::Array[Orb::Models::MaximumIntervalModel], - metadata: ::Hash[Symbol, String], - minimum_intervals: ::Array[Orb::Models::MinimumIntervalModel], - net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: ::Array[Orb::Models::PriceIntervalModel], - redeemed_coupon: Orb::Models::CouponRedemptionModel?, - start_date: Time, - status: Orb::Models::MutatedSubscriptionModel::status, - trial_info: Orb::Models::SubscriptionTrialInfoModel - ) -> void - | ( - ?Orb::Models::mutated_subscription_model | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::mutated_subscription_model - - type discount_interval = - Orb::Models::AmountDiscountIntervalModel - | Orb::Models::PercentageDiscountIntervalModel - | Orb::Models::UsageDiscountIntervalModel - - class DiscountInterval < Orb::Union - private def self.variants: -> [[:amount, Orb::Models::AmountDiscountIntervalModel], [:percentage, Orb::Models::PercentageDiscountIntervalModel], [:usage, Orb::Models::UsageDiscountIntervalModel]] - end - - type status = :active | :ended | :upcoming - - class Status < Orb::Enum - ACTIVE: :active - ENDED: :ended - UPCOMING: :upcoming - - def self.values: -> ::Array[Orb::Models::MutatedSubscriptionModel::status] - end - end - end -end diff --git a/sig/orb/models/new_accounting_sync_configuration_model.rbs b/sig/orb/models/new_accounting_sync_configuration_model.rbs deleted file mode 100644 index 6beb1084..00000000 --- a/sig/orb/models/new_accounting_sync_configuration_model.rbs +++ /dev/null @@ -1,45 +0,0 @@ -module Orb - module Models - type new_accounting_sync_configuration_model = - { - accounting_providers: ::Array[Orb::Models::NewAccountingSyncConfigurationModel::AccountingProvider]?, - excluded: bool? - } - - class NewAccountingSyncConfigurationModel < Orb::BaseModel - attr_accessor accounting_providers: ::Array[Orb::Models::NewAccountingSyncConfigurationModel::AccountingProvider]? - - attr_accessor excluded: bool? - - def initialize: - ( - accounting_providers: ::Array[Orb::Models::NewAccountingSyncConfigurationModel::AccountingProvider]?, - excluded: bool? - ) -> void - | ( - ?Orb::Models::new_accounting_sync_configuration_model - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::new_accounting_sync_configuration_model - - type accounting_provider = - { external_provider_id: String, provider_type: String } - - class AccountingProvider < Orb::BaseModel - attr_accessor external_provider_id: String - - attr_accessor provider_type: String - - def initialize: - (external_provider_id: String, provider_type: String) -> void - | ( - ?Orb::Models::NewAccountingSyncConfigurationModel::accounting_provider - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewAccountingSyncConfigurationModel::accounting_provider - end - end - end -end diff --git a/sig/orb/models/new_adjustment_model.rbs b/sig/orb/models/new_adjustment_model.rbs deleted file mode 100644 index 50963e46..00000000 --- a/sig/orb/models/new_adjustment_model.rbs +++ /dev/null @@ -1,186 +0,0 @@ -module Orb - module Models - type new_adjustment_model = - Orb::Models::NewAdjustmentModel::NewPercentageDiscount - | Orb::Models::NewAdjustmentModel::NewUsageDiscount - | Orb::Models::NewAdjustmentModel::NewAmountDiscount - | Orb::Models::NewAdjustmentModel::NewMinimum - | Orb::Models::NewAdjustmentModel::NewMaximum - - class NewAdjustmentModel < Orb::Union - type new_percentage_discount = - { - adjustment_type: :percentage_discount, - applies_to_price_ids: ::Array[String], - percentage_discount: Float, - is_invoice_level: bool - } - - class NewPercentageDiscount < Orb::BaseModel - attr_accessor adjustment_type: :percentage_discount - - attr_accessor applies_to_price_ids: ::Array[String] - - attr_accessor percentage_discount: Float - - attr_reader is_invoice_level: bool? - - def is_invoice_level=: (bool) -> bool - - def initialize: - ( - applies_to_price_ids: ::Array[String], - percentage_discount: Float, - is_invoice_level: bool, - adjustment_type: :percentage_discount - ) -> void - | ( - ?Orb::Models::NewAdjustmentModel::new_percentage_discount - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewAdjustmentModel::new_percentage_discount - end - - type new_usage_discount = - { - adjustment_type: :usage_discount, - applies_to_price_ids: ::Array[String], - usage_discount: Float, - is_invoice_level: bool - } - - class NewUsageDiscount < Orb::BaseModel - attr_accessor adjustment_type: :usage_discount - - attr_accessor applies_to_price_ids: ::Array[String] - - attr_accessor usage_discount: Float - - attr_reader is_invoice_level: bool? - - def is_invoice_level=: (bool) -> bool - - def initialize: - ( - applies_to_price_ids: ::Array[String], - usage_discount: Float, - is_invoice_level: bool, - adjustment_type: :usage_discount - ) -> void - | ( - ?Orb::Models::NewAdjustmentModel::new_usage_discount - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewAdjustmentModel::new_usage_discount - end - - type new_amount_discount = - { - adjustment_type: :amount_discount, - amount_discount: String, - applies_to_price_ids: ::Array[String], - is_invoice_level: bool - } - - class NewAmountDiscount < Orb::BaseModel - attr_accessor adjustment_type: :amount_discount - - attr_accessor amount_discount: String - - attr_accessor applies_to_price_ids: ::Array[String] - - attr_reader is_invoice_level: bool? - - def is_invoice_level=: (bool) -> bool - - def initialize: - ( - amount_discount: String, - applies_to_price_ids: ::Array[String], - is_invoice_level: bool, - adjustment_type: :amount_discount - ) -> void - | ( - ?Orb::Models::NewAdjustmentModel::new_amount_discount - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewAdjustmentModel::new_amount_discount - end - - type new_minimum = - { - adjustment_type: :minimum, - applies_to_price_ids: ::Array[String], - item_id: String, - minimum_amount: String, - is_invoice_level: bool - } - - class NewMinimum < Orb::BaseModel - attr_accessor adjustment_type: :minimum - - attr_accessor applies_to_price_ids: ::Array[String] - - attr_accessor item_id: String - - attr_accessor minimum_amount: String - - attr_reader is_invoice_level: bool? - - def is_invoice_level=: (bool) -> bool - - def initialize: - ( - applies_to_price_ids: ::Array[String], - item_id: String, - minimum_amount: String, - is_invoice_level: bool, - adjustment_type: :minimum - ) -> void - | ( - ?Orb::Models::NewAdjustmentModel::new_minimum | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewAdjustmentModel::new_minimum - end - - type new_maximum = - { - adjustment_type: :maximum, - applies_to_price_ids: ::Array[String], - maximum_amount: String, - is_invoice_level: bool - } - - class NewMaximum < Orb::BaseModel - attr_accessor adjustment_type: :maximum - - attr_accessor applies_to_price_ids: ::Array[String] - - attr_accessor maximum_amount: String - - attr_reader is_invoice_level: bool? - - def is_invoice_level=: (bool) -> bool - - def initialize: - ( - applies_to_price_ids: ::Array[String], - maximum_amount: String, - is_invoice_level: bool, - adjustment_type: :maximum - ) -> void - | ( - ?Orb::Models::NewAdjustmentModel::new_maximum | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewAdjustmentModel::new_maximum - end - - private def self.variants: -> [[:percentage_discount, Orb::Models::NewAdjustmentModel::NewPercentageDiscount], [:usage_discount, Orb::Models::NewAdjustmentModel::NewUsageDiscount], [:amount_discount, Orb::Models::NewAdjustmentModel::NewAmountDiscount], [:minimum, Orb::Models::NewAdjustmentModel::NewMinimum], [:maximum, Orb::Models::NewAdjustmentModel::NewMaximum]] - end - end -end diff --git a/sig/orb/models/new_allocation_price_model.rbs b/sig/orb/models/new_allocation_price_model.rbs deleted file mode 100644 index 0461280a..00000000 --- a/sig/orb/models/new_allocation_price_model.rbs +++ /dev/null @@ -1,48 +0,0 @@ -module Orb - module Models - type new_allocation_price_model = - { - amount: String, - cadence: Orb::Models::NewAllocationPriceModel::cadence, - currency: String, - expires_at_end_of_cadence: bool - } - - class NewAllocationPriceModel < Orb::BaseModel - attr_accessor amount: String - - attr_accessor cadence: Orb::Models::NewAllocationPriceModel::cadence - - attr_accessor currency: String - - attr_accessor expires_at_end_of_cadence: bool - - def initialize: - ( - amount: String, - cadence: Orb::Models::NewAllocationPriceModel::cadence, - currency: String, - expires_at_end_of_cadence: bool - ) -> void - | ( - ?Orb::Models::new_allocation_price_model | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::new_allocation_price_model - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewAllocationPriceModel::cadence] - end - end - end -end diff --git a/sig/orb/models/new_billing_cycle_configuration_model.rbs b/sig/orb/models/new_billing_cycle_configuration_model.rbs deleted file mode 100644 index f6bdebf3..00000000 --- a/sig/orb/models/new_billing_cycle_configuration_model.rbs +++ /dev/null @@ -1,36 +0,0 @@ -module Orb - module Models - type new_billing_cycle_configuration_model = - { - duration: Integer, - duration_unit: Orb::Models::NewBillingCycleConfigurationModel::duration_unit - } - - class NewBillingCycleConfigurationModel < Orb::BaseModel - attr_accessor duration: Integer - - attr_accessor duration_unit: Orb::Models::NewBillingCycleConfigurationModel::duration_unit - - def initialize: - ( - duration: Integer, - duration_unit: Orb::Models::NewBillingCycleConfigurationModel::duration_unit - ) -> void - | ( - ?Orb::Models::new_billing_cycle_configuration_model - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::new_billing_cycle_configuration_model - - type duration_unit = :day | :month - - class DurationUnit < Orb::Enum - DAY: :day - MONTH: :month - - def self.values: -> ::Array[Orb::Models::NewBillingCycleConfigurationModel::duration_unit] - end - end - end -end diff --git a/sig/orb/models/new_floating_price_model.rbs b/sig/orb/models/new_floating_price_model.rbs deleted file mode 100644 index 2711d729..00000000 --- a/sig/orb/models/new_floating_price_model.rbs +++ /dev/null @@ -1,2557 +0,0 @@ -module Orb - module Models - type new_floating_price_model = - Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice - | Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice - | Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice - | Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice - | Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice - | Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice - | Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice - | Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice - | Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice - | Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice - | Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice - | Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice - | Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice - | Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice - | Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice - | Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice - | Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice - | Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice - | Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice - | Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice - | Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice - | Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice - | Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice - | Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice - | Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice - | Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice - | Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice - | Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice - - class NewFloatingPriceModel < Orb::Union - type new_floating_unit_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice::cadence, - currency: String, - item_id: String, - model_type: :unit, - name: String, - unit_config: Orb::Models::UnitConfigModel, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingUnitPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice::cadence - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor model_type: :unit - - attr_accessor name: String - - attr_accessor unit_config: Orb::Models::UnitConfigModel - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice::cadence, - currency: String, - item_id: String, - name: String, - unit_config: Orb::Models::UnitConfigModel, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :unit - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_unit_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_unit_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice::cadence] - end - end - - type new_floating_package_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice::cadence, - currency: String, - item_id: String, - model_type: :package, - name: String, - package_config: Orb::Models::PackageConfigModel, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingPackagePrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice::cadence - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor model_type: :package - - attr_accessor name: String - - attr_accessor package_config: Orb::Models::PackageConfigModel - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice::cadence, - currency: String, - item_id: String, - name: String, - package_config: Orb::Models::PackageConfigModel, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :package - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_package_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_package_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice::cadence] - end - end - - type new_floating_matrix_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice::cadence, - currency: String, - item_id: String, - matrix_config: Orb::Models::MatrixConfigModel, - model_type: :matrix, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingMatrixPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice::cadence - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor matrix_config: Orb::Models::MatrixConfigModel - - attr_accessor model_type: :matrix - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice::cadence, - currency: String, - item_id: String, - matrix_config: Orb::Models::MatrixConfigModel, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :matrix - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_matrix_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_matrix_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice::cadence] - end - end - - type new_floating_matrix_with_allocation_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice::cadence, - currency: String, - item_id: String, - matrix_with_allocation_config: Orb::Models::MatrixWithAllocationConfigModel, - model_type: :matrix_with_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingMatrixWithAllocationPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice::cadence - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor matrix_with_allocation_config: Orb::Models::MatrixWithAllocationConfigModel - - attr_accessor model_type: :matrix_with_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice::cadence, - currency: String, - item_id: String, - matrix_with_allocation_config: Orb::Models::MatrixWithAllocationConfigModel, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :matrix_with_allocation - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_matrix_with_allocation_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_matrix_with_allocation_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice::cadence] - end - end - - type new_floating_tiered_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice::cadence, - currency: String, - item_id: String, - model_type: :tiered, - name: String, - tiered_config: Orb::Models::TieredConfigModel, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingTieredPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice::cadence - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor model_type: :tiered - - attr_accessor name: String - - attr_accessor tiered_config: Orb::Models::TieredConfigModel - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice::cadence, - currency: String, - item_id: String, - name: String, - tiered_config: Orb::Models::TieredConfigModel, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :tiered - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_tiered_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_tiered_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice::cadence] - end - end - - type new_floating_tiered_bps_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice::cadence, - currency: String, - item_id: String, - model_type: :tiered_bps, - name: String, - tiered_bps_config: Orb::Models::TieredBpsConfigModel, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingTieredBpsPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice::cadence - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor model_type: :tiered_bps - - attr_accessor name: String - - attr_accessor tiered_bps_config: Orb::Models::TieredBpsConfigModel - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice::cadence, - currency: String, - item_id: String, - name: String, - tiered_bps_config: Orb::Models::TieredBpsConfigModel, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :tiered_bps - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_tiered_bps_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_tiered_bps_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice::cadence] - end - end - - type new_floating_bps_price = - { - bps_config: Orb::Models::BpsConfigModel, - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice::cadence, - currency: String, - item_id: String, - model_type: :bps, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingBpsPrice < Orb::BaseModel - attr_accessor bps_config: Orb::Models::BpsConfigModel - - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice::cadence - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor model_type: :bps - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - bps_config: Orb::Models::BpsConfigModel, - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice::cadence, - currency: String, - item_id: String, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :bps - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_bps_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_bps_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice::cadence] - end - end - - type new_floating_bulk_bps_price = - { - bulk_bps_config: Orb::Models::BulkBpsConfigModel, - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice::cadence, - currency: String, - item_id: String, - model_type: :bulk_bps, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingBulkBpsPrice < Orb::BaseModel - attr_accessor bulk_bps_config: Orb::Models::BulkBpsConfigModel - - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice::cadence - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor model_type: :bulk_bps - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - bulk_bps_config: Orb::Models::BulkBpsConfigModel, - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice::cadence, - currency: String, - item_id: String, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :bulk_bps - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_bulk_bps_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_bulk_bps_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice::cadence] - end - end - - type new_floating_bulk_price = - { - bulk_config: Orb::Models::BulkConfigModel, - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice::cadence, - currency: String, - item_id: String, - model_type: :bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingBulkPrice < Orb::BaseModel - attr_accessor bulk_config: Orb::Models::BulkConfigModel - - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice::cadence - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor model_type: :bulk - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - bulk_config: Orb::Models::BulkConfigModel, - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice::cadence, - currency: String, - item_id: String, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :bulk - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_bulk_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_bulk_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice::cadence] - end - end - - type new_floating_threshold_total_amount_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice::cadence, - currency: String, - item_id: String, - model_type: :threshold_total_amount, - name: String, - threshold_total_amount_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingThresholdTotalAmountPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice::cadence - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor model_type: :threshold_total_amount - - attr_accessor name: String - - attr_accessor threshold_total_amount_config: Orb::Models::custom_rating_function_config_model - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice::cadence, - currency: String, - item_id: String, - name: String, - threshold_total_amount_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :threshold_total_amount - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_threshold_total_amount_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_threshold_total_amount_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice::cadence] - end - end - - type new_floating_tiered_package_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice::cadence, - currency: String, - item_id: String, - model_type: :tiered_package, - name: String, - tiered_package_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingTieredPackagePrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice::cadence - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor model_type: :tiered_package - - attr_accessor name: String - - attr_accessor tiered_package_config: Orb::Models::custom_rating_function_config_model - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice::cadence, - currency: String, - item_id: String, - name: String, - tiered_package_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :tiered_package - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_tiered_package_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_tiered_package_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice::cadence] - end - end - - type new_floating_grouped_tiered_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice::cadence, - currency: String, - grouped_tiered_config: Orb::Models::custom_rating_function_config_model, - item_id: String, - model_type: :grouped_tiered, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingGroupedTieredPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice::cadence - - attr_accessor currency: String - - attr_accessor grouped_tiered_config: Orb::Models::custom_rating_function_config_model - - attr_accessor item_id: String - - attr_accessor model_type: :grouped_tiered - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice::cadence, - currency: String, - grouped_tiered_config: Orb::Models::custom_rating_function_config_model, - item_id: String, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :grouped_tiered - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_grouped_tiered_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_grouped_tiered_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice::cadence] - end - end - - type new_floating_max_group_tiered_package_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice::cadence, - currency: String, - item_id: String, - max_group_tiered_package_config: Orb::Models::custom_rating_function_config_model, - model_type: :max_group_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingMaxGroupTieredPackagePrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice::cadence - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor max_group_tiered_package_config: Orb::Models::custom_rating_function_config_model - - attr_accessor model_type: :max_group_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice::cadence, - currency: String, - item_id: String, - max_group_tiered_package_config: Orb::Models::custom_rating_function_config_model, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :max_group_tiered_package - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_max_group_tiered_package_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_max_group_tiered_package_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice::cadence] - end - end - - type new_floating_tiered_with_minimum_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice::cadence, - currency: String, - item_id: String, - model_type: :tiered_with_minimum, - name: String, - tiered_with_minimum_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingTieredWithMinimumPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice::cadence - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor model_type: :tiered_with_minimum - - attr_accessor name: String - - attr_accessor tiered_with_minimum_config: Orb::Models::custom_rating_function_config_model - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice::cadence, - currency: String, - item_id: String, - name: String, - tiered_with_minimum_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :tiered_with_minimum - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_tiered_with_minimum_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_tiered_with_minimum_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice::cadence] - end - end - - type new_floating_package_with_allocation_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice::cadence, - currency: String, - item_id: String, - model_type: :package_with_allocation, - name: String, - package_with_allocation_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingPackageWithAllocationPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice::cadence - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor model_type: :package_with_allocation - - attr_accessor name: String - - attr_accessor package_with_allocation_config: Orb::Models::custom_rating_function_config_model - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice::cadence, - currency: String, - item_id: String, - name: String, - package_with_allocation_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :package_with_allocation - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_package_with_allocation_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_package_with_allocation_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice::cadence] - end - end - - type new_floating_tiered_package_with_minimum_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice::cadence, - currency: String, - item_id: String, - model_type: :tiered_package_with_minimum, - name: String, - tiered_package_with_minimum_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingTieredPackageWithMinimumPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice::cadence - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor model_type: :tiered_package_with_minimum - - attr_accessor name: String - - attr_accessor tiered_package_with_minimum_config: Orb::Models::custom_rating_function_config_model - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice::cadence, - currency: String, - item_id: String, - name: String, - tiered_package_with_minimum_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :tiered_package_with_minimum - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_tiered_package_with_minimum_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_tiered_package_with_minimum_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice::cadence] - end - end - - type new_floating_unit_with_percent_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice::cadence, - currency: String, - item_id: String, - model_type: :unit_with_percent, - name: String, - unit_with_percent_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingUnitWithPercentPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice::cadence - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor model_type: :unit_with_percent - - attr_accessor name: String - - attr_accessor unit_with_percent_config: Orb::Models::custom_rating_function_config_model - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice::cadence, - currency: String, - item_id: String, - name: String, - unit_with_percent_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :unit_with_percent - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_unit_with_percent_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_unit_with_percent_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice::cadence] - end - end - - type new_floating_tiered_with_proration_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice::cadence, - currency: String, - item_id: String, - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingTieredWithProrationPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice::cadence - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor model_type: :tiered_with_proration - - attr_accessor name: String - - attr_accessor tiered_with_proration_config: Orb::Models::custom_rating_function_config_model - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice::cadence, - currency: String, - item_id: String, - name: String, - tiered_with_proration_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :tiered_with_proration - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_tiered_with_proration_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_tiered_with_proration_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice::cadence] - end - end - - type new_floating_unit_with_proration_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice::cadence, - currency: String, - item_id: String, - model_type: :unit_with_proration, - name: String, - unit_with_proration_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingUnitWithProrationPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice::cadence - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor model_type: :unit_with_proration - - attr_accessor name: String - - attr_accessor unit_with_proration_config: Orb::Models::custom_rating_function_config_model - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice::cadence, - currency: String, - item_id: String, - name: String, - unit_with_proration_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :unit_with_proration - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_unit_with_proration_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_unit_with_proration_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice::cadence] - end - end - - type new_floating_grouped_allocation_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice::cadence, - currency: String, - grouped_allocation_config: Orb::Models::custom_rating_function_config_model, - item_id: String, - model_type: :grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingGroupedAllocationPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice::cadence - - attr_accessor currency: String - - attr_accessor grouped_allocation_config: Orb::Models::custom_rating_function_config_model - - attr_accessor item_id: String - - attr_accessor model_type: :grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice::cadence, - currency: String, - grouped_allocation_config: Orb::Models::custom_rating_function_config_model, - item_id: String, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :grouped_allocation - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_grouped_allocation_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_grouped_allocation_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice::cadence] - end - end - - type new_floating_grouped_with_prorated_minimum_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice::cadence, - currency: String, - grouped_with_prorated_minimum_config: Orb::Models::custom_rating_function_config_model, - item_id: String, - model_type: :grouped_with_prorated_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingGroupedWithProratedMinimumPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice::cadence - - attr_accessor currency: String - - attr_accessor grouped_with_prorated_minimum_config: Orb::Models::custom_rating_function_config_model - - attr_accessor item_id: String - - attr_accessor model_type: :grouped_with_prorated_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice::cadence, - currency: String, - grouped_with_prorated_minimum_config: Orb::Models::custom_rating_function_config_model, - item_id: String, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :grouped_with_prorated_minimum - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_grouped_with_prorated_minimum_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_grouped_with_prorated_minimum_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice::cadence] - end - end - - type new_floating_grouped_with_metered_minimum_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice::cadence, - currency: String, - grouped_with_metered_minimum_config: Orb::Models::custom_rating_function_config_model, - item_id: String, - model_type: :grouped_with_metered_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingGroupedWithMeteredMinimumPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice::cadence - - attr_accessor currency: String - - attr_accessor grouped_with_metered_minimum_config: Orb::Models::custom_rating_function_config_model - - attr_accessor item_id: String - - attr_accessor model_type: :grouped_with_metered_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice::cadence, - currency: String, - grouped_with_metered_minimum_config: Orb::Models::custom_rating_function_config_model, - item_id: String, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :grouped_with_metered_minimum - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_grouped_with_metered_minimum_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_grouped_with_metered_minimum_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice::cadence] - end - end - - type new_floating_matrix_with_display_name_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice::cadence, - currency: String, - item_id: String, - matrix_with_display_name_config: Orb::Models::custom_rating_function_config_model, - model_type: :matrix_with_display_name, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingMatrixWithDisplayNamePrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice::cadence - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor matrix_with_display_name_config: Orb::Models::custom_rating_function_config_model - - attr_accessor model_type: :matrix_with_display_name - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice::cadence, - currency: String, - item_id: String, - matrix_with_display_name_config: Orb::Models::custom_rating_function_config_model, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :matrix_with_display_name - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_matrix_with_display_name_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_matrix_with_display_name_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice::cadence] - end - end - - type new_floating_bulk_with_proration_price = - { - bulk_with_proration_config: Orb::Models::custom_rating_function_config_model, - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice::cadence, - currency: String, - item_id: String, - model_type: :bulk_with_proration, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingBulkWithProrationPrice < Orb::BaseModel - attr_accessor bulk_with_proration_config: Orb::Models::custom_rating_function_config_model - - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice::cadence - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor model_type: :bulk_with_proration - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - bulk_with_proration_config: Orb::Models::custom_rating_function_config_model, - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice::cadence, - currency: String, - item_id: String, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :bulk_with_proration - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_bulk_with_proration_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_bulk_with_proration_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice::cadence] - end - end - - type new_floating_grouped_tiered_package_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice::cadence, - currency: String, - grouped_tiered_package_config: Orb::Models::custom_rating_function_config_model, - item_id: String, - model_type: :grouped_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingGroupedTieredPackagePrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice::cadence - - attr_accessor currency: String - - attr_accessor grouped_tiered_package_config: Orb::Models::custom_rating_function_config_model - - attr_accessor item_id: String - - attr_accessor model_type: :grouped_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice::cadence, - currency: String, - grouped_tiered_package_config: Orb::Models::custom_rating_function_config_model, - item_id: String, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :grouped_tiered_package - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_grouped_tiered_package_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_grouped_tiered_package_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice::cadence] - end - end - - type new_floating_scalable_matrix_with_unit_pricing_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice::cadence, - currency: String, - item_id: String, - model_type: :scalable_matrix_with_unit_pricing, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingScalableMatrixWithUnitPricingPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice::cadence - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor model_type: :scalable_matrix_with_unit_pricing - - attr_accessor name: String - - attr_accessor scalable_matrix_with_unit_pricing_config: Orb::Models::custom_rating_function_config_model - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice::cadence, - currency: String, - item_id: String, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :scalable_matrix_with_unit_pricing - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_scalable_matrix_with_unit_pricing_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_scalable_matrix_with_unit_pricing_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice::cadence] - end - end - - type new_floating_scalable_matrix_with_tiered_pricing_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice::cadence, - currency: String, - item_id: String, - model_type: :scalable_matrix_with_tiered_pricing, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingScalableMatrixWithTieredPricingPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice::cadence - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor model_type: :scalable_matrix_with_tiered_pricing - - attr_accessor name: String - - attr_accessor scalable_matrix_with_tiered_pricing_config: Orb::Models::custom_rating_function_config_model - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice::cadence, - currency: String, - item_id: String, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :scalable_matrix_with_tiered_pricing - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_scalable_matrix_with_tiered_pricing_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_scalable_matrix_with_tiered_pricing_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice::cadence] - end - end - - type new_floating_cumulative_grouped_bulk_price = - { - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice::cadence, - cumulative_grouped_bulk_config: Orb::Models::custom_rating_function_config_model, - currency: String, - item_id: String, - model_type: :cumulative_grouped_bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]? - } - - class NewFloatingCumulativeGroupedBulkPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice::cadence - - attr_accessor cumulative_grouped_bulk_config: Orb::Models::custom_rating_function_config_model - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor model_type: :cumulative_grouped_bulk - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - def initialize: - ( - cadence: Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice::cadence, - cumulative_grouped_bulk_config: Orb::Models::custom_rating_function_config_model, - currency: String, - item_id: String, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - model_type: :cumulative_grouped_bulk - ) -> void - | ( - ?Orb::Models::NewFloatingPriceModel::new_floating_cumulative_grouped_bulk_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewFloatingPriceModel::new_floating_cumulative_grouped_bulk_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice::cadence] - end - end - - private def self.variants: -> [[:unit, Orb::Models::NewFloatingPriceModel::NewFloatingUnitPrice], [:package, Orb::Models::NewFloatingPriceModel::NewFloatingPackagePrice], [:matrix, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixPrice], [:matrix_with_allocation, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithAllocationPrice], [:tiered, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPrice], [:tiered_bps, Orb::Models::NewFloatingPriceModel::NewFloatingTieredBpsPrice], [:bps, Orb::Models::NewFloatingPriceModel::NewFloatingBpsPrice], [:bulk_bps, Orb::Models::NewFloatingPriceModel::NewFloatingBulkBpsPrice], [:bulk, Orb::Models::NewFloatingPriceModel::NewFloatingBulkPrice], [:threshold_total_amount, Orb::Models::NewFloatingPriceModel::NewFloatingThresholdTotalAmountPrice], [:tiered_package, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackagePrice], [:grouped_tiered, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPrice], [:max_group_tiered_package, Orb::Models::NewFloatingPriceModel::NewFloatingMaxGroupTieredPackagePrice], [:tiered_with_minimum, Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithMinimumPrice], [:package_with_allocation, Orb::Models::NewFloatingPriceModel::NewFloatingPackageWithAllocationPrice], [:tiered_package_with_minimum, Orb::Models::NewFloatingPriceModel::NewFloatingTieredPackageWithMinimumPrice], [:unit_with_percent, Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithPercentPrice], [:tiered_with_proration, Orb::Models::NewFloatingPriceModel::NewFloatingTieredWithProrationPrice], [:unit_with_proration, Orb::Models::NewFloatingPriceModel::NewFloatingUnitWithProrationPrice], [:grouped_allocation, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedAllocationPrice], [:grouped_with_prorated_minimum, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithProratedMinimumPrice], [:grouped_with_metered_minimum, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedWithMeteredMinimumPrice], [:matrix_with_display_name, Orb::Models::NewFloatingPriceModel::NewFloatingMatrixWithDisplayNamePrice], [:bulk_with_proration, Orb::Models::NewFloatingPriceModel::NewFloatingBulkWithProrationPrice], [:grouped_tiered_package, Orb::Models::NewFloatingPriceModel::NewFloatingGroupedTieredPackagePrice], [:scalable_matrix_with_unit_pricing, Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithUnitPricingPrice], [:scalable_matrix_with_tiered_pricing, Orb::Models::NewFloatingPriceModel::NewFloatingScalableMatrixWithTieredPricingPrice], [:cumulative_grouped_bulk, Orb::Models::NewFloatingPriceModel::NewFloatingCumulativeGroupedBulkPrice]] - end - end -end diff --git a/sig/orb/models/new_reporting_configuration_model.rbs b/sig/orb/models/new_reporting_configuration_model.rbs deleted file mode 100644 index 3b49aca0..00000000 --- a/sig/orb/models/new_reporting_configuration_model.rbs +++ /dev/null @@ -1,17 +0,0 @@ -module Orb - module Models - type new_reporting_configuration_model = { exempt: bool } - - class NewReportingConfigurationModel < Orb::BaseModel - attr_accessor exempt: bool - - def initialize: - (exempt: bool) -> void - | ( - ?Orb::Models::new_reporting_configuration_model | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::new_reporting_configuration_model - end - end -end diff --git a/sig/orb/models/new_subscription_price_model.rbs b/sig/orb/models/new_subscription_price_model.rbs deleted file mode 100644 index 502fd1f1..00000000 --- a/sig/orb/models/new_subscription_price_model.rbs +++ /dev/null @@ -1,2384 +0,0 @@ -module Orb - module Models - type new_subscription_price_model = - Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice - | Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice - - class NewSubscriptionPriceModel < Orb::Union - type new_subscription_unit_price = - { - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice::cadence, - item_id: String, - model_type: :unit, - name: String, - unit_config: Orb::Models::UnitConfigModel, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionUnitPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :unit - - attr_accessor name: String - - attr_accessor unit_config: Orb::Models::UnitConfigModel - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice::cadence, - item_id: String, - name: String, - unit_config: Orb::Models::UnitConfigModel, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :unit - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_unit_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_unit_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice::cadence] - end - end - - type new_subscription_package_price = - { - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice::cadence, - item_id: String, - model_type: :package, - name: String, - package_config: Orb::Models::PackageConfigModel, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionPackagePrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :package - - attr_accessor name: String - - attr_accessor package_config: Orb::Models::PackageConfigModel - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice::cadence, - item_id: String, - name: String, - package_config: Orb::Models::PackageConfigModel, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :package - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_package_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_package_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice::cadence] - end - end - - type new_subscription_matrix_price = - { - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice::cadence, - item_id: String, - matrix_config: Orb::Models::MatrixConfigModel, - model_type: :matrix, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionMatrixPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice::cadence - - attr_accessor item_id: String - - attr_accessor matrix_config: Orb::Models::MatrixConfigModel - - attr_accessor model_type: :matrix - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice::cadence, - item_id: String, - matrix_config: Orb::Models::MatrixConfigModel, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :matrix - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_matrix_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_matrix_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice::cadence] - end - end - - type new_subscription_tiered_price = - { - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice::cadence, - item_id: String, - model_type: :tiered, - name: String, - tiered_config: Orb::Models::TieredConfigModel, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionTieredPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :tiered - - attr_accessor name: String - - attr_accessor tiered_config: Orb::Models::TieredConfigModel - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice::cadence, - item_id: String, - name: String, - tiered_config: Orb::Models::TieredConfigModel, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :tiered - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_tiered_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_tiered_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice::cadence] - end - end - - type new_subscription_tiered_bps_price = - { - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice::cadence, - item_id: String, - model_type: :tiered_bps, - name: String, - tiered_bps_config: Orb::Models::TieredBpsConfigModel, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionTieredBpsPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :tiered_bps - - attr_accessor name: String - - attr_accessor tiered_bps_config: Orb::Models::TieredBpsConfigModel - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice::cadence, - item_id: String, - name: String, - tiered_bps_config: Orb::Models::TieredBpsConfigModel, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :tiered_bps - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_tiered_bps_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_tiered_bps_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice::cadence] - end - end - - type new_subscription_bps_price = - { - bps_config: Orb::Models::BpsConfigModel, - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice::cadence, - item_id: String, - model_type: :bps, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionBpsPrice < Orb::BaseModel - attr_accessor bps_config: Orb::Models::BpsConfigModel - - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :bps - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - bps_config: Orb::Models::BpsConfigModel, - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice::cadence, - item_id: String, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :bps - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_bps_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_bps_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice::cadence] - end - end - - type new_subscription_bulk_bps_price = - { - bulk_bps_config: Orb::Models::BulkBpsConfigModel, - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice::cadence, - item_id: String, - model_type: :bulk_bps, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionBulkBpsPrice < Orb::BaseModel - attr_accessor bulk_bps_config: Orb::Models::BulkBpsConfigModel - - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :bulk_bps - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - bulk_bps_config: Orb::Models::BulkBpsConfigModel, - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice::cadence, - item_id: String, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :bulk_bps - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_bulk_bps_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_bulk_bps_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice::cadence] - end - end - - type new_subscription_bulk_price = - { - bulk_config: Orb::Models::BulkConfigModel, - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice::cadence, - item_id: String, - model_type: :bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionBulkPrice < Orb::BaseModel - attr_accessor bulk_config: Orb::Models::BulkConfigModel - - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :bulk - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - bulk_config: Orb::Models::BulkConfigModel, - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice::cadence, - item_id: String, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :bulk - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_bulk_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_bulk_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice::cadence] - end - end - - type new_subscription_threshold_total_amount_price = - { - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice::cadence, - item_id: String, - model_type: :threshold_total_amount, - name: String, - threshold_total_amount_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionThresholdTotalAmountPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :threshold_total_amount - - attr_accessor name: String - - attr_accessor threshold_total_amount_config: Orb::Models::custom_rating_function_config_model - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice::cadence, - item_id: String, - name: String, - threshold_total_amount_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :threshold_total_amount - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_threshold_total_amount_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_threshold_total_amount_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice::cadence] - end - end - - type new_subscription_tiered_package_price = - { - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice::cadence, - item_id: String, - model_type: :tiered_package, - name: String, - tiered_package_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionTieredPackagePrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :tiered_package - - attr_accessor name: String - - attr_accessor tiered_package_config: Orb::Models::custom_rating_function_config_model - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice::cadence, - item_id: String, - name: String, - tiered_package_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :tiered_package - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_tiered_package_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_tiered_package_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice::cadence] - end - end - - type new_subscription_tiered_with_minimum_price = - { - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice::cadence, - item_id: String, - model_type: :tiered_with_minimum, - name: String, - tiered_with_minimum_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionTieredWithMinimumPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :tiered_with_minimum - - attr_accessor name: String - - attr_accessor tiered_with_minimum_config: Orb::Models::custom_rating_function_config_model - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice::cadence, - item_id: String, - name: String, - tiered_with_minimum_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :tiered_with_minimum - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_tiered_with_minimum_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_tiered_with_minimum_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice::cadence] - end - end - - type new_subscription_unit_with_percent_price = - { - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice::cadence, - item_id: String, - model_type: :unit_with_percent, - name: String, - unit_with_percent_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionUnitWithPercentPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :unit_with_percent - - attr_accessor name: String - - attr_accessor unit_with_percent_config: Orb::Models::custom_rating_function_config_model - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice::cadence, - item_id: String, - name: String, - unit_with_percent_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :unit_with_percent - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_unit_with_percent_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_unit_with_percent_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice::cadence] - end - end - - type new_subscription_package_with_allocation_price = - { - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice::cadence, - item_id: String, - model_type: :package_with_allocation, - name: String, - package_with_allocation_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionPackageWithAllocationPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :package_with_allocation - - attr_accessor name: String - - attr_accessor package_with_allocation_config: Orb::Models::custom_rating_function_config_model - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice::cadence, - item_id: String, - name: String, - package_with_allocation_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :package_with_allocation - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_package_with_allocation_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_package_with_allocation_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice::cadence] - end - end - - type new_subscription_tier_with_proration_price = - { - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice::cadence, - item_id: String, - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionTierWithProrationPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :tiered_with_proration - - attr_accessor name: String - - attr_accessor tiered_with_proration_config: Orb::Models::custom_rating_function_config_model - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice::cadence, - item_id: String, - name: String, - tiered_with_proration_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :tiered_with_proration - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_tier_with_proration_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_tier_with_proration_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice::cadence] - end - end - - type new_subscription_unit_with_proration_price = - { - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice::cadence, - item_id: String, - model_type: :unit_with_proration, - name: String, - unit_with_proration_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionUnitWithProrationPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :unit_with_proration - - attr_accessor name: String - - attr_accessor unit_with_proration_config: Orb::Models::custom_rating_function_config_model - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice::cadence, - item_id: String, - name: String, - unit_with_proration_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :unit_with_proration - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_unit_with_proration_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_unit_with_proration_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice::cadence] - end - end - - type new_subscription_grouped_allocation_price = - { - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice::cadence, - grouped_allocation_config: Orb::Models::custom_rating_function_config_model, - item_id: String, - model_type: :grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionGroupedAllocationPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice::cadence - - attr_accessor grouped_allocation_config: Orb::Models::custom_rating_function_config_model - - attr_accessor item_id: String - - attr_accessor model_type: :grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice::cadence, - grouped_allocation_config: Orb::Models::custom_rating_function_config_model, - item_id: String, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :grouped_allocation - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_grouped_allocation_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_grouped_allocation_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice::cadence] - end - end - - type new_subscription_grouped_with_prorated_minimum_price = - { - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice::cadence, - grouped_with_prorated_minimum_config: Orb::Models::custom_rating_function_config_model, - item_id: String, - model_type: :grouped_with_prorated_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionGroupedWithProratedMinimumPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice::cadence - - attr_accessor grouped_with_prorated_minimum_config: Orb::Models::custom_rating_function_config_model - - attr_accessor item_id: String - - attr_accessor model_type: :grouped_with_prorated_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice::cadence, - grouped_with_prorated_minimum_config: Orb::Models::custom_rating_function_config_model, - item_id: String, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :grouped_with_prorated_minimum - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_grouped_with_prorated_minimum_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_grouped_with_prorated_minimum_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice::cadence] - end - end - - type new_subscription_bulk_with_proration_price = - { - bulk_with_proration_config: Orb::Models::custom_rating_function_config_model, - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice::cadence, - item_id: String, - model_type: :bulk_with_proration, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionBulkWithProrationPrice < Orb::BaseModel - attr_accessor bulk_with_proration_config: Orb::Models::custom_rating_function_config_model - - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :bulk_with_proration - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - bulk_with_proration_config: Orb::Models::custom_rating_function_config_model, - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice::cadence, - item_id: String, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :bulk_with_proration - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_bulk_with_proration_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_bulk_with_proration_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice::cadence] - end - end - - type new_subscription_scalable_matrix_with_unit_pricing_price = - { - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice::cadence, - item_id: String, - model_type: :scalable_matrix_with_unit_pricing, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionScalableMatrixWithUnitPricingPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :scalable_matrix_with_unit_pricing - - attr_accessor name: String - - attr_accessor scalable_matrix_with_unit_pricing_config: Orb::Models::custom_rating_function_config_model - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice::cadence, - item_id: String, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :scalable_matrix_with_unit_pricing - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_scalable_matrix_with_unit_pricing_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_scalable_matrix_with_unit_pricing_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice::cadence] - end - end - - type new_subscription_scalable_matrix_with_tiered_pricing_price = - { - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice::cadence, - item_id: String, - model_type: :scalable_matrix_with_tiered_pricing, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionScalableMatrixWithTieredPricingPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :scalable_matrix_with_tiered_pricing - - attr_accessor name: String - - attr_accessor scalable_matrix_with_tiered_pricing_config: Orb::Models::custom_rating_function_config_model - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice::cadence, - item_id: String, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Models::custom_rating_function_config_model, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :scalable_matrix_with_tiered_pricing - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_scalable_matrix_with_tiered_pricing_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_scalable_matrix_with_tiered_pricing_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice::cadence] - end - end - - type new_subscription_cumulative_grouped_bulk_price = - { - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice::cadence, - cumulative_grouped_bulk_config: Orb::Models::custom_rating_function_config_model, - item_id: String, - model_type: :cumulative_grouped_bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionCumulativeGroupedBulkPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice::cadence - - attr_accessor cumulative_grouped_bulk_config: Orb::Models::custom_rating_function_config_model - - attr_accessor item_id: String - - attr_accessor model_type: :cumulative_grouped_bulk - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice::cadence, - cumulative_grouped_bulk_config: Orb::Models::custom_rating_function_config_model, - item_id: String, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :cumulative_grouped_bulk - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_cumulative_grouped_bulk_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_cumulative_grouped_bulk_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice::cadence] - end - end - - type new_subscription_max_group_tiered_package_price = - { - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice::cadence, - item_id: String, - max_group_tiered_package_config: Orb::Models::custom_rating_function_config_model, - model_type: :max_group_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionMaxGroupTieredPackagePrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice::cadence - - attr_accessor item_id: String - - attr_accessor max_group_tiered_package_config: Orb::Models::custom_rating_function_config_model - - attr_accessor model_type: :max_group_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice::cadence, - item_id: String, - max_group_tiered_package_config: Orb::Models::custom_rating_function_config_model, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :max_group_tiered_package - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_max_group_tiered_package_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_max_group_tiered_package_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice::cadence] - end - end - - type new_subscription_grouped_with_metered_minimum_price = - { - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice::cadence, - grouped_with_metered_minimum_config: Orb::Models::custom_rating_function_config_model, - item_id: String, - model_type: :grouped_with_metered_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionGroupedWithMeteredMinimumPrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice::cadence - - attr_accessor grouped_with_metered_minimum_config: Orb::Models::custom_rating_function_config_model - - attr_accessor item_id: String - - attr_accessor model_type: :grouped_with_metered_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice::cadence, - grouped_with_metered_minimum_config: Orb::Models::custom_rating_function_config_model, - item_id: String, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :grouped_with_metered_minimum - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_grouped_with_metered_minimum_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_grouped_with_metered_minimum_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice::cadence] - end - end - - type new_subscription_matrix_with_display_name_price = - { - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice::cadence, - item_id: String, - matrix_with_display_name_config: Orb::Models::custom_rating_function_config_model, - model_type: :matrix_with_display_name, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionMatrixWithDisplayNamePrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice::cadence - - attr_accessor item_id: String - - attr_accessor matrix_with_display_name_config: Orb::Models::custom_rating_function_config_model - - attr_accessor model_type: :matrix_with_display_name - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice::cadence, - item_id: String, - matrix_with_display_name_config: Orb::Models::custom_rating_function_config_model, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :matrix_with_display_name - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_matrix_with_display_name_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_matrix_with_display_name_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice::cadence] - end - end - - type new_subscription_grouped_tiered_package_price = - { - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice::cadence, - grouped_tiered_package_config: Orb::Models::custom_rating_function_config_model, - item_id: String, - model_type: :grouped_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class NewSubscriptionGroupedTieredPackagePrice < Orb::BaseModel - attr_accessor cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice::cadence - - attr_accessor grouped_tiered_package_config: Orb::Models::custom_rating_function_config_model - - attr_accessor item_id: String - - attr_accessor model_type: :grouped_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor conversion_rate: Float? - - attr_accessor currency: String? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: - ( - cadence: Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice::cadence, - grouped_tiered_package_config: Orb::Models::custom_rating_function_config_model, - item_id: String, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - conversion_rate: Float?, - currency: String?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String?, - model_type: :grouped_tiered_package - ) -> void - | ( - ?Orb::Models::NewSubscriptionPriceModel::new_subscription_grouped_tiered_package_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewSubscriptionPriceModel::new_subscription_grouped_tiered_package_price - - type cadence = - :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - - class Cadence < Orb::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice::cadence] - end - end - - private def self.variants: -> [[:unit, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitPrice], [:package, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackagePrice], [:matrix, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixPrice], [:tiered, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPrice], [:tiered_bps, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredBpsPrice], [:bps, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBpsPrice], [:bulk_bps, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkBpsPrice], [:bulk, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkPrice], [:threshold_total_amount, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionThresholdTotalAmountPrice], [:tiered_package, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredPackagePrice], [:tiered_with_minimum, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTieredWithMinimumPrice], [:unit_with_percent, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithPercentPrice], [:package_with_allocation, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionPackageWithAllocationPrice], [:tiered_with_proration, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionTierWithProrationPrice], [:unit_with_proration, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionUnitWithProrationPrice], [:grouped_allocation, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedAllocationPrice], [:grouped_with_prorated_minimum, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithProratedMinimumPrice], [:bulk_with_proration, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionBulkWithProrationPrice], [:scalable_matrix_with_unit_pricing, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithUnitPricingPrice], [:scalable_matrix_with_tiered_pricing, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionScalableMatrixWithTieredPricingPrice], [:cumulative_grouped_bulk, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionCumulativeGroupedBulkPrice], [:max_group_tiered_package, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMaxGroupTieredPackagePrice], [:grouped_with_metered_minimum, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedWithMeteredMinimumPrice], [:matrix_with_display_name, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionMatrixWithDisplayNamePrice], [:grouped_tiered_package, Orb::Models::NewSubscriptionPriceModel::NewSubscriptionGroupedTieredPackagePrice]] - end - end -end diff --git a/sig/orb/models/new_tax_configuration_model.rbs b/sig/orb/models/new_tax_configuration_model.rbs deleted file mode 100644 index d6e7f658..00000000 --- a/sig/orb/models/new_tax_configuration_model.rbs +++ /dev/null @@ -1,57 +0,0 @@ -module Orb - module Models - type new_tax_configuration_model = - Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration - | Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration - - class NewTaxConfigurationModel < Orb::Union - type new_avalara_tax_configuration = - { - tax_exempt: bool, - tax_provider: :avalara, - tax_exemption_code: String? - } - - class NewAvalaraTaxConfiguration < Orb::BaseModel - attr_accessor tax_exempt: bool - - attr_accessor tax_provider: :avalara - - attr_accessor tax_exemption_code: String? - - def initialize: - ( - tax_exempt: bool, - tax_exemption_code: String?, - tax_provider: :avalara - ) -> void - | ( - ?Orb::Models::NewTaxConfigurationModel::new_avalara_tax_configuration - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewTaxConfigurationModel::new_avalara_tax_configuration - end - - type new_tax_jar_configuration = - { tax_exempt: bool, tax_provider: :taxjar } - - class NewTaxJarConfiguration < Orb::BaseModel - attr_accessor tax_exempt: bool - - attr_accessor tax_provider: :taxjar - - def initialize: - (tax_exempt: bool, tax_provider: :taxjar) -> void - | ( - ?Orb::Models::NewTaxConfigurationModel::new_tax_jar_configuration - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::NewTaxConfigurationModel::new_tax_jar_configuration - end - - private def self.variants: -> [[:avalara, Orb::Models::NewTaxConfigurationModel::NewAvalaraTaxConfiguration], [:taxjar, Orb::Models::NewTaxConfigurationModel::NewTaxJarConfiguration]] - end - end -end diff --git a/sig/orb/models/package_config_model.rbs b/sig/orb/models/package_config_model.rbs deleted file mode 100644 index 319a8b97..00000000 --- a/sig/orb/models/package_config_model.rbs +++ /dev/null @@ -1,18 +0,0 @@ -module Orb - module Models - type package_config_model = - { package_amount: String, package_size: Integer } - - class PackageConfigModel < Orb::BaseModel - attr_accessor package_amount: String - - attr_accessor package_size: Integer - - def initialize: - (package_amount: String, package_size: Integer) -> void - | (?Orb::Models::package_config_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::package_config_model - end - end -end diff --git a/sig/orb/models/pagination_metadata_model.rbs b/sig/orb/models/pagination_metadata_model.rbs deleted file mode 100644 index 3c7745c7..00000000 --- a/sig/orb/models/pagination_metadata_model.rbs +++ /dev/null @@ -1,19 +0,0 @@ -module Orb - module Models - type pagination_metadata_model = { has_more: bool, next_cursor: String? } - - class PaginationMetadataModel < Orb::BaseModel - attr_accessor has_more: bool - - attr_accessor next_cursor: String? - - def initialize: - (has_more: bool, next_cursor: String?) -> void - | ( - ?Orb::Models::pagination_metadata_model | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::pagination_metadata_model - end - end -end diff --git a/sig/orb/models/payment_attempt_model.rbs b/sig/orb/models/payment_attempt_model.rbs deleted file mode 100644 index 3690654d..00000000 --- a/sig/orb/models/payment_attempt_model.rbs +++ /dev/null @@ -1,48 +0,0 @@ -module Orb - module Models - type payment_attempt_model = - { - id: String, - amount: String, - created_at: Time, - payment_provider: Orb::Models::PaymentAttemptModel::payment_provider?, - payment_provider_id: String?, - succeeded: bool - } - - class PaymentAttemptModel < Orb::BaseModel - attr_accessor id: String - - attr_accessor amount: String - - attr_accessor created_at: Time - - attr_accessor payment_provider: Orb::Models::PaymentAttemptModel::payment_provider? - - attr_accessor payment_provider_id: String? - - attr_accessor succeeded: bool - - def initialize: - ( - id: String, - amount: String, - created_at: Time, - payment_provider: Orb::Models::PaymentAttemptModel::payment_provider?, - payment_provider_id: String?, - succeeded: bool - ) -> void - | (?Orb::Models::payment_attempt_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::payment_attempt_model - - type payment_provider = :stripe - - class PaymentProvider < Orb::Enum - STRIPE: :stripe - - def self.values: -> ::Array[Orb::Models::PaymentAttemptModel::payment_provider] - end - end - end -end diff --git a/sig/orb/models/percentage_discount_interval_model.rbs b/sig/orb/models/percentage_discount_interval_model.rbs deleted file mode 100644 index 30b74eaf..00000000 --- a/sig/orb/models/percentage_discount_interval_model.rbs +++ /dev/null @@ -1,50 +0,0 @@ -module Orb - module Models - type percentage_discount_interval_model = - { - applies_to_price_ids: ::Array[String], - applies_to_price_interval_ids: ::Array[String], - discount_type: Orb::Models::PercentageDiscountIntervalModel::discount_type, - end_date: Time?, - percentage_discount: Float, - start_date: Time - } - - class PercentageDiscountIntervalModel < Orb::BaseModel - attr_accessor applies_to_price_ids: ::Array[String] - - attr_accessor applies_to_price_interval_ids: ::Array[String] - - attr_accessor discount_type: Orb::Models::PercentageDiscountIntervalModel::discount_type - - attr_accessor end_date: Time? - - attr_accessor percentage_discount: Float - - attr_accessor start_date: Time - - def initialize: - ( - applies_to_price_ids: ::Array[String], - applies_to_price_interval_ids: ::Array[String], - discount_type: Orb::Models::PercentageDiscountIntervalModel::discount_type, - end_date: Time?, - percentage_discount: Float, - start_date: Time - ) -> void - | ( - ?Orb::Models::percentage_discount_interval_model | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::percentage_discount_interval_model - - type discount_type = :percentage - - class DiscountType < Orb::Enum - PERCENTAGE: :percentage - - def self.values: -> ::Array[Orb::Models::PercentageDiscountIntervalModel::discount_type] - end - end - end -end diff --git a/sig/orb/models/percentage_discount_model.rbs b/sig/orb/models/percentage_discount_model.rbs deleted file mode 100644 index 907fadb0..00000000 --- a/sig/orb/models/percentage_discount_model.rbs +++ /dev/null @@ -1,42 +0,0 @@ -module Orb - module Models - type percentage_discount_model = - { - applies_to_price_ids: ::Array[String], - discount_type: Orb::Models::PercentageDiscountModel::discount_type, - percentage_discount: Float, - reason: String? - } - - class PercentageDiscountModel < Orb::BaseModel - attr_accessor applies_to_price_ids: ::Array[String] - - attr_accessor discount_type: Orb::Models::PercentageDiscountModel::discount_type - - attr_accessor percentage_discount: Float - - attr_accessor reason: String? - - def initialize: - ( - applies_to_price_ids: ::Array[String], - discount_type: Orb::Models::PercentageDiscountModel::discount_type, - percentage_discount: Float, - reason: String? - ) -> void - | ( - ?Orb::Models::percentage_discount_model | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::percentage_discount_model - - type discount_type = :percentage - - class DiscountType < Orb::Enum - PERCENTAGE: :percentage - - def self.values: -> ::Array[Orb::Models::PercentageDiscountModel::discount_type] - end - end - end -end diff --git a/sig/orb/models/plan.rbs b/sig/orb/models/plan.rbs index d255cfb3..c624a14c 100644 --- a/sig/orb/models/plan.rbs +++ b/sig/orb/models/plan.rbs @@ -3,8 +3,8 @@ module Orb type plan = { id: String, - adjustments: ::Array[Orb::Models::adjustment_model], - base_plan: Orb::Models::PlanMinifiedModel?, + adjustments: ::Array[Orb::Models::Plan::adjustment], + base_plan: Orb::Models::Plan::BasePlan?, base_plan_id: String?, created_at: Time, currency: String, @@ -13,15 +13,15 @@ module Orb discount: Orb::Models::discount?, external_plan_id: String?, invoicing_currency: String, - maximum: Orb::Models::MaximumModel?, + maximum: Orb::Models::Plan::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Plan::Minimum?, minimum_amount: String?, name: String, net_terms: Integer?, plan_phases: ::Array[Orb::Models::Plan::PlanPhase]?, - prices: ::Array[Orb::Models::price_model], + prices: ::Array[Orb::Models::price], product: Orb::Models::Plan::Product, status: Orb::Models::Plan::status, trial_config: Orb::Models::Plan::TrialConfig, @@ -31,9 +31,9 @@ module Orb class Plan < Orb::BaseModel attr_accessor id: String - attr_accessor adjustments: ::Array[Orb::Models::adjustment_model] + attr_accessor adjustments: ::Array[Orb::Models::Plan::adjustment] - attr_accessor base_plan: Orb::Models::PlanMinifiedModel? + attr_accessor base_plan: Orb::Models::Plan::BasePlan? attr_accessor base_plan_id: String? @@ -51,13 +51,13 @@ module Orb attr_accessor invoicing_currency: String - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Plan::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Plan::Minimum? attr_accessor minimum_amount: String? @@ -67,7 +67,7 @@ module Orb attr_accessor plan_phases: ::Array[Orb::Models::Plan::PlanPhase]? - attr_accessor prices: ::Array[Orb::Models::price_model] + attr_accessor prices: ::Array[Orb::Models::price] attr_accessor product: Orb::Models::Plan::Product @@ -80,8 +80,8 @@ module Orb def initialize: ( id: String, - adjustments: ::Array[Orb::Models::adjustment_model], - base_plan: Orb::Models::PlanMinifiedModel?, + adjustments: ::Array[Orb::Models::Plan::adjustment], + base_plan: Orb::Models::Plan::BasePlan?, base_plan_id: String?, created_at: Time, currency: String, @@ -90,15 +90,15 @@ module Orb discount: Orb::Models::discount?, external_plan_id: String?, invoicing_currency: String, - maximum: Orb::Models::MaximumModel?, + maximum: Orb::Models::Plan::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Plan::Minimum?, minimum_amount: String?, name: String, net_terms: Integer?, plan_phases: ::Array[Orb::Models::Plan::PlanPhase]?, - prices: ::Array[Orb::Models::price_model], + prices: ::Array[Orb::Models::price], product: Orb::Models::Plan::Product, status: Orb::Models::Plan::status, trial_config: Orb::Models::Plan::TrialConfig, @@ -108,6 +108,293 @@ module Orb def to_hash: -> Orb::Models::plan + type adjustment = + Orb::Models::Plan::Adjustment::PlanPhaseUsageDiscountAdjustment + | Orb::Models::Plan::Adjustment::PlanPhaseAmountDiscountAdjustment + | Orb::Models::Plan::Adjustment::PlanPhasePercentageDiscountAdjustment + | Orb::Models::Plan::Adjustment::PlanPhaseMinimumAdjustment + | Orb::Models::Plan::Adjustment::PlanPhaseMaximumAdjustment + + class Adjustment < Orb::Union + type plan_phase_usage_discount_adjustment = + { + id: String, + adjustment_type: :usage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float + } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :usage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + attr_accessor usage_discount: Float + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float, + adjustment_type: :usage_discount + ) -> void + | ( + ?Orb::Models::Plan::Adjustment::plan_phase_usage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Plan::Adjustment::plan_phase_usage_discount_adjustment + end + + type plan_phase_amount_discount_adjustment = + { + id: String, + adjustment_type: :amount_discount, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :amount_discount + + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :amount_discount + ) -> void + | ( + ?Orb::Models::Plan::Adjustment::plan_phase_amount_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Plan::Adjustment::plan_phase_amount_discount_adjustment + end + + type plan_phase_percentage_discount_adjustment = + { + id: String, + adjustment_type: :percentage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :percentage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor percentage_discount: Float + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :percentage_discount + ) -> void + | ( + ?Orb::Models::Plan::Adjustment::plan_phase_percentage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Plan::Adjustment::plan_phase_percentage_discount_adjustment + end + + type plan_phase_minimum_adjustment = + { + id: String, + adjustment_type: :minimum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :minimum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor item_id: String + + attr_accessor minimum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :minimum + ) -> void + | ( + ?Orb::Models::Plan::Adjustment::plan_phase_minimum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Plan::Adjustment::plan_phase_minimum_adjustment + end + + type plan_phase_maximum_adjustment = + { + id: String, + adjustment_type: :maximum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :maximum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor maximum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :maximum + ) -> void + | ( + ?Orb::Models::Plan::Adjustment::plan_phase_maximum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Plan::Adjustment::plan_phase_maximum_adjustment + end + + private def self.variants: -> [[:usage_discount, Orb::Models::Plan::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::Plan::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::Plan::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::Plan::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::Plan::Adjustment::PlanPhaseMaximumAdjustment]] + end + + type base_plan = { id: String?, external_plan_id: String?, name: String? } + + class BasePlan < Orb::BaseModel + attr_accessor id: String? + + attr_accessor external_plan_id: String? + + attr_accessor name: String? + + def initialize: + (id: String?, external_plan_id: String?, name: String?) -> void + | (?Orb::Models::Plan::base_plan | Orb::BaseModel data) -> void + + def to_hash: -> Orb::Models::Plan::base_plan + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | (?Orb::Models::Plan::maximum | Orb::BaseModel data) -> void + + def to_hash: -> Orb::Models::Plan::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | (?Orb::Models::Plan::minimum | Orb::BaseModel data) -> void + + def to_hash: -> Orb::Models::Plan::minimum + end + type plan_phase = { id: String, @@ -115,9 +402,9 @@ module Orb discount: Orb::Models::discount?, duration: Integer?, duration_unit: Orb::Models::Plan::PlanPhase::duration_unit?, - maximum: Orb::Models::MaximumModel?, + maximum: Orb::Models::Plan::PlanPhase::Maximum?, maximum_amount: String?, - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Plan::PlanPhase::Minimum?, minimum_amount: String?, name: String, order: Integer @@ -134,11 +421,11 @@ module Orb attr_accessor duration_unit: Orb::Models::Plan::PlanPhase::duration_unit? - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Plan::PlanPhase::Maximum? attr_accessor maximum_amount: String? - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Plan::PlanPhase::Minimum? attr_accessor minimum_amount: String? @@ -153,9 +440,9 @@ module Orb discount: Orb::Models::discount?, duration: Integer?, duration_unit: Orb::Models::Plan::PlanPhase::duration_unit?, - maximum: Orb::Models::MaximumModel?, + maximum: Orb::Models::Plan::PlanPhase::Maximum?, maximum_amount: String?, - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Plan::PlanPhase::Minimum?, minimum_amount: String?, name: String, order: Integer @@ -176,6 +463,46 @@ module Orb def self.values: -> ::Array[Orb::Models::Plan::PlanPhase::duration_unit] end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Plan::PlanPhase::maximum | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Plan::PlanPhase::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Plan::PlanPhase::minimum | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Plan::PlanPhase::minimum + end end type product = { id: String, created_at: Time, name: String } diff --git a/sig/orb/models/plan_create_params.rbs b/sig/orb/models/plan_create_params.rbs index e3ca1895..1ff7e5e7 100644 --- a/sig/orb/models/plan_create_params.rbs +++ b/sig/orb/models/plan_create_params.rbs @@ -87,16 +87,16 @@ module Orb item_id: String, model_type: :unit, name: String, - unit_config: Orb::Models::UnitConfigModel, + unit_config: Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::UnitConfig, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } @@ -109,13 +109,13 @@ module Orb attr_accessor name: String - attr_accessor unit_config: Orb::Models::UnitConfigModel + attr_accessor unit_config: Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::UnitConfig attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -127,7 +127,7 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? @@ -136,16 +136,16 @@ module Orb cadence: Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::cadence, item_id: String, name: String, - unit_config: Orb::Models::UnitConfigModel, + unit_config: Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::UnitConfig, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :unit ) -> void @@ -169,6 +169,87 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::cadence] end + + type unit_config = { unit_amount: String } + + class UnitConfig < Orb::BaseModel + attr_accessor unit_amount: String + + def initialize: + (unit_amount: String) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::unit_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::unit_config + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_package_price = @@ -177,16 +258,16 @@ module Orb item_id: String, model_type: :package, name: String, - package_config: Orb::Models::PackageConfigModel, + package_config: Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::PackageConfig, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } @@ -199,13 +280,13 @@ module Orb attr_accessor name: String - attr_accessor package_config: Orb::Models::PackageConfigModel + attr_accessor package_config: Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::PackageConfig attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -217,7 +298,7 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? @@ -226,16 +307,16 @@ module Orb cadence: Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::cadence, item_id: String, name: String, - package_config: Orb::Models::PackageConfigModel, + package_config: Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::PackageConfig, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :package ) -> void @@ -259,24 +340,108 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::cadence] end + + type package_config = + { package_amount: String, package_size: Integer } + + class PackageConfig < Orb::BaseModel + attr_accessor package_amount: String + + attr_accessor package_size: Integer + + def initialize: + (package_amount: String, package_size: Integer) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::package_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::package_config + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_matrix_price = { cadence: Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::cadence, item_id: String, - matrix_config: Orb::Models::MatrixConfigModel, + matrix_config: Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig, model_type: :matrix, name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } @@ -285,7 +450,7 @@ module Orb attr_accessor item_id: String - attr_accessor matrix_config: Orb::Models::MatrixConfigModel + attr_accessor matrix_config: Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig attr_accessor model_type: :matrix @@ -295,7 +460,7 @@ module Orb attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -307,7 +472,7 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? @@ -315,17 +480,17 @@ module Orb ( cadence: Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::cadence, item_id: String, - matrix_config: Orb::Models::MatrixConfigModel, + matrix_config: Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig, name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :matrix ) -> void @@ -349,6 +514,121 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::cadence] end + + type matrix_config = + { + default_unit_amount: String, + dimensions: ::Array[String?], + matrix_values: ::Array[Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig::MatrixValue] + } + + class MatrixConfig < Orb::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor matrix_values: ::Array[Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig::MatrixValue] + + def initialize: + ( + default_unit_amount: String, + dimensions: ::Array[String?], + matrix_values: ::Array[Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig::MatrixValue] + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::matrix_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::matrix_config + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: + ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig::matrix_value + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig::matrix_value + end + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_tiered_price = @@ -357,16 +637,16 @@ module Orb item_id: String, model_type: :tiered, name: String, - tiered_config: Orb::Models::TieredConfigModel, + tiered_config: Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::TieredConfig, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } @@ -379,13 +659,13 @@ module Orb attr_accessor name: String - attr_accessor tiered_config: Orb::Models::TieredConfigModel + attr_accessor tiered_config: Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::TieredConfig attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -397,7 +677,7 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? @@ -406,16 +686,16 @@ module Orb cadence: Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::cadence, item_id: String, name: String, - tiered_config: Orb::Models::TieredConfigModel, + tiered_config: Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::TieredConfig, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :tiered ) -> void @@ -439,6 +719,116 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::cadence] end + + type tiered_config = + { + tiers: ::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::TieredConfig::Tier] + } + + class TieredConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::TieredConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::TieredConfig::Tier] + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::tiered_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::tiered_config + + type tier = + { first_unit: Float, unit_amount: String, last_unit: Float? } + + class Tier < Orb::BaseModel + attr_accessor first_unit: Float + + attr_accessor unit_amount: String + + attr_accessor last_unit: Float? + + def initialize: + ( + first_unit: Float, + unit_amount: String, + last_unit: Float? + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::TieredConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::TieredConfig::tier + end + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_tiered_bps_price = @@ -447,16 +837,16 @@ module Orb item_id: String, model_type: :tiered_bps, name: String, - tiered_bps_config: Orb::Models::TieredBpsConfigModel, + tiered_bps_config: Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::TieredBpsConfig, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } @@ -469,13 +859,13 @@ module Orb attr_accessor name: String - attr_accessor tiered_bps_config: Orb::Models::TieredBpsConfigModel + attr_accessor tiered_bps_config: Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::TieredBpsConfig attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -487,7 +877,7 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? @@ -496,16 +886,16 @@ module Orb cadence: Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::cadence, item_id: String, name: String, - tiered_bps_config: Orb::Models::TieredBpsConfigModel, + tiered_bps_config: Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::TieredBpsConfig, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :tiered_bps ) -> void @@ -529,29 +919,147 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::cadence] end + + type tiered_bps_config = + { + tiers: ::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::TieredBpsConfig::Tier] + } + + class TieredBpsConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::TieredBpsConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::TieredBpsConfig::Tier] + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::tiered_bps_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::tiered_bps_config + + type tier = + { + bps: Float, + minimum_amount: String, + maximum_amount: String?, + per_unit_maximum: String? + } + + class Tier < Orb::BaseModel + attr_accessor bps: Float + + attr_accessor minimum_amount: String + + attr_accessor maximum_amount: String? + + attr_accessor per_unit_maximum: String? + + def initialize: + ( + bps: Float, + minimum_amount: String, + maximum_amount: String?, + per_unit_maximum: String? + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::TieredBpsConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::TieredBpsConfig::tier + end + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_bps_price = { - bps_config: Orb::Models::BpsConfigModel, + bps_config: Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BpsConfig, cadence: Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::cadence, item_id: String, model_type: :bps, name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } class NewPlanBpsPrice < Orb::BaseModel - attr_accessor bps_config: Orb::Models::BpsConfigModel + attr_accessor bps_config: Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BpsConfig attr_accessor cadence: Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::cadence @@ -565,7 +1073,7 @@ module Orb attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -577,25 +1085,25 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( - bps_config: Orb::Models::BpsConfigModel, + bps_config: Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BpsConfig, cadence: Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::cadence, item_id: String, name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :bps ) -> void @@ -606,6 +1114,23 @@ module Orb def to_hash: -> Orb::Models::PlanCreateParams::Price::new_plan_bps_price + type bps_config = { bps: Float, per_unit_maximum: String? } + + class BpsConfig < Orb::BaseModel + attr_accessor bps: Float + + attr_accessor per_unit_maximum: String? + + def initialize: + (bps: Float, per_unit_maximum: String?) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::bps_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::bps_config + end + type cadence = :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom @@ -619,29 +1144,95 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::cadence] end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_bulk_bps_price = { - bulk_bps_config: Orb::Models::BulkBpsConfigModel, + bulk_bps_config: Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig, cadence: Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::cadence, item_id: String, model_type: :bulk_bps, name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } class NewPlanBulkBpsPrice < Orb::BaseModel - attr_accessor bulk_bps_config: Orb::Models::BulkBpsConfigModel + attr_accessor bulk_bps_config: Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig attr_accessor cadence: Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::cadence @@ -655,7 +1246,7 @@ module Orb attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -667,25 +1258,25 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( - bulk_bps_config: Orb::Models::BulkBpsConfigModel, + bulk_bps_config: Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig, cadence: Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::cadence, item_id: String, name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :bulk_bps ) -> void @@ -696,6 +1287,50 @@ module Orb def to_hash: -> Orb::Models::PlanCreateParams::Price::new_plan_bulk_bps_price + type bulk_bps_config = + { + tiers: ::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig::Tier] + } + + class BulkBpsConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig::Tier] + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::bulk_bps_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::bulk_bps_config + + type tier = + { bps: Float, maximum_amount: String?, per_unit_maximum: String? } + + class Tier < Orb::BaseModel + attr_accessor bps: Float + + attr_accessor maximum_amount: String? + + attr_accessor per_unit_maximum: String? + + def initialize: + ( + bps: Float, + maximum_amount: String?, + per_unit_maximum: String? + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig::tier + end + end + type cadence = :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom @@ -709,29 +1344,95 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::cadence] end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_bulk_price = { - bulk_config: Orb::Models::BulkConfigModel, + bulk_config: Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig, cadence: Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::cadence, item_id: String, model_type: :bulk, name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } class NewPlanBulkPrice < Orb::BaseModel - attr_accessor bulk_config: Orb::Models::BulkConfigModel + attr_accessor bulk_config: Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig attr_accessor cadence: Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::cadence @@ -745,7 +1446,7 @@ module Orb attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -757,25 +1458,25 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( - bulk_config: Orb::Models::BulkConfigModel, + bulk_config: Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig, cadence: Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::cadence, item_id: String, name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :bulk ) -> void @@ -786,6 +1487,43 @@ module Orb def to_hash: -> Orb::Models::PlanCreateParams::Price::new_plan_bulk_price + type bulk_config = + { + tiers: ::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig::Tier] + } + + class BulkConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig::Tier] + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::bulk_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::bulk_config + + type tier = { unit_amount: String, maximum_units: Float? } + + class Tier < Orb::BaseModel + attr_accessor unit_amount: String + + attr_accessor maximum_units: Float? + + def initialize: + (unit_amount: String, maximum_units: Float?) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig::tier + end + end + type cadence = :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom @@ -799,6 +1537,72 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::cadence] end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_threshold_total_amount_price = @@ -807,16 +1611,16 @@ module Orb item_id: String, model_type: :threshold_total_amount, name: String, - threshold_total_amount_config: Orb::Models::custom_rating_function_config_model, + threshold_total_amount_config: ::Hash[Symbol, top], billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } @@ -829,13 +1633,13 @@ module Orb attr_accessor name: String - attr_accessor threshold_total_amount_config: Orb::Models::custom_rating_function_config_model + attr_accessor threshold_total_amount_config: ::Hash[Symbol, top] attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -847,7 +1651,7 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? @@ -856,16 +1660,16 @@ module Orb cadence: Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::cadence, item_id: String, name: String, - threshold_total_amount_config: Orb::Models::custom_rating_function_config_model, + threshold_total_amount_config: ::Hash[Symbol, top], billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :threshold_total_amount ) -> void @@ -889,6 +1693,72 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::cadence] end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_tiered_package_price = @@ -897,16 +1767,16 @@ module Orb item_id: String, model_type: :tiered_package, name: String, - tiered_package_config: Orb::Models::custom_rating_function_config_model, + tiered_package_config: ::Hash[Symbol, top], billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } @@ -919,13 +1789,13 @@ module Orb attr_accessor name: String - attr_accessor tiered_package_config: Orb::Models::custom_rating_function_config_model + attr_accessor tiered_package_config: ::Hash[Symbol, top] attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -937,7 +1807,7 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? @@ -946,16 +1816,16 @@ module Orb cadence: Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::cadence, item_id: String, name: String, - tiered_package_config: Orb::Models::custom_rating_function_config_model, + tiered_package_config: ::Hash[Symbol, top], billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :tiered_package ) -> void @@ -979,6 +1849,72 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::cadence] end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_tiered_with_minimum_price = @@ -987,16 +1923,16 @@ module Orb item_id: String, model_type: :tiered_with_minimum, name: String, - tiered_with_minimum_config: Orb::Models::custom_rating_function_config_model, + tiered_with_minimum_config: ::Hash[Symbol, top], billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } @@ -1009,13 +1945,13 @@ module Orb attr_accessor name: String - attr_accessor tiered_with_minimum_config: Orb::Models::custom_rating_function_config_model + attr_accessor tiered_with_minimum_config: ::Hash[Symbol, top] attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -1027,7 +1963,7 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? @@ -1036,16 +1972,16 @@ module Orb cadence: Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::cadence, item_id: String, name: String, - tiered_with_minimum_config: Orb::Models::custom_rating_function_config_model, + tiered_with_minimum_config: ::Hash[Symbol, top], billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :tiered_with_minimum ) -> void @@ -1069,6 +2005,72 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::cadence] end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_unit_with_percent_price = @@ -1077,16 +2079,16 @@ module Orb item_id: String, model_type: :unit_with_percent, name: String, - unit_with_percent_config: Orb::Models::custom_rating_function_config_model, + unit_with_percent_config: ::Hash[Symbol, top], billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } @@ -1099,13 +2101,13 @@ module Orb attr_accessor name: String - attr_accessor unit_with_percent_config: Orb::Models::custom_rating_function_config_model + attr_accessor unit_with_percent_config: ::Hash[Symbol, top] attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -1117,7 +2119,7 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? @@ -1126,16 +2128,16 @@ module Orb cadence: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::cadence, item_id: String, name: String, - unit_with_percent_config: Orb::Models::custom_rating_function_config_model, + unit_with_percent_config: ::Hash[Symbol, top], billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :unit_with_percent ) -> void @@ -1159,6 +2161,72 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::cadence] end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_package_with_allocation_price = @@ -1167,16 +2235,16 @@ module Orb item_id: String, model_type: :package_with_allocation, name: String, - package_with_allocation_config: Orb::Models::custom_rating_function_config_model, + package_with_allocation_config: ::Hash[Symbol, top], billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } @@ -1189,13 +2257,13 @@ module Orb attr_accessor name: String - attr_accessor package_with_allocation_config: Orb::Models::custom_rating_function_config_model + attr_accessor package_with_allocation_config: ::Hash[Symbol, top] attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -1207,7 +2275,7 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? @@ -1216,16 +2284,16 @@ module Orb cadence: Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::cadence, item_id: String, name: String, - package_with_allocation_config: Orb::Models::custom_rating_function_config_model, + package_with_allocation_config: ::Hash[Symbol, top], billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :package_with_allocation ) -> void @@ -1249,6 +2317,72 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::cadence] end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_tier_with_proration_price = @@ -1257,16 +2391,16 @@ module Orb item_id: String, model_type: :tiered_with_proration, name: String, - tiered_with_proration_config: Orb::Models::custom_rating_function_config_model, + tiered_with_proration_config: ::Hash[Symbol, top], billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } @@ -1279,13 +2413,13 @@ module Orb attr_accessor name: String - attr_accessor tiered_with_proration_config: Orb::Models::custom_rating_function_config_model + attr_accessor tiered_with_proration_config: ::Hash[Symbol, top] attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -1297,7 +2431,7 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? @@ -1306,16 +2440,16 @@ module Orb cadence: Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::cadence, item_id: String, name: String, - tiered_with_proration_config: Orb::Models::custom_rating_function_config_model, + tiered_with_proration_config: ::Hash[Symbol, top], billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :tiered_with_proration ) -> void @@ -1339,6 +2473,72 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::cadence] end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_unit_with_proration_price = @@ -1347,16 +2547,16 @@ module Orb item_id: String, model_type: :unit_with_proration, name: String, - unit_with_proration_config: Orb::Models::custom_rating_function_config_model, + unit_with_proration_config: ::Hash[Symbol, top], billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } @@ -1369,13 +2569,13 @@ module Orb attr_accessor name: String - attr_accessor unit_with_proration_config: Orb::Models::custom_rating_function_config_model + attr_accessor unit_with_proration_config: ::Hash[Symbol, top] attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -1387,7 +2587,7 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? @@ -1396,16 +2596,16 @@ module Orb cadence: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::cadence, item_id: String, name: String, - unit_with_proration_config: Orb::Models::custom_rating_function_config_model, + unit_with_proration_config: ::Hash[Symbol, top], billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :unit_with_proration ) -> void @@ -1429,31 +2629,97 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::cadence] end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_grouped_allocation_price = { cadence: Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::cadence, - grouped_allocation_config: Orb::Models::custom_rating_function_config_model, + grouped_allocation_config: ::Hash[Symbol, top], item_id: String, model_type: :grouped_allocation, name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } class NewPlanGroupedAllocationPrice < Orb::BaseModel attr_accessor cadence: Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::cadence - attr_accessor grouped_allocation_config: Orb::Models::custom_rating_function_config_model + attr_accessor grouped_allocation_config: ::Hash[Symbol, top] attr_accessor item_id: String @@ -1465,7 +2731,7 @@ module Orb attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -1477,25 +2743,25 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( cadence: Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::cadence, - grouped_allocation_config: Orb::Models::custom_rating_function_config_model, + grouped_allocation_config: ::Hash[Symbol, top], item_id: String, name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :grouped_allocation ) -> void @@ -1519,31 +2785,97 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::cadence] end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_grouped_with_prorated_minimum_price = { cadence: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::cadence, - grouped_with_prorated_minimum_config: Orb::Models::custom_rating_function_config_model, + grouped_with_prorated_minimum_config: ::Hash[Symbol, top], item_id: String, model_type: :grouped_with_prorated_minimum, name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } class NewPlanGroupedWithProratedMinimumPrice < Orb::BaseModel attr_accessor cadence: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::cadence - attr_accessor grouped_with_prorated_minimum_config: Orb::Models::custom_rating_function_config_model + attr_accessor grouped_with_prorated_minimum_config: ::Hash[Symbol, top] attr_accessor item_id: String @@ -1555,7 +2887,7 @@ module Orb attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -1567,25 +2899,25 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( cadence: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::cadence, - grouped_with_prorated_minimum_config: Orb::Models::custom_rating_function_config_model, + grouped_with_prorated_minimum_config: ::Hash[Symbol, top], item_id: String, name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :grouped_with_prorated_minimum ) -> void @@ -1609,31 +2941,97 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::cadence] end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_grouped_with_metered_minimum_price = { cadence: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::cadence, - grouped_with_metered_minimum_config: Orb::Models::custom_rating_function_config_model, + grouped_with_metered_minimum_config: ::Hash[Symbol, top], item_id: String, model_type: :grouped_with_metered_minimum, name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } class NewPlanGroupedWithMeteredMinimumPrice < Orb::BaseModel attr_accessor cadence: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::cadence - attr_accessor grouped_with_metered_minimum_config: Orb::Models::custom_rating_function_config_model + attr_accessor grouped_with_metered_minimum_config: ::Hash[Symbol, top] attr_accessor item_id: String @@ -1645,7 +3043,7 @@ module Orb attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -1657,25 +3055,25 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( cadence: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::cadence, - grouped_with_metered_minimum_config: Orb::Models::custom_rating_function_config_model, + grouped_with_metered_minimum_config: ::Hash[Symbol, top], item_id: String, name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :grouped_with_metered_minimum ) -> void @@ -1699,24 +3097,90 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::cadence] end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_matrix_with_display_name_price = { cadence: Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::cadence, item_id: String, - matrix_with_display_name_config: Orb::Models::custom_rating_function_config_model, + matrix_with_display_name_config: ::Hash[Symbol, top], model_type: :matrix_with_display_name, name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } @@ -1725,7 +3189,7 @@ module Orb attr_accessor item_id: String - attr_accessor matrix_with_display_name_config: Orb::Models::custom_rating_function_config_model + attr_accessor matrix_with_display_name_config: ::Hash[Symbol, top] attr_accessor model_type: :matrix_with_display_name @@ -1735,7 +3199,7 @@ module Orb attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -1747,7 +3211,7 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? @@ -1755,17 +3219,17 @@ module Orb ( cadence: Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::cadence, item_id: String, - matrix_with_display_name_config: Orb::Models::custom_rating_function_config_model, + matrix_with_display_name_config: ::Hash[Symbol, top], name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :matrix_with_display_name ) -> void @@ -1789,29 +3253,95 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::cadence] end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_bulk_with_proration_price = { - bulk_with_proration_config: Orb::Models::custom_rating_function_config_model, + bulk_with_proration_config: ::Hash[Symbol, top], cadence: Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::cadence, item_id: String, model_type: :bulk_with_proration, name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } class NewPlanBulkWithProrationPrice < Orb::BaseModel - attr_accessor bulk_with_proration_config: Orb::Models::custom_rating_function_config_model + attr_accessor bulk_with_proration_config: ::Hash[Symbol, top] attr_accessor cadence: Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::cadence @@ -1825,7 +3355,7 @@ module Orb attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -1837,25 +3367,25 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( - bulk_with_proration_config: Orb::Models::custom_rating_function_config_model, + bulk_with_proration_config: ::Hash[Symbol, top], cadence: Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::cadence, item_id: String, name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :bulk_with_proration ) -> void @@ -1879,31 +3409,97 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::cadence] end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_grouped_tiered_package_price = { cadence: Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::cadence, - grouped_tiered_package_config: Orb::Models::custom_rating_function_config_model, + grouped_tiered_package_config: ::Hash[Symbol, top], item_id: String, model_type: :grouped_tiered_package, name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } class NewPlanGroupedTieredPackagePrice < Orb::BaseModel attr_accessor cadence: Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::cadence - attr_accessor grouped_tiered_package_config: Orb::Models::custom_rating_function_config_model + attr_accessor grouped_tiered_package_config: ::Hash[Symbol, top] attr_accessor item_id: String @@ -1915,7 +3511,7 @@ module Orb attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -1927,25 +3523,25 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( cadence: Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::cadence, - grouped_tiered_package_config: Orb::Models::custom_rating_function_config_model, + grouped_tiered_package_config: ::Hash[Symbol, top], item_id: String, name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :grouped_tiered_package ) -> void @@ -1969,24 +3565,90 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::cadence] end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_max_group_tiered_package_price = { cadence: Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::cadence, item_id: String, - max_group_tiered_package_config: Orb::Models::custom_rating_function_config_model, + max_group_tiered_package_config: ::Hash[Symbol, top], model_type: :max_group_tiered_package, name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } @@ -1995,7 +3657,7 @@ module Orb attr_accessor item_id: String - attr_accessor max_group_tiered_package_config: Orb::Models::custom_rating_function_config_model + attr_accessor max_group_tiered_package_config: ::Hash[Symbol, top] attr_accessor model_type: :max_group_tiered_package @@ -2005,7 +3667,7 @@ module Orb attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -2017,7 +3679,7 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? @@ -2025,17 +3687,17 @@ module Orb ( cadence: Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::cadence, item_id: String, - max_group_tiered_package_config: Orb::Models::custom_rating_function_config_model, + max_group_tiered_package_config: ::Hash[Symbol, top], name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :max_group_tiered_package ) -> void @@ -2059,6 +3721,72 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::cadence] end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_scalable_matrix_with_unit_pricing_price = @@ -2067,16 +3795,16 @@ module Orb item_id: String, model_type: :scalable_matrix_with_unit_pricing, name: String, - scalable_matrix_with_unit_pricing_config: Orb::Models::custom_rating_function_config_model, + scalable_matrix_with_unit_pricing_config: ::Hash[Symbol, top], billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } @@ -2089,13 +3817,13 @@ module Orb attr_accessor name: String - attr_accessor scalable_matrix_with_unit_pricing_config: Orb::Models::custom_rating_function_config_model + attr_accessor scalable_matrix_with_unit_pricing_config: ::Hash[Symbol, top] attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -2107,7 +3835,7 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? @@ -2116,16 +3844,16 @@ module Orb cadence: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::cadence, item_id: String, name: String, - scalable_matrix_with_unit_pricing_config: Orb::Models::custom_rating_function_config_model, + scalable_matrix_with_unit_pricing_config: ::Hash[Symbol, top], billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :scalable_matrix_with_unit_pricing ) -> void @@ -2149,6 +3877,72 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::cadence] end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_scalable_matrix_with_tiered_pricing_price = @@ -2157,16 +3951,16 @@ module Orb item_id: String, model_type: :scalable_matrix_with_tiered_pricing, name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Models::custom_rating_function_config_model, + scalable_matrix_with_tiered_pricing_config: ::Hash[Symbol, top], billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } @@ -2179,13 +3973,13 @@ module Orb attr_accessor name: String - attr_accessor scalable_matrix_with_tiered_pricing_config: Orb::Models::custom_rating_function_config_model + attr_accessor scalable_matrix_with_tiered_pricing_config: ::Hash[Symbol, top] attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -2197,7 +3991,7 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? @@ -2206,16 +4000,16 @@ module Orb cadence: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::cadence, item_id: String, name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Models::custom_rating_function_config_model, + scalable_matrix_with_tiered_pricing_config: ::Hash[Symbol, top], billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :scalable_matrix_with_tiered_pricing ) -> void @@ -2239,31 +4033,97 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::cadence] end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::duration_unit] + end + end end type new_plan_cumulative_grouped_bulk_price = { cadence: Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::cadence, - cumulative_grouped_bulk_config: Orb::Models::custom_rating_function_config_model, + cumulative_grouped_bulk_config: ::Hash[Symbol, top], item_id: String, model_type: :cumulative_grouped_bulk, name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]? } class NewPlanCumulativeGroupedBulkPrice < Orb::BaseModel attr_accessor cadence: Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::cadence - attr_accessor cumulative_grouped_bulk_config: Orb::Models::custom_rating_function_config_model + attr_accessor cumulative_grouped_bulk_config: ::Hash[Symbol, top] attr_accessor item_id: String @@ -2275,7 +4135,7 @@ module Orb attr_accessor billed_in_advance: bool? - attr_accessor billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::BillingCycleConfiguration? attr_accessor conversion_rate: Float? @@ -2287,25 +4147,25 @@ module Orb attr_accessor invoice_grouping_key: String? - attr_accessor invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::InvoicingCycleConfiguration? attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( cadence: Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::cadence, - cumulative_grouped_bulk_config: Orb::Models::custom_rating_function_config_model, + cumulative_grouped_bulk_config: ::Hash[Symbol, top], item_id: String, name: String, billable_metric_id: String?, billed_in_advance: bool?, - billing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + billing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::BillingCycleConfiguration?, conversion_rate: Float?, currency: String?, external_price_id: String?, fixed_price_quantity: Float?, invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::Models::NewBillingCycleConfigurationModel?, + invoicing_cycle_configuration: Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::InvoicingCycleConfiguration?, metadata: ::Hash[Symbol, String?]?, model_type: :cumulative_grouped_bulk ) -> void @@ -2329,6 +4189,72 @@ module Orb def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::cadence] end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::duration_unit] + end + end end private def self.variants: -> [[:unit, Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice], [:package, Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice], [:matrix, Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice], [:tiered, Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice], [:tiered_bps, Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice], [:bps, Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice], [:bulk_bps, Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice], [:bulk, Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice], [:threshold_total_amount, Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice], [:tiered_package, Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice], [:tiered_with_minimum, Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice], [:unit_with_percent, Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice], [:package_with_allocation, Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice], [:tiered_with_proration, Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice], [:unit_with_proration, Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice], [:grouped_allocation, Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice], [:grouped_with_prorated_minimum, Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice], [:grouped_with_metered_minimum, Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice], [:matrix_with_display_name, Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice], [:bulk_with_proration, Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice], [:grouped_tiered_package, Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice], [:max_group_tiered_package, Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice], [:scalable_matrix_with_unit_pricing, Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice], [:scalable_matrix_with_tiered_pricing, Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice], [:cumulative_grouped_bulk, Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice]] diff --git a/sig/orb/models/plan_minified_model.rbs b/sig/orb/models/plan_minified_model.rbs deleted file mode 100644 index 5eeeff13..00000000 --- a/sig/orb/models/plan_minified_model.rbs +++ /dev/null @@ -1,20 +0,0 @@ -module Orb - module Models - type plan_minified_model = - { id: String?, external_plan_id: String?, name: String? } - - class PlanMinifiedModel < Orb::BaseModel - attr_accessor id: String? - - attr_accessor external_plan_id: String? - - attr_accessor name: String? - - def initialize: - (id: String?, external_plan_id: String?, name: String?) -> void - | (?Orb::Models::plan_minified_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::plan_minified_model - end - end -end diff --git a/sig/orb/models/plan_model.rbs b/sig/orb/models/plan_model.rbs deleted file mode 100644 index e67cb872..00000000 --- a/sig/orb/models/plan_model.rbs +++ /dev/null @@ -1,239 +0,0 @@ -module Orb - module Models - type plan_model = - { - id: String, - adjustments: ::Array[Orb::Models::adjustment_model], - base_plan: Orb::Models::PlanMinifiedModel?, - base_plan_id: String?, - created_at: Time, - currency: String, - default_invoice_memo: String?, - description: String, - discount: Orb::Models::discount?, - external_plan_id: String?, - invoicing_currency: String, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - net_terms: Integer?, - plan_phases: ::Array[Orb::Models::PlanModel::PlanPhase]?, - prices: ::Array[Orb::Models::price_model], - product: Orb::Models::PlanModel::Product, - status: Orb::Models::PlanModel::status, - trial_config: Orb::Models::PlanModel::TrialConfig, - version: Integer - } - - class PlanModel < Orb::BaseModel - attr_accessor id: String - - attr_accessor adjustments: ::Array[Orb::Models::adjustment_model] - - attr_accessor base_plan: Orb::Models::PlanMinifiedModel? - - attr_accessor base_plan_id: String? - - attr_accessor created_at: Time - - attr_accessor currency: String - - attr_accessor default_invoice_memo: String? - - attr_accessor description: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_plan_id: String? - - attr_accessor invoicing_currency: String - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor name: String - - attr_accessor net_terms: Integer? - - attr_accessor plan_phases: ::Array[Orb::Models::PlanModel::PlanPhase]? - - attr_accessor prices: ::Array[Orb::Models::price_model] - - attr_accessor product: Orb::Models::PlanModel::Product - - attr_accessor status: Orb::Models::PlanModel::status - - attr_accessor trial_config: Orb::Models::PlanModel::TrialConfig - - attr_accessor version: Integer - - def initialize: - ( - id: String, - adjustments: ::Array[Orb::Models::adjustment_model], - base_plan: Orb::Models::PlanMinifiedModel?, - base_plan_id: String?, - created_at: Time, - currency: String, - default_invoice_memo: String?, - description: String, - discount: Orb::Models::discount?, - external_plan_id: String?, - invoicing_currency: String, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - net_terms: Integer?, - plan_phases: ::Array[Orb::Models::PlanModel::PlanPhase]?, - prices: ::Array[Orb::Models::price_model], - product: Orb::Models::PlanModel::Product, - status: Orb::Models::PlanModel::status, - trial_config: Orb::Models::PlanModel::TrialConfig, - version: Integer - ) -> void - | (?Orb::Models::plan_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::plan_model - - type plan_phase = - { - id: String, - description: String?, - discount: Orb::Models::discount?, - duration: Integer?, - duration_unit: Orb::Models::PlanModel::PlanPhase::duration_unit?, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - order: Integer - } - - class PlanPhase < Orb::BaseModel - attr_accessor id: String - - attr_accessor description: String? - - attr_accessor discount: Orb::Models::discount? - - attr_accessor duration: Integer? - - attr_accessor duration_unit: Orb::Models::PlanModel::PlanPhase::duration_unit? - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor name: String - - attr_accessor order: Integer - - def initialize: - ( - id: String, - description: String?, - discount: Orb::Models::discount?, - duration: Integer?, - duration_unit: Orb::Models::PlanModel::PlanPhase::duration_unit?, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - order: Integer - ) -> void - | (?Orb::Models::PlanModel::plan_phase | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::PlanModel::plan_phase - - type duration_unit = - :daily | :monthly | :quarterly | :semi_annual | :annual - - class DurationUnit < Orb::Enum - DAILY: :daily - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - - def self.values: -> ::Array[Orb::Models::PlanModel::PlanPhase::duration_unit] - end - end - - type product = { id: String, created_at: Time, name: String } - - class Product < Orb::BaseModel - attr_accessor id: String - - attr_accessor created_at: Time - - attr_accessor name: String - - def initialize: - (id: String, created_at: Time, name: String) -> void - | (?Orb::Models::PlanModel::product | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::PlanModel::product - end - - type status = :active | :archived | :draft - - class Status < Orb::Enum - ACTIVE: :active - ARCHIVED: :archived - DRAFT: :draft - - def self.values: -> ::Array[Orb::Models::PlanModel::status] - end - - type trial_config = - { - trial_period: Integer?, - trial_period_unit: Orb::Models::PlanModel::TrialConfig::trial_period_unit - } - - class TrialConfig < Orb::BaseModel - attr_accessor trial_period: Integer? - - attr_accessor trial_period_unit: Orb::Models::PlanModel::TrialConfig::trial_period_unit - - def initialize: - ( - trial_period: Integer?, - trial_period_unit: Orb::Models::PlanModel::TrialConfig::trial_period_unit - ) -> void - | ( - ?Orb::Models::PlanModel::trial_config | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PlanModel::trial_config - - type trial_period_unit = :days - - class TrialPeriodUnit < Orb::Enum - DAYS: :days - - def self.values: -> ::Array[Orb::Models::PlanModel::TrialConfig::trial_period_unit] - end - end - end - end -end diff --git a/sig/orb/models/plan_update_params.rbs b/sig/orb/models/plan_update_params.rbs index dc7e9421..0e7a5172 100644 --- a/sig/orb/models/plan_update_params.rbs +++ b/sig/orb/models/plan_update_params.rbs @@ -1,13 +1,23 @@ module Orb module Models - type plan_update_params = { } & Orb::request_parameters + type plan_update_params = + { external_plan_id: String?, metadata: ::Hash[Symbol, String?]? } + & Orb::request_parameters - class PlanUpdateParams < Orb::Models::EditPlanModel + class PlanUpdateParams < Orb::BaseModel extend Orb::RequestParameters::Converter include Orb::RequestParameters + attr_accessor external_plan_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + def initialize: - (request_options: Orb::request_opts) -> void + ( + external_plan_id: String?, + metadata: ::Hash[Symbol, String?]?, + request_options: Orb::request_opts + ) -> void | (?Orb::Models::plan_update_params | Orb::BaseModel data) -> void def to_hash: -> Orb::Models::plan_update_params diff --git a/sig/orb/models/plans/external_plan_id_update_params.rbs b/sig/orb/models/plans/external_plan_id_update_params.rbs index 0e72e372..9ea9e594 100644 --- a/sig/orb/models/plans/external_plan_id_update_params.rbs +++ b/sig/orb/models/plans/external_plan_id_update_params.rbs @@ -1,14 +1,24 @@ module Orb module Models module Plans - type external_plan_id_update_params = { } & Orb::request_parameters + type external_plan_id_update_params = + { external_plan_id: String?, metadata: ::Hash[Symbol, String?]? } + & Orb::request_parameters - class ExternalPlanIDUpdateParams < Orb::Models::EditPlanModel + class ExternalPlanIDUpdateParams < Orb::BaseModel extend Orb::RequestParameters::Converter include Orb::RequestParameters + attr_accessor external_plan_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + def initialize: - (request_options: Orb::request_opts) -> void + ( + external_plan_id: String?, + metadata: ::Hash[Symbol, String?]?, + request_options: Orb::request_opts + ) -> void | ( ?Orb::Models::Plans::external_plan_id_update_params | Orb::BaseModel data diff --git a/sig/orb/models/price.rbs b/sig/orb/models/price.rbs index 4096e7d1..c8c6c710 100644 --- a/sig/orb/models/price.rbs +++ b/sig/orb/models/price.rbs @@ -34,37 +34,37 @@ module Orb type unit_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::UnitPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::UnitPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::UnitPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::UnitPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::UnitPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::UnitPrice::Item, + maximum: Orb::Models::Price::UnitPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::UnitPrice::Minimum?, minimum_amount: String?, model_type: :unit, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::UnitPrice::price_type, - unit_config: Orb::Models::UnitConfigModel, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + unit_config: Orb::Models::Price::UnitPrice::UnitConfig, + dimensional_price_configuration: Orb::Models::Price::UnitPrice::DimensionalPriceConfiguration? } class UnitPrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::UnitPrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::UnitPrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::UnitPrice::cadence @@ -72,7 +72,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::UnitPrice::CreditAllocation? attr_accessor currency: String @@ -82,17 +82,17 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::UnitPrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::UnitPrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::UnitPrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::UnitPrice::Minimum? attr_accessor minimum_amount: String? @@ -104,41 +104,89 @@ module Orb attr_accessor price_type: Orb::Models::Price::UnitPrice::price_type - attr_accessor unit_config: Orb::Models::UnitConfigModel + attr_accessor unit_config: Orb::Models::Price::UnitPrice::UnitConfig - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::UnitPrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::UnitPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::UnitPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::UnitPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::UnitPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::UnitPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::UnitPrice::Item, + maximum: Orb::Models::Price::UnitPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::UnitPrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::UnitPrice::price_type, - unit_config: Orb::Models::UnitConfigModel, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + unit_config: Orb::Models::Price::UnitPrice::UnitConfig, + dimensional_price_configuration: Orb::Models::Price::UnitPrice::DimensionalPriceConfiguration?, model_type: :unit ) -> void | (?Orb::Models::Price::unit_price | Orb::BaseModel data) -> void def to_hash: -> Orb::Models::Price::unit_price + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::UnitPrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitPrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::UnitPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::UnitPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::UnitPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::UnitPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::UnitPrice::BillingCycleConfiguration::duration_unit] + end + end + type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -153,6 +201,112 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::UnitPrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::UnitPrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitPrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::UnitPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::UnitPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::UnitPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::UnitPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::UnitPrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::UnitPrice::item | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitPrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::UnitPrice::maximum | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitPrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::UnitPrice::minimum | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitPrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -161,42 +315,80 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::UnitPrice::price_type] end + + type unit_config = { unit_amount: String } + + class UnitConfig < Orb::BaseModel + attr_accessor unit_amount: String + + def initialize: + (unit_amount: String) -> void + | ( + ?Orb::Models::Price::UnitPrice::unit_config | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitPrice::unit_config + end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::UnitPrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitPrice::dimensional_price_configuration + end end type package_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::PackagePrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::PackagePrice::BillingCycleConfiguration, cadence: Orb::Models::Price::PackagePrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::PackagePrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::PackagePrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::PackagePrice::Item, + maximum: Orb::Models::Price::PackagePrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::PackagePrice::Minimum?, minimum_amount: String?, model_type: :package, name: String, - package_config: Orb::Models::PackageConfigModel, + package_config: Orb::Models::Price::PackagePrice::PackageConfig, plan_phase_order: Integer?, price_type: Orb::Models::Price::PackagePrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + dimensional_price_configuration: Orb::Models::Price::PackagePrice::DimensionalPriceConfiguration? } class PackagePrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::PackagePrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::PackagePrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::PackagePrice::cadence @@ -204,7 +396,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::PackagePrice::CreditAllocation? attr_accessor currency: String @@ -214,17 +406,17 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::PackagePrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::PackagePrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::PackagePrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::PackagePrice::Minimum? attr_accessor minimum_amount: String? @@ -232,45 +424,93 @@ module Orb attr_accessor name: String - attr_accessor package_config: Orb::Models::PackageConfigModel + attr_accessor package_config: Orb::Models::Price::PackagePrice::PackageConfig attr_accessor plan_phase_order: Integer? attr_accessor price_type: Orb::Models::Price::PackagePrice::price_type - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::PackagePrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::PackagePrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::PackagePrice::BillingCycleConfiguration, cadence: Orb::Models::Price::PackagePrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::PackagePrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::PackagePrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::PackagePrice::Item, + maximum: Orb::Models::Price::PackagePrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::PackagePrice::Minimum?, minimum_amount: String?, name: String, - package_config: Orb::Models::PackageConfigModel, + package_config: Orb::Models::Price::PackagePrice::PackageConfig, plan_phase_order: Integer?, price_type: Orb::Models::Price::PackagePrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + dimensional_price_configuration: Orb::Models::Price::PackagePrice::DimensionalPriceConfiguration?, model_type: :package ) -> void | (?Orb::Models::Price::package_price | Orb::BaseModel data) -> void def to_hash: -> Orb::Models::Price::package_price + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::PackagePrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::PackagePrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::PackagePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::PackagePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::PackagePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::PackagePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::PackagePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::PackagePrice::BillingCycleConfiguration::duration_unit] + end + end + type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -285,6 +525,129 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::PackagePrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::PackagePrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::PackagePrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::PackagePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::PackagePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::PackagePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::PackagePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::PackagePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::PackagePrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::PackagePrice::item | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::PackagePrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::PackagePrice::maximum | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::PackagePrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::PackagePrice::minimum | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::PackagePrice::minimum + end + + type package_config = { package_amount: String, package_size: Integer } + + class PackageConfig < Orb::BaseModel + attr_accessor package_amount: String + + attr_accessor package_size: Integer + + def initialize: + (package_amount: String, package_size: Integer) -> void + | ( + ?Orb::Models::Price::PackagePrice::package_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::PackagePrice::package_config + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -293,42 +656,66 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::PackagePrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::PackagePrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::PackagePrice::dimensional_price_configuration + end end type matrix_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::MatrixPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::MatrixPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::MatrixPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::MatrixPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - matrix_config: Orb::Models::MatrixConfigModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::MatrixPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::MatrixPrice::Item, + matrix_config: Orb::Models::Price::MatrixPrice::MatrixConfig, + maximum: Orb::Models::Price::MatrixPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::MatrixPrice::Minimum?, minimum_amount: String?, model_type: :matrix, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::MatrixPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + dimensional_price_configuration: Orb::Models::Price::MatrixPrice::DimensionalPriceConfiguration? } class MatrixPrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::MatrixPrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::MatrixPrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::MatrixPrice::cadence @@ -336,7 +723,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::MatrixPrice::CreditAllocation? attr_accessor currency: String @@ -346,19 +733,19 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::MatrixPrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::MatrixPrice::Item - attr_accessor matrix_config: Orb::Models::MatrixConfigModel + attr_accessor matrix_config: Orb::Models::Price::MatrixPrice::MatrixConfig - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::MatrixPrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::MatrixPrice::Minimum? attr_accessor minimum_amount: String? @@ -370,39 +757,87 @@ module Orb attr_accessor price_type: Orb::Models::Price::MatrixPrice::price_type - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::MatrixPrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::MatrixPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::MatrixPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::MatrixPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::MatrixPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - matrix_config: Orb::Models::MatrixConfigModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::MatrixPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::MatrixPrice::Item, + matrix_config: Orb::Models::Price::MatrixPrice::MatrixConfig, + maximum: Orb::Models::Price::MatrixPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::MatrixPrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::MatrixPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + dimensional_price_configuration: Orb::Models::Price::MatrixPrice::DimensionalPriceConfiguration?, model_type: :matrix ) -> void | (?Orb::Models::Price::matrix_price | Orb::BaseModel data) -> void def to_hash: -> Orb::Models::Price::matrix_price + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::MatrixPrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixPrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::MatrixPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::MatrixPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::MatrixPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::MatrixPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::MatrixPrice::BillingCycleConfiguration::duration_unit] + end + end + type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -417,6 +852,158 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::MatrixPrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::MatrixPrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixPrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::MatrixPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::MatrixPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::MatrixPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::MatrixPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::MatrixPrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::MatrixPrice::item | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixPrice::item + end + + type matrix_config = + { + default_unit_amount: String, + dimensions: ::Array[String?], + matrix_values: ::Array[Orb::Models::Price::MatrixPrice::MatrixConfig::MatrixValue] + } + + class MatrixConfig < Orb::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor matrix_values: ::Array[Orb::Models::Price::MatrixPrice::MatrixConfig::MatrixValue] + + def initialize: + ( + default_unit_amount: String, + dimensions: ::Array[String?], + matrix_values: ::Array[Orb::Models::Price::MatrixPrice::MatrixConfig::MatrixValue] + ) -> void + | ( + ?Orb::Models::Price::MatrixPrice::matrix_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixPrice::matrix_config + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: + (dimension_values: ::Array[String?], unit_amount: String) -> void + | ( + ?Orb::Models::Price::MatrixPrice::MatrixConfig::matrix_value + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixPrice::MatrixConfig::matrix_value + end + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::MatrixPrice::maximum | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixPrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::MatrixPrice::minimum | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixPrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -425,42 +1012,66 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::MatrixPrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::MatrixPrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixPrice::dimensional_price_configuration + end end type tiered_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::TieredPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::TieredPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::TieredPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::TieredPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::TieredPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::TieredPrice::Item, + maximum: Orb::Models::Price::TieredPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::TieredPrice::Minimum?, minimum_amount: String?, model_type: :tiered, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::TieredPrice::price_type, - tiered_config: Orb::Models::TieredConfigModel, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + tiered_config: Orb::Models::Price::TieredPrice::TieredConfig, + dimensional_price_configuration: Orb::Models::Price::TieredPrice::DimensionalPriceConfiguration? } class TieredPrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::TieredPrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::TieredPrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::TieredPrice::cadence @@ -468,7 +1079,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::TieredPrice::CreditAllocation? attr_accessor currency: String @@ -478,17 +1089,17 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::TieredPrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::TieredPrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::TieredPrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::TieredPrice::Minimum? attr_accessor minimum_amount: String? @@ -500,41 +1111,89 @@ module Orb attr_accessor price_type: Orb::Models::Price::TieredPrice::price_type - attr_accessor tiered_config: Orb::Models::TieredConfigModel + attr_accessor tiered_config: Orb::Models::Price::TieredPrice::TieredConfig - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::TieredPrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::TieredPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::TieredPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::TieredPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::TieredPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::TieredPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::TieredPrice::Item, + maximum: Orb::Models::Price::TieredPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::TieredPrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::TieredPrice::price_type, - tiered_config: Orb::Models::TieredConfigModel, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + tiered_config: Orb::Models::Price::TieredPrice::TieredConfig, + dimensional_price_configuration: Orb::Models::Price::TieredPrice::DimensionalPriceConfiguration?, model_type: :tiered ) -> void | (?Orb::Models::Price::tiered_price | Orb::BaseModel data) -> void def to_hash: -> Orb::Models::Price::tiered_price + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::TieredPrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::TieredPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::TieredPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::TieredPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::TieredPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::TieredPrice::BillingCycleConfiguration::duration_unit] + end + end + type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -549,6 +1208,112 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::TieredPrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::TieredPrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::TieredPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::TieredPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::TieredPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::TieredPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::TieredPrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::TieredPrice::item | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::TieredPrice::maximum | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::TieredPrice::minimum | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -557,42 +1322,110 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::TieredPrice::price_type] end + + type tiered_config = + { + tiers: ::Array[Orb::Models::Price::TieredPrice::TieredConfig::Tier] + } + + class TieredConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::Price::TieredPrice::TieredConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::Price::TieredPrice::TieredConfig::Tier] + ) -> void + | ( + ?Orb::Models::Price::TieredPrice::tiered_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPrice::tiered_config + + type tier = + { first_unit: Float, unit_amount: String, last_unit: Float? } + + class Tier < Orb::BaseModel + attr_accessor first_unit: Float + + attr_accessor unit_amount: String + + attr_accessor last_unit: Float? + + def initialize: + ( + first_unit: Float, + unit_amount: String, + last_unit: Float? + ) -> void + | ( + ?Orb::Models::Price::TieredPrice::TieredConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPrice::TieredConfig::tier + end + end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::TieredPrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPrice::dimensional_price_configuration + end end type tiered_bps_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::TieredBpsPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::TieredBpsPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::TieredBpsPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::TieredBpsPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::TieredBpsPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::TieredBpsPrice::Item, + maximum: Orb::Models::Price::TieredBpsPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::TieredBpsPrice::Minimum?, minimum_amount: String?, model_type: :tiered_bps, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::TieredBpsPrice::price_type, - tiered_bps_config: Orb::Models::TieredBpsConfigModel, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + tiered_bps_config: Orb::Models::Price::TieredBpsPrice::TieredBpsConfig, + dimensional_price_configuration: Orb::Models::Price::TieredBpsPrice::DimensionalPriceConfiguration? } class TieredBpsPrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::TieredBpsPrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::TieredBpsPrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::TieredBpsPrice::cadence @@ -600,7 +1433,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::TieredBpsPrice::CreditAllocation? attr_accessor currency: String @@ -610,17 +1443,17 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::TieredBpsPrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::TieredBpsPrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::TieredBpsPrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::TieredBpsPrice::Minimum? attr_accessor minimum_amount: String? @@ -632,35 +1465,35 @@ module Orb attr_accessor price_type: Orb::Models::Price::TieredBpsPrice::price_type - attr_accessor tiered_bps_config: Orb::Models::TieredBpsConfigModel + attr_accessor tiered_bps_config: Orb::Models::Price::TieredBpsPrice::TieredBpsConfig - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::TieredBpsPrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::TieredBpsPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::TieredBpsPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::TieredBpsPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::TieredBpsPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::TieredBpsPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::TieredBpsPrice::Item, + maximum: Orb::Models::Price::TieredBpsPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::TieredBpsPrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::TieredBpsPrice::price_type, - tiered_bps_config: Orb::Models::TieredBpsConfigModel, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + tiered_bps_config: Orb::Models::Price::TieredBpsPrice::TieredBpsConfig, + dimensional_price_configuration: Orb::Models::Price::TieredBpsPrice::DimensionalPriceConfiguration?, model_type: :tiered_bps ) -> void | ( @@ -669,18 +1502,172 @@ module Orb def to_hash: -> Orb::Models::Price::tiered_bps_price - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom + type billable_metric = { id: String } - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom + class BillableMetric < Orb::BaseModel + attr_accessor id: String - def self.values: -> ::Array[Orb::Models::Price::TieredBpsPrice::cadence] + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::TieredBpsPrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredBpsPrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::TieredBpsPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::TieredBpsPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::TieredBpsPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::TieredBpsPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredBpsPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::TieredBpsPrice::BillingCycleConfiguration::duration_unit] + end + end + + type cadence = + :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom + + class Cadence < Orb::Enum + ONE_TIME: :one_time + MONTHLY: :monthly + QUARTERLY: :quarterly + SEMI_ANNUAL: :semi_annual + ANNUAL: :annual + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::Price::TieredBpsPrice::cadence] + end + + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::TieredBpsPrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredBpsPrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::TieredBpsPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::TieredBpsPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::TieredBpsPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::TieredBpsPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredBpsPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::TieredBpsPrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::TieredBpsPrice::item | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredBpsPrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::TieredBpsPrice::maximum | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredBpsPrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::TieredBpsPrice::minimum | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredBpsPrice::minimum end type price_type = :usage_price | :fixed_price @@ -691,44 +1678,120 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::TieredBpsPrice::price_type] end + + type tiered_bps_config = + { + tiers: ::Array[Orb::Models::Price::TieredBpsPrice::TieredBpsConfig::Tier] + } + + class TieredBpsConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::Price::TieredBpsPrice::TieredBpsConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::Price::TieredBpsPrice::TieredBpsConfig::Tier] + ) -> void + | ( + ?Orb::Models::Price::TieredBpsPrice::tiered_bps_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredBpsPrice::tiered_bps_config + + type tier = + { + bps: Float, + minimum_amount: String, + maximum_amount: String?, + per_unit_maximum: String? + } + + class Tier < Orb::BaseModel + attr_accessor bps: Float + + attr_accessor minimum_amount: String + + attr_accessor maximum_amount: String? + + attr_accessor per_unit_maximum: String? + + def initialize: + ( + bps: Float, + minimum_amount: String, + maximum_amount: String?, + per_unit_maximum: String? + ) -> void + | ( + ?Orb::Models::Price::TieredBpsPrice::TieredBpsConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredBpsPrice::TieredBpsConfig::tier + end + end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::TieredBpsPrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredBpsPrice::dimensional_price_configuration + end end type bps_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bps_config: Orb::Models::BpsConfigModel, + billable_metric: Orb::Models::Price::BpsPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::BpsPrice::BillingCycleConfiguration, + bps_config: Orb::Models::Price::BpsPrice::BpsConfig, cadence: Orb::Models::Price::BpsPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::BpsPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::BpsPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::BpsPrice::Item, + maximum: Orb::Models::Price::BpsPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::BpsPrice::Minimum?, minimum_amount: String?, model_type: :bps, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::BpsPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + dimensional_price_configuration: Orb::Models::Price::BpsPrice::DimensionalPriceConfiguration? } class BpsPrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::BpsPrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::BpsPrice::BillingCycleConfiguration - attr_accessor bps_config: Orb::Models::BpsConfigModel + attr_accessor bps_config: Orb::Models::Price::BpsPrice::BpsConfig attr_accessor cadence: Orb::Models::Price::BpsPrice::cadence @@ -736,7 +1799,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::BpsPrice::CreditAllocation? attr_accessor currency: String @@ -746,17 +1809,17 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::BpsPrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::BpsPrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::BpsPrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::BpsPrice::Minimum? attr_accessor minimum_amount: String? @@ -768,39 +1831,103 @@ module Orb attr_accessor price_type: Orb::Models::Price::BpsPrice::price_type - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::BpsPrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bps_config: Orb::Models::BpsConfigModel, + billable_metric: Orb::Models::Price::BpsPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::BpsPrice::BillingCycleConfiguration, + bps_config: Orb::Models::Price::BpsPrice::BpsConfig, cadence: Orb::Models::Price::BpsPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::BpsPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::BpsPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::BpsPrice::Item, + maximum: Orb::Models::Price::BpsPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::BpsPrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::BpsPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + dimensional_price_configuration: Orb::Models::Price::BpsPrice::DimensionalPriceConfiguration?, model_type: :bps ) -> void | (?Orb::Models::Price::bps_price | Orb::BaseModel data) -> void def to_hash: -> Orb::Models::Price::bps_price + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::BpsPrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BpsPrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::BpsPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::BpsPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::BpsPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::BpsPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BpsPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::BpsPrice::BillingCycleConfiguration::duration_unit] + end + end + + type bps_config = { bps: Float, per_unit_maximum: String? } + + class BpsConfig < Orb::BaseModel + attr_accessor bps: Float + + attr_accessor per_unit_maximum: String? + + def initialize: + (bps: Float, per_unit_maximum: String?) -> void + | ( + ?Orb::Models::Price::BpsPrice::bps_config | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BpsPrice::bps_config + end + type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -815,6 +1942,112 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::BpsPrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::BpsPrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BpsPrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::BpsPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::BpsPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::BpsPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::BpsPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BpsPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::BpsPrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::BpsPrice::item | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BpsPrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::BpsPrice::maximum | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BpsPrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::BpsPrice::minimum | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BpsPrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -823,44 +2056,68 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::BpsPrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::BpsPrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BpsPrice::dimensional_price_configuration + end end type bulk_bps_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_bps_config: Orb::Models::BulkBpsConfigModel, + billable_metric: Orb::Models::Price::BulkBpsPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::BulkBpsPrice::BillingCycleConfiguration, + bulk_bps_config: Orb::Models::Price::BulkBpsPrice::BulkBpsConfig, cadence: Orb::Models::Price::BulkBpsPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::BulkBpsPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::BulkBpsPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::BulkBpsPrice::Item, + maximum: Orb::Models::Price::BulkBpsPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::BulkBpsPrice::Minimum?, minimum_amount: String?, model_type: :bulk_bps, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::BulkBpsPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + dimensional_price_configuration: Orb::Models::Price::BulkBpsPrice::DimensionalPriceConfiguration? } class BulkBpsPrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::BulkBpsPrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::BulkBpsPrice::BillingCycleConfiguration - attr_accessor bulk_bps_config: Orb::Models::BulkBpsConfigModel + attr_accessor bulk_bps_config: Orb::Models::Price::BulkBpsPrice::BulkBpsConfig attr_accessor cadence: Orb::Models::Price::BulkBpsPrice::cadence @@ -868,7 +2125,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::BulkBpsPrice::CreditAllocation? attr_accessor currency: String @@ -878,17 +2135,17 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::BulkBpsPrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::BulkBpsPrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::BulkBpsPrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::BulkBpsPrice::Minimum? attr_accessor minimum_amount: String? @@ -900,39 +2157,131 @@ module Orb attr_accessor price_type: Orb::Models::Price::BulkBpsPrice::price_type - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::BulkBpsPrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_bps_config: Orb::Models::BulkBpsConfigModel, + billable_metric: Orb::Models::Price::BulkBpsPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::BulkBpsPrice::BillingCycleConfiguration, + bulk_bps_config: Orb::Models::Price::BulkBpsPrice::BulkBpsConfig, cadence: Orb::Models::Price::BulkBpsPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::BulkBpsPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::BulkBpsPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::BulkBpsPrice::Item, + maximum: Orb::Models::Price::BulkBpsPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::BulkBpsPrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::BulkBpsPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + dimensional_price_configuration: Orb::Models::Price::BulkBpsPrice::DimensionalPriceConfiguration?, model_type: :bulk_bps ) -> void | (?Orb::Models::Price::bulk_bps_price | Orb::BaseModel data) -> void def to_hash: -> Orb::Models::Price::bulk_bps_price + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::BulkBpsPrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkBpsPrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::BulkBpsPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::BulkBpsPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::BulkBpsPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::BulkBpsPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkBpsPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::BulkBpsPrice::BillingCycleConfiguration::duration_unit] + end + end + + type bulk_bps_config = + { + tiers: ::Array[Orb::Models::Price::BulkBpsPrice::BulkBpsConfig::Tier] + } + + class BulkBpsConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::Price::BulkBpsPrice::BulkBpsConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::Price::BulkBpsPrice::BulkBpsConfig::Tier] + ) -> void + | ( + ?Orb::Models::Price::BulkBpsPrice::bulk_bps_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkBpsPrice::bulk_bps_config + + type tier = + { bps: Float, maximum_amount: String?, per_unit_maximum: String? } + + class Tier < Orb::BaseModel + attr_accessor bps: Float + + attr_accessor maximum_amount: String? + + attr_accessor per_unit_maximum: String? + + def initialize: + ( + bps: Float, + maximum_amount: String?, + per_unit_maximum: String? + ) -> void + | ( + ?Orb::Models::Price::BulkBpsPrice::BulkBpsConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkBpsPrice::BulkBpsConfig::tier + end + end + type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -947,6 +2296,112 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::BulkBpsPrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::BulkBpsPrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkBpsPrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::BulkBpsPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::BulkBpsPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::BulkBpsPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::BulkBpsPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkBpsPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::BulkBpsPrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::BulkBpsPrice::item | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkBpsPrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::BulkBpsPrice::maximum | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkBpsPrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::BulkBpsPrice::minimum | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkBpsPrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -955,44 +2410,68 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::BulkBpsPrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::BulkBpsPrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkBpsPrice::dimensional_price_configuration + end end type bulk_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_config: Orb::Models::BulkConfigModel, + billable_metric: Orb::Models::Price::BulkPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::BulkPrice::BillingCycleConfiguration, + bulk_config: Orb::Models::Price::BulkPrice::BulkConfig, cadence: Orb::Models::Price::BulkPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::BulkPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::BulkPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::BulkPrice::Item, + maximum: Orb::Models::Price::BulkPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::BulkPrice::Minimum?, minimum_amount: String?, model_type: :bulk, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::BulkPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + dimensional_price_configuration: Orb::Models::Price::BulkPrice::DimensionalPriceConfiguration? } class BulkPrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::BulkPrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::BulkPrice::BillingCycleConfiguration - attr_accessor bulk_config: Orb::Models::BulkConfigModel + attr_accessor bulk_config: Orb::Models::Price::BulkPrice::BulkConfig attr_accessor cadence: Orb::Models::Price::BulkPrice::cadence @@ -1000,7 +2479,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::BulkPrice::CreditAllocation? attr_accessor currency: String @@ -1010,17 +2489,17 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::BulkPrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::BulkPrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::BulkPrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::BulkPrice::Minimum? attr_accessor minimum_amount: String? @@ -1032,39 +2511,121 @@ module Orb attr_accessor price_type: Orb::Models::Price::BulkPrice::price_type - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::BulkPrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_config: Orb::Models::BulkConfigModel, + billable_metric: Orb::Models::Price::BulkPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::BulkPrice::BillingCycleConfiguration, + bulk_config: Orb::Models::Price::BulkPrice::BulkConfig, cadence: Orb::Models::Price::BulkPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::BulkPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::BulkPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::BulkPrice::Item, + maximum: Orb::Models::Price::BulkPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::BulkPrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::BulkPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + dimensional_price_configuration: Orb::Models::Price::BulkPrice::DimensionalPriceConfiguration?, model_type: :bulk ) -> void | (?Orb::Models::Price::bulk_price | Orb::BaseModel data) -> void def to_hash: -> Orb::Models::Price::bulk_price + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::BulkPrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkPrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::BulkPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::BulkPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::BulkPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::BulkPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::BulkPrice::BillingCycleConfiguration::duration_unit] + end + end + + type bulk_config = + { tiers: ::Array[Orb::Models::Price::BulkPrice::BulkConfig::Tier] } + + class BulkConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::Price::BulkPrice::BulkConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::Price::BulkPrice::BulkConfig::Tier] + ) -> void + | ( + ?Orb::Models::Price::BulkPrice::bulk_config | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkPrice::bulk_config + + type tier = { unit_amount: String, maximum_units: Float? } + + class Tier < Orb::BaseModel + attr_accessor unit_amount: String + + attr_accessor maximum_units: Float? + + def initialize: + (unit_amount: String, maximum_units: Float?) -> void + | ( + ?Orb::Models::Price::BulkPrice::BulkConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkPrice::BulkConfig::tier + end + end + type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -1079,6 +2640,112 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::BulkPrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::BulkPrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkPrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::BulkPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::BulkPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::BulkPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::BulkPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::BulkPrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::BulkPrice::item | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkPrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::BulkPrice::maximum | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkPrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::BulkPrice::minimum | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkPrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -1087,42 +2754,66 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::BulkPrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::BulkPrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkPrice::dimensional_price_configuration + end end type threshold_total_amount_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::ThresholdTotalAmountPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::ThresholdTotalAmountPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::ThresholdTotalAmountPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::ThresholdTotalAmountPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::ThresholdTotalAmountPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::ThresholdTotalAmountPrice::Item, + maximum: Orb::Models::Price::ThresholdTotalAmountPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::ThresholdTotalAmountPrice::Minimum?, minimum_amount: String?, model_type: :threshold_total_amount, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::ThresholdTotalAmountPrice::price_type, - threshold_total_amount_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + threshold_total_amount_config: ::Hash[Symbol, top], + dimensional_price_configuration: Orb::Models::Price::ThresholdTotalAmountPrice::DimensionalPriceConfiguration? } class ThresholdTotalAmountPrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::ThresholdTotalAmountPrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::ThresholdTotalAmountPrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::ThresholdTotalAmountPrice::cadence @@ -1130,7 +2821,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::ThresholdTotalAmountPrice::CreditAllocation? attr_accessor currency: String @@ -1140,17 +2831,17 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::ThresholdTotalAmountPrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::ThresholdTotalAmountPrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::ThresholdTotalAmountPrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::ThresholdTotalAmountPrice::Minimum? attr_accessor minimum_amount: String? @@ -1162,35 +2853,35 @@ module Orb attr_accessor price_type: Orb::Models::Price::ThresholdTotalAmountPrice::price_type - attr_accessor threshold_total_amount_config: Orb::Models::custom_rating_function_config_model + attr_accessor threshold_total_amount_config: ::Hash[Symbol, top] - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::ThresholdTotalAmountPrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::ThresholdTotalAmountPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::ThresholdTotalAmountPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::ThresholdTotalAmountPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::ThresholdTotalAmountPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::ThresholdTotalAmountPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::ThresholdTotalAmountPrice::Item, + maximum: Orb::Models::Price::ThresholdTotalAmountPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::ThresholdTotalAmountPrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::ThresholdTotalAmountPrice::price_type, - threshold_total_amount_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + threshold_total_amount_config: ::Hash[Symbol, top], + dimensional_price_configuration: Orb::Models::Price::ThresholdTotalAmountPrice::DimensionalPriceConfiguration?, model_type: :threshold_total_amount ) -> void | ( @@ -1200,6 +2891,54 @@ module Orb def to_hash: -> Orb::Models::Price::threshold_total_amount_price + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::ThresholdTotalAmountPrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ThresholdTotalAmountPrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::ThresholdTotalAmountPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::ThresholdTotalAmountPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::ThresholdTotalAmountPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::ThresholdTotalAmountPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ThresholdTotalAmountPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::ThresholdTotalAmountPrice::BillingCycleConfiguration::duration_unit] + end + end + type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -1214,6 +2953,115 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::ThresholdTotalAmountPrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::ThresholdTotalAmountPrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ThresholdTotalAmountPrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::ThresholdTotalAmountPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::ThresholdTotalAmountPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::ThresholdTotalAmountPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::ThresholdTotalAmountPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ThresholdTotalAmountPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::ThresholdTotalAmountPrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::ThresholdTotalAmountPrice::item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ThresholdTotalAmountPrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::ThresholdTotalAmountPrice::maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ThresholdTotalAmountPrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::ThresholdTotalAmountPrice::minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ThresholdTotalAmountPrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -1222,42 +3070,66 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::ThresholdTotalAmountPrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::ThresholdTotalAmountPrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ThresholdTotalAmountPrice::dimensional_price_configuration + end end type tiered_package_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::TieredPackagePrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::TieredPackagePrice::BillingCycleConfiguration, cadence: Orb::Models::Price::TieredPackagePrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::TieredPackagePrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::TieredPackagePrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::TieredPackagePrice::Item, + maximum: Orb::Models::Price::TieredPackagePrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::TieredPackagePrice::Minimum?, minimum_amount: String?, model_type: :tiered_package, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::TieredPackagePrice::price_type, - tiered_package_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + tiered_package_config: ::Hash[Symbol, top], + dimensional_price_configuration: Orb::Models::Price::TieredPackagePrice::DimensionalPriceConfiguration? } class TieredPackagePrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::TieredPackagePrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::TieredPackagePrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::TieredPackagePrice::cadence @@ -1265,7 +3137,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::TieredPackagePrice::CreditAllocation? attr_accessor currency: String @@ -1275,17 +3147,17 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::TieredPackagePrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::TieredPackagePrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::TieredPackagePrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::TieredPackagePrice::Minimum? attr_accessor minimum_amount: String? @@ -1297,55 +3169,212 @@ module Orb attr_accessor price_type: Orb::Models::Price::TieredPackagePrice::price_type - attr_accessor tiered_package_config: Orb::Models::custom_rating_function_config_model + attr_accessor tiered_package_config: ::Hash[Symbol, top] - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::TieredPackagePrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::TieredPackagePrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::TieredPackagePrice::BillingCycleConfiguration, cadence: Orb::Models::Price::TieredPackagePrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::TieredPackagePrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::TieredPackagePrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::TieredPackagePrice::Item, + maximum: Orb::Models::Price::TieredPackagePrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::TieredPackagePrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::TieredPackagePrice::price_type, - tiered_package_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + tiered_package_config: ::Hash[Symbol, top], + dimensional_price_configuration: Orb::Models::Price::TieredPackagePrice::DimensionalPriceConfiguration?, model_type: :tiered_package ) -> void | ( ?Orb::Models::Price::tiered_package_price | Orb::BaseModel data ) -> void - def to_hash: -> Orb::Models::Price::tiered_package_price + def to_hash: -> Orb::Models::Price::tiered_package_price + + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::TieredPackagePrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPackagePrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::TieredPackagePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::TieredPackagePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::TieredPackagePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::TieredPackagePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPackagePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::TieredPackagePrice::BillingCycleConfiguration::duration_unit] + end + end + + type cadence = + :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom + + class Cadence < Orb::Enum + ONE_TIME: :one_time + MONTHLY: :monthly + QUARTERLY: :quarterly + SEMI_ANNUAL: :semi_annual + ANNUAL: :annual + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::Price::TieredPackagePrice::cadence] + end + + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::TieredPackagePrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPackagePrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::TieredPackagePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::TieredPackagePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::TieredPackagePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::TieredPackagePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPackagePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::TieredPackagePrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom + class Item < Orb::BaseModel + attr_accessor id: String - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom + attr_accessor name: String - def self.values: -> ::Array[Orb::Models::Price::TieredPackagePrice::cadence] + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::TieredPackagePrice::item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPackagePrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::TieredPackagePrice::maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPackagePrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::TieredPackagePrice::minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPackagePrice::minimum end type price_type = :usage_price | :fixed_price @@ -1356,42 +3385,66 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::TieredPackagePrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::TieredPackagePrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPackagePrice::dimensional_price_configuration + end end type grouped_tiered_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::GroupedTieredPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::GroupedTieredPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::GroupedTieredPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::GroupedTieredPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_tiered_config: Orb::Models::custom_rating_function_config_model, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + grouped_tiered_config: ::Hash[Symbol, top], + invoicing_cycle_configuration: Orb::Models::Price::GroupedTieredPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::GroupedTieredPrice::Item, + maximum: Orb::Models::Price::GroupedTieredPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::GroupedTieredPrice::Minimum?, minimum_amount: String?, model_type: :grouped_tiered, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::GroupedTieredPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + dimensional_price_configuration: Orb::Models::Price::GroupedTieredPrice::DimensionalPriceConfiguration? } class GroupedTieredPrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::GroupedTieredPrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::GroupedTieredPrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::GroupedTieredPrice::cadence @@ -1399,7 +3452,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::GroupedTieredPrice::CreditAllocation? attr_accessor currency: String @@ -1409,19 +3462,19 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor grouped_tiered_config: Orb::Models::custom_rating_function_config_model + attr_accessor grouped_tiered_config: ::Hash[Symbol, top] - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::GroupedTieredPrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::GroupedTieredPrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::GroupedTieredPrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::GroupedTieredPrice::Minimum? attr_accessor minimum_amount: String? @@ -1433,33 +3486,33 @@ module Orb attr_accessor price_type: Orb::Models::Price::GroupedTieredPrice::price_type - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::GroupedTieredPrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::GroupedTieredPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::GroupedTieredPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::GroupedTieredPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::GroupedTieredPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_tiered_config: Orb::Models::custom_rating_function_config_model, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + grouped_tiered_config: ::Hash[Symbol, top], + invoicing_cycle_configuration: Orb::Models::Price::GroupedTieredPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::GroupedTieredPrice::Item, + maximum: Orb::Models::Price::GroupedTieredPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::GroupedTieredPrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::GroupedTieredPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + dimensional_price_configuration: Orb::Models::Price::GroupedTieredPrice::DimensionalPriceConfiguration?, model_type: :grouped_tiered ) -> void | ( @@ -1468,6 +3521,54 @@ module Orb def to_hash: -> Orb::Models::Price::grouped_tiered_price + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::GroupedTieredPrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedTieredPrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::GroupedTieredPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::GroupedTieredPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::GroupedTieredPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::GroupedTieredPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedTieredPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::GroupedTieredPrice::BillingCycleConfiguration::duration_unit] + end + end + type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -1482,6 +3583,115 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::GroupedTieredPrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::GroupedTieredPrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedTieredPrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::GroupedTieredPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::GroupedTieredPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::GroupedTieredPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::GroupedTieredPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedTieredPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::GroupedTieredPrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::GroupedTieredPrice::item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedTieredPrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::GroupedTieredPrice::maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedTieredPrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::GroupedTieredPrice::minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedTieredPrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -1490,42 +3700,66 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::GroupedTieredPrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::GroupedTieredPrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedTieredPrice::dimensional_price_configuration + end end type tiered_with_minimum_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::TieredWithMinimumPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::TieredWithMinimumPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::TieredWithMinimumPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::TieredWithMinimumPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::TieredWithMinimumPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::TieredWithMinimumPrice::Item, + maximum: Orb::Models::Price::TieredWithMinimumPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::TieredWithMinimumPrice::Minimum?, minimum_amount: String?, model_type: :tiered_with_minimum, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::TieredWithMinimumPrice::price_type, - tiered_with_minimum_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + tiered_with_minimum_config: ::Hash[Symbol, top], + dimensional_price_configuration: Orb::Models::Price::TieredWithMinimumPrice::DimensionalPriceConfiguration? } class TieredWithMinimumPrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::TieredWithMinimumPrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::TieredWithMinimumPrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::TieredWithMinimumPrice::cadence @@ -1533,7 +3767,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::TieredWithMinimumPrice::CreditAllocation? attr_accessor currency: String @@ -1543,17 +3777,17 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::TieredWithMinimumPrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::TieredWithMinimumPrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::TieredWithMinimumPrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::TieredWithMinimumPrice::Minimum? attr_accessor minimum_amount: String? @@ -1565,35 +3799,35 @@ module Orb attr_accessor price_type: Orb::Models::Price::TieredWithMinimumPrice::price_type - attr_accessor tiered_with_minimum_config: Orb::Models::custom_rating_function_config_model + attr_accessor tiered_with_minimum_config: ::Hash[Symbol, top] - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::TieredWithMinimumPrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::TieredWithMinimumPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::TieredWithMinimumPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::TieredWithMinimumPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::TieredWithMinimumPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::TieredWithMinimumPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::TieredWithMinimumPrice::Item, + maximum: Orb::Models::Price::TieredWithMinimumPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::TieredWithMinimumPrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::TieredWithMinimumPrice::price_type, - tiered_with_minimum_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + tiered_with_minimum_config: ::Hash[Symbol, top], + dimensional_price_configuration: Orb::Models::Price::TieredWithMinimumPrice::DimensionalPriceConfiguration?, model_type: :tiered_with_minimum ) -> void | ( @@ -1602,6 +3836,54 @@ module Orb def to_hash: -> Orb::Models::Price::tiered_with_minimum_price + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::TieredWithMinimumPrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredWithMinimumPrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::TieredWithMinimumPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::TieredWithMinimumPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::TieredWithMinimumPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::TieredWithMinimumPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredWithMinimumPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::TieredWithMinimumPrice::BillingCycleConfiguration::duration_unit] + end + end + type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -1616,6 +3898,115 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::TieredWithMinimumPrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::TieredWithMinimumPrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredWithMinimumPrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::TieredWithMinimumPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::TieredWithMinimumPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::TieredWithMinimumPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::TieredWithMinimumPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredWithMinimumPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::TieredWithMinimumPrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::TieredWithMinimumPrice::item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredWithMinimumPrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::TieredWithMinimumPrice::maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredWithMinimumPrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::TieredWithMinimumPrice::minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredWithMinimumPrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -1624,42 +4015,66 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::TieredWithMinimumPrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::TieredWithMinimumPrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredWithMinimumPrice::dimensional_price_configuration + end end type tiered_package_with_minimum_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::TieredPackageWithMinimumPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::TieredPackageWithMinimumPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::TieredPackageWithMinimumPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::TieredPackageWithMinimumPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::TieredPackageWithMinimumPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::TieredPackageWithMinimumPrice::Item, + maximum: Orb::Models::Price::TieredPackageWithMinimumPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::TieredPackageWithMinimumPrice::Minimum?, minimum_amount: String?, model_type: :tiered_package_with_minimum, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::TieredPackageWithMinimumPrice::price_type, - tiered_package_with_minimum_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + tiered_package_with_minimum_config: ::Hash[Symbol, top], + dimensional_price_configuration: Orb::Models::Price::TieredPackageWithMinimumPrice::DimensionalPriceConfiguration? } class TieredPackageWithMinimumPrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::TieredPackageWithMinimumPrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::TieredPackageWithMinimumPrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::TieredPackageWithMinimumPrice::cadence @@ -1667,7 +4082,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::TieredPackageWithMinimumPrice::CreditAllocation? attr_accessor currency: String @@ -1677,17 +4092,17 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::TieredPackageWithMinimumPrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::TieredPackageWithMinimumPrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::TieredPackageWithMinimumPrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::TieredPackageWithMinimumPrice::Minimum? attr_accessor minimum_amount: String? @@ -1699,35 +4114,35 @@ module Orb attr_accessor price_type: Orb::Models::Price::TieredPackageWithMinimumPrice::price_type - attr_accessor tiered_package_with_minimum_config: Orb::Models::custom_rating_function_config_model + attr_accessor tiered_package_with_minimum_config: ::Hash[Symbol, top] - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::TieredPackageWithMinimumPrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::TieredPackageWithMinimumPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::TieredPackageWithMinimumPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::TieredPackageWithMinimumPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::TieredPackageWithMinimumPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::TieredPackageWithMinimumPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::TieredPackageWithMinimumPrice::Item, + maximum: Orb::Models::Price::TieredPackageWithMinimumPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::TieredPackageWithMinimumPrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::TieredPackageWithMinimumPrice::price_type, - tiered_package_with_minimum_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + tiered_package_with_minimum_config: ::Hash[Symbol, top], + dimensional_price_configuration: Orb::Models::Price::TieredPackageWithMinimumPrice::DimensionalPriceConfiguration?, model_type: :tiered_package_with_minimum ) -> void | ( @@ -1737,6 +4152,54 @@ module Orb def to_hash: -> Orb::Models::Price::tiered_package_with_minimum_price + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::TieredPackageWithMinimumPrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPackageWithMinimumPrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::TieredPackageWithMinimumPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::TieredPackageWithMinimumPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::TieredPackageWithMinimumPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::TieredPackageWithMinimumPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPackageWithMinimumPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::TieredPackageWithMinimumPrice::BillingCycleConfiguration::duration_unit] + end + end + type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -1751,6 +4214,115 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::TieredPackageWithMinimumPrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::TieredPackageWithMinimumPrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPackageWithMinimumPrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::TieredPackageWithMinimumPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::TieredPackageWithMinimumPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::TieredPackageWithMinimumPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::TieredPackageWithMinimumPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPackageWithMinimumPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::TieredPackageWithMinimumPrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::TieredPackageWithMinimumPrice::item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPackageWithMinimumPrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::TieredPackageWithMinimumPrice::maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPackageWithMinimumPrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::TieredPackageWithMinimumPrice::minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPackageWithMinimumPrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -1759,42 +4331,66 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::TieredPackageWithMinimumPrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::TieredPackageWithMinimumPrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredPackageWithMinimumPrice::dimensional_price_configuration + end end type package_with_allocation_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::PackageWithAllocationPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::PackageWithAllocationPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::PackageWithAllocationPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::PackageWithAllocationPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::PackageWithAllocationPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::PackageWithAllocationPrice::Item, + maximum: Orb::Models::Price::PackageWithAllocationPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::PackageWithAllocationPrice::Minimum?, minimum_amount: String?, model_type: :package_with_allocation, name: String, - package_with_allocation_config: Orb::Models::custom_rating_function_config_model, + package_with_allocation_config: ::Hash[Symbol, top], plan_phase_order: Integer?, price_type: Orb::Models::Price::PackageWithAllocationPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + dimensional_price_configuration: Orb::Models::Price::PackageWithAllocationPrice::DimensionalPriceConfiguration? } class PackageWithAllocationPrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::PackageWithAllocationPrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::PackageWithAllocationPrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::PackageWithAllocationPrice::cadence @@ -1802,7 +4398,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::PackageWithAllocationPrice::CreditAllocation? attr_accessor currency: String @@ -1812,17 +4408,17 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::PackageWithAllocationPrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::PackageWithAllocationPrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::PackageWithAllocationPrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::PackageWithAllocationPrice::Minimum? attr_accessor minimum_amount: String? @@ -1830,39 +4426,39 @@ module Orb attr_accessor name: String - attr_accessor package_with_allocation_config: Orb::Models::custom_rating_function_config_model + attr_accessor package_with_allocation_config: ::Hash[Symbol, top] attr_accessor plan_phase_order: Integer? attr_accessor price_type: Orb::Models::Price::PackageWithAllocationPrice::price_type - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::PackageWithAllocationPrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::PackageWithAllocationPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::PackageWithAllocationPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::PackageWithAllocationPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::PackageWithAllocationPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::PackageWithAllocationPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::PackageWithAllocationPrice::Item, + maximum: Orb::Models::Price::PackageWithAllocationPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::PackageWithAllocationPrice::Minimum?, minimum_amount: String?, name: String, - package_with_allocation_config: Orb::Models::custom_rating_function_config_model, + package_with_allocation_config: ::Hash[Symbol, top], plan_phase_order: Integer?, price_type: Orb::Models::Price::PackageWithAllocationPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + dimensional_price_configuration: Orb::Models::Price::PackageWithAllocationPrice::DimensionalPriceConfiguration?, model_type: :package_with_allocation ) -> void | ( @@ -1872,6 +4468,54 @@ module Orb def to_hash: -> Orb::Models::Price::package_with_allocation_price + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::PackageWithAllocationPrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::PackageWithAllocationPrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::PackageWithAllocationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::PackageWithAllocationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::PackageWithAllocationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::PackageWithAllocationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::PackageWithAllocationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::PackageWithAllocationPrice::BillingCycleConfiguration::duration_unit] + end + end + type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -1886,6 +4530,115 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::PackageWithAllocationPrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::PackageWithAllocationPrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::PackageWithAllocationPrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::PackageWithAllocationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::PackageWithAllocationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::PackageWithAllocationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::PackageWithAllocationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::PackageWithAllocationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::PackageWithAllocationPrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::PackageWithAllocationPrice::item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::PackageWithAllocationPrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::PackageWithAllocationPrice::maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::PackageWithAllocationPrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::PackageWithAllocationPrice::minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::PackageWithAllocationPrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -1894,42 +4647,66 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::PackageWithAllocationPrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::PackageWithAllocationPrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::PackageWithAllocationPrice::dimensional_price_configuration + end end type unit_with_percent_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::UnitWithPercentPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::UnitWithPercentPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::UnitWithPercentPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::UnitWithPercentPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::UnitWithPercentPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::UnitWithPercentPrice::Item, + maximum: Orb::Models::Price::UnitWithPercentPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::UnitWithPercentPrice::Minimum?, minimum_amount: String?, model_type: :unit_with_percent, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::UnitWithPercentPrice::price_type, - unit_with_percent_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + unit_with_percent_config: ::Hash[Symbol, top], + dimensional_price_configuration: Orb::Models::Price::UnitWithPercentPrice::DimensionalPriceConfiguration? } class UnitWithPercentPrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::UnitWithPercentPrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::UnitWithPercentPrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::UnitWithPercentPrice::cadence @@ -1937,7 +4714,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::UnitWithPercentPrice::CreditAllocation? attr_accessor currency: String @@ -1947,17 +4724,17 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::UnitWithPercentPrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::UnitWithPercentPrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::UnitWithPercentPrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::UnitWithPercentPrice::Minimum? attr_accessor minimum_amount: String? @@ -1969,42 +4746,90 @@ module Orb attr_accessor price_type: Orb::Models::Price::UnitWithPercentPrice::price_type - attr_accessor unit_with_percent_config: Orb::Models::custom_rating_function_config_model + attr_accessor unit_with_percent_config: ::Hash[Symbol, top] - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::UnitWithPercentPrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::UnitWithPercentPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::UnitWithPercentPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::UnitWithPercentPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::UnitWithPercentPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::UnitWithPercentPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::UnitWithPercentPrice::Item, + maximum: Orb::Models::Price::UnitWithPercentPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::UnitWithPercentPrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::UnitWithPercentPrice::price_type, - unit_with_percent_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + unit_with_percent_config: ::Hash[Symbol, top], + dimensional_price_configuration: Orb::Models::Price::UnitWithPercentPrice::DimensionalPriceConfiguration?, model_type: :unit_with_percent ) -> void | ( ?Orb::Models::Price::unit_with_percent_price | Orb::BaseModel data ) -> void - def to_hash: -> Orb::Models::Price::unit_with_percent_price + def to_hash: -> Orb::Models::Price::unit_with_percent_price + + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::UnitWithPercentPrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitWithPercentPrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::UnitWithPercentPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::UnitWithPercentPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::UnitWithPercentPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::UnitWithPercentPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitWithPercentPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::UnitWithPercentPrice::BillingCycleConfiguration::duration_unit] + end + end type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -2020,6 +4845,115 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::UnitWithPercentPrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::UnitWithPercentPrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitWithPercentPrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::UnitWithPercentPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::UnitWithPercentPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::UnitWithPercentPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::UnitWithPercentPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitWithPercentPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::UnitWithPercentPrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::UnitWithPercentPrice::item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitWithPercentPrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::UnitWithPercentPrice::maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitWithPercentPrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::UnitWithPercentPrice::minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitWithPercentPrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -2028,42 +4962,66 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::UnitWithPercentPrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::UnitWithPercentPrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitWithPercentPrice::dimensional_price_configuration + end end type matrix_with_allocation_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::MatrixWithAllocationPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::MatrixWithAllocationPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::MatrixWithAllocationPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::MatrixWithAllocationPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - matrix_with_allocation_config: Orb::Models::MatrixWithAllocationConfigModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::MatrixWithAllocationPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::MatrixWithAllocationPrice::Item, + matrix_with_allocation_config: Orb::Models::Price::MatrixWithAllocationPrice::MatrixWithAllocationConfig, + maximum: Orb::Models::Price::MatrixWithAllocationPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::MatrixWithAllocationPrice::Minimum?, minimum_amount: String?, model_type: :matrix_with_allocation, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::MatrixWithAllocationPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + dimensional_price_configuration: Orb::Models::Price::MatrixWithAllocationPrice::DimensionalPriceConfiguration? } class MatrixWithAllocationPrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::MatrixWithAllocationPrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::MatrixWithAllocationPrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::MatrixWithAllocationPrice::cadence @@ -2071,7 +5029,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::MatrixWithAllocationPrice::CreditAllocation? attr_accessor currency: String @@ -2081,19 +5039,19 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::MatrixWithAllocationPrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::MatrixWithAllocationPrice::Item - attr_accessor matrix_with_allocation_config: Orb::Models::MatrixWithAllocationConfigModel + attr_accessor matrix_with_allocation_config: Orb::Models::Price::MatrixWithAllocationPrice::MatrixWithAllocationConfig - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::MatrixWithAllocationPrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::MatrixWithAllocationPrice::Minimum? attr_accessor minimum_amount: String? @@ -2105,33 +5063,33 @@ module Orb attr_accessor price_type: Orb::Models::Price::MatrixWithAllocationPrice::price_type - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::MatrixWithAllocationPrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::MatrixWithAllocationPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::MatrixWithAllocationPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::MatrixWithAllocationPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::MatrixWithAllocationPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - matrix_with_allocation_config: Orb::Models::MatrixWithAllocationConfigModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::MatrixWithAllocationPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::MatrixWithAllocationPrice::Item, + matrix_with_allocation_config: Orb::Models::Price::MatrixWithAllocationPrice::MatrixWithAllocationConfig, + maximum: Orb::Models::Price::MatrixWithAllocationPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::MatrixWithAllocationPrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::MatrixWithAllocationPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + dimensional_price_configuration: Orb::Models::Price::MatrixWithAllocationPrice::DimensionalPriceConfiguration?, model_type: :matrix_with_allocation ) -> void | ( @@ -2141,6 +5099,54 @@ module Orb def to_hash: -> Orb::Models::Price::matrix_with_allocation_price + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::MatrixWithAllocationPrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixWithAllocationPrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::MatrixWithAllocationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::MatrixWithAllocationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::MatrixWithAllocationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::MatrixWithAllocationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixWithAllocationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::MatrixWithAllocationPrice::BillingCycleConfiguration::duration_unit] + end + end + type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -2155,6 +5161,165 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::MatrixWithAllocationPrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::MatrixWithAllocationPrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixWithAllocationPrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::MatrixWithAllocationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::MatrixWithAllocationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::MatrixWithAllocationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::MatrixWithAllocationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixWithAllocationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::MatrixWithAllocationPrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::MatrixWithAllocationPrice::item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixWithAllocationPrice::item + end + + type matrix_with_allocation_config = + { + allocation: Float, + default_unit_amount: String, + dimensions: ::Array[String?], + matrix_values: ::Array[Orb::Models::Price::MatrixWithAllocationPrice::MatrixWithAllocationConfig::MatrixValue] + } + + class MatrixWithAllocationConfig < Orb::BaseModel + attr_accessor allocation: Float + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor matrix_values: ::Array[Orb::Models::Price::MatrixWithAllocationPrice::MatrixWithAllocationConfig::MatrixValue] + + def initialize: + ( + allocation: Float, + default_unit_amount: String, + dimensions: ::Array[String?], + matrix_values: ::Array[Orb::Models::Price::MatrixWithAllocationPrice::MatrixWithAllocationConfig::MatrixValue] + ) -> void + | ( + ?Orb::Models::Price::MatrixWithAllocationPrice::matrix_with_allocation_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixWithAllocationPrice::matrix_with_allocation_config + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: + (dimension_values: ::Array[String?], unit_amount: String) -> void + | ( + ?Orb::Models::Price::MatrixWithAllocationPrice::MatrixWithAllocationConfig::matrix_value + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixWithAllocationPrice::MatrixWithAllocationConfig::matrix_value + end + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::MatrixWithAllocationPrice::maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixWithAllocationPrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::MatrixWithAllocationPrice::minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixWithAllocationPrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -2163,42 +5328,66 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::MatrixWithAllocationPrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::MatrixWithAllocationPrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixWithAllocationPrice::dimensional_price_configuration + end end type tiered_with_proration_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::TieredWithProrationPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::TieredWithProrationPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::TieredWithProrationPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::TieredWithProrationPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::TieredWithProrationPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::TieredWithProrationPrice::Item, + maximum: Orb::Models::Price::TieredWithProrationPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::TieredWithProrationPrice::Minimum?, minimum_amount: String?, model_type: :tiered_with_proration, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::TieredWithProrationPrice::price_type, - tiered_with_proration_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + tiered_with_proration_config: ::Hash[Symbol, top], + dimensional_price_configuration: Orb::Models::Price::TieredWithProrationPrice::DimensionalPriceConfiguration? } class TieredWithProrationPrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::TieredWithProrationPrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::TieredWithProrationPrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::TieredWithProrationPrice::cadence @@ -2206,7 +5395,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::TieredWithProrationPrice::CreditAllocation? attr_accessor currency: String @@ -2216,17 +5405,17 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::TieredWithProrationPrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::TieredWithProrationPrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::TieredWithProrationPrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::TieredWithProrationPrice::Minimum? attr_accessor minimum_amount: String? @@ -2238,35 +5427,35 @@ module Orb attr_accessor price_type: Orb::Models::Price::TieredWithProrationPrice::price_type - attr_accessor tiered_with_proration_config: Orb::Models::custom_rating_function_config_model + attr_accessor tiered_with_proration_config: ::Hash[Symbol, top] - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::TieredWithProrationPrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::TieredWithProrationPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::TieredWithProrationPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::TieredWithProrationPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::TieredWithProrationPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::TieredWithProrationPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::TieredWithProrationPrice::Item, + maximum: Orb::Models::Price::TieredWithProrationPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::TieredWithProrationPrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::TieredWithProrationPrice::price_type, - tiered_with_proration_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + tiered_with_proration_config: ::Hash[Symbol, top], + dimensional_price_configuration: Orb::Models::Price::TieredWithProrationPrice::DimensionalPriceConfiguration?, model_type: :tiered_with_proration ) -> void | ( @@ -2276,6 +5465,54 @@ module Orb def to_hash: -> Orb::Models::Price::tiered_with_proration_price + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::TieredWithProrationPrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredWithProrationPrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::TieredWithProrationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::TieredWithProrationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::TieredWithProrationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::TieredWithProrationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredWithProrationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::TieredWithProrationPrice::BillingCycleConfiguration::duration_unit] + end + end + type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -2290,6 +5527,115 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::TieredWithProrationPrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::TieredWithProrationPrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredWithProrationPrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::TieredWithProrationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::TieredWithProrationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::TieredWithProrationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::TieredWithProrationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredWithProrationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::TieredWithProrationPrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::TieredWithProrationPrice::item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredWithProrationPrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::TieredWithProrationPrice::maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredWithProrationPrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::TieredWithProrationPrice::minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredWithProrationPrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -2298,42 +5644,66 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::TieredWithProrationPrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::TieredWithProrationPrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::TieredWithProrationPrice::dimensional_price_configuration + end end type unit_with_proration_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::UnitWithProrationPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::UnitWithProrationPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::UnitWithProrationPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::UnitWithProrationPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::UnitWithProrationPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::UnitWithProrationPrice::Item, + maximum: Orb::Models::Price::UnitWithProrationPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::UnitWithProrationPrice::Minimum?, minimum_amount: String?, model_type: :unit_with_proration, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::UnitWithProrationPrice::price_type, - unit_with_proration_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + unit_with_proration_config: ::Hash[Symbol, top], + dimensional_price_configuration: Orb::Models::Price::UnitWithProrationPrice::DimensionalPriceConfiguration? } class UnitWithProrationPrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::UnitWithProrationPrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::UnitWithProrationPrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::UnitWithProrationPrice::cadence @@ -2341,7 +5711,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::UnitWithProrationPrice::CreditAllocation? attr_accessor currency: String @@ -2351,17 +5721,17 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::UnitWithProrationPrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::UnitWithProrationPrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::UnitWithProrationPrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::UnitWithProrationPrice::Minimum? attr_accessor minimum_amount: String? @@ -2373,35 +5743,35 @@ module Orb attr_accessor price_type: Orb::Models::Price::UnitWithProrationPrice::price_type - attr_accessor unit_with_proration_config: Orb::Models::custom_rating_function_config_model + attr_accessor unit_with_proration_config: ::Hash[Symbol, top] - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::UnitWithProrationPrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::UnitWithProrationPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::UnitWithProrationPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::UnitWithProrationPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::UnitWithProrationPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::UnitWithProrationPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::UnitWithProrationPrice::Item, + maximum: Orb::Models::Price::UnitWithProrationPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::UnitWithProrationPrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::UnitWithProrationPrice::price_type, - unit_with_proration_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + unit_with_proration_config: ::Hash[Symbol, top], + dimensional_price_configuration: Orb::Models::Price::UnitWithProrationPrice::DimensionalPriceConfiguration?, model_type: :unit_with_proration ) -> void | ( @@ -2410,6 +5780,54 @@ module Orb def to_hash: -> Orb::Models::Price::unit_with_proration_price + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::UnitWithProrationPrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitWithProrationPrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::UnitWithProrationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::UnitWithProrationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::UnitWithProrationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::UnitWithProrationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitWithProrationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::UnitWithProrationPrice::BillingCycleConfiguration::duration_unit] + end + end + type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -2424,6 +5842,115 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::UnitWithProrationPrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::UnitWithProrationPrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitWithProrationPrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::UnitWithProrationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::UnitWithProrationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::UnitWithProrationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::UnitWithProrationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitWithProrationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::UnitWithProrationPrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::UnitWithProrationPrice::item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitWithProrationPrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::UnitWithProrationPrice::maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitWithProrationPrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::UnitWithProrationPrice::minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitWithProrationPrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -2432,42 +5959,66 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::UnitWithProrationPrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::UnitWithProrationPrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::UnitWithProrationPrice::dimensional_price_configuration + end end type grouped_allocation_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::GroupedAllocationPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::GroupedAllocationPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::GroupedAllocationPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::GroupedAllocationPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_allocation_config: Orb::Models::custom_rating_function_config_model, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + grouped_allocation_config: ::Hash[Symbol, top], + invoicing_cycle_configuration: Orb::Models::Price::GroupedAllocationPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::GroupedAllocationPrice::Item, + maximum: Orb::Models::Price::GroupedAllocationPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::GroupedAllocationPrice::Minimum?, minimum_amount: String?, model_type: :grouped_allocation, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::GroupedAllocationPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + dimensional_price_configuration: Orb::Models::Price::GroupedAllocationPrice::DimensionalPriceConfiguration? } class GroupedAllocationPrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::GroupedAllocationPrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::GroupedAllocationPrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::GroupedAllocationPrice::cadence @@ -2475,7 +6026,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::GroupedAllocationPrice::CreditAllocation? attr_accessor currency: String @@ -2485,19 +6036,19 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor grouped_allocation_config: Orb::Models::custom_rating_function_config_model + attr_accessor grouped_allocation_config: ::Hash[Symbol, top] - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::GroupedAllocationPrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::GroupedAllocationPrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::GroupedAllocationPrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::GroupedAllocationPrice::Minimum? attr_accessor minimum_amount: String? @@ -2509,53 +6060,210 @@ module Orb attr_accessor price_type: Orb::Models::Price::GroupedAllocationPrice::price_type - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::GroupedAllocationPrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::GroupedAllocationPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::GroupedAllocationPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::GroupedAllocationPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::GroupedAllocationPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_allocation_config: Orb::Models::custom_rating_function_config_model, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + grouped_allocation_config: ::Hash[Symbol, top], + invoicing_cycle_configuration: Orb::Models::Price::GroupedAllocationPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::GroupedAllocationPrice::Item, + maximum: Orb::Models::Price::GroupedAllocationPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::GroupedAllocationPrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::GroupedAllocationPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + dimensional_price_configuration: Orb::Models::Price::GroupedAllocationPrice::DimensionalPriceConfiguration?, model_type: :grouped_allocation ) -> void | ( ?Orb::Models::Price::grouped_allocation_price | Orb::BaseModel data ) -> void - def to_hash: -> Orb::Models::Price::grouped_allocation_price + def to_hash: -> Orb::Models::Price::grouped_allocation_price + + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::GroupedAllocationPrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedAllocationPrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::GroupedAllocationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::GroupedAllocationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::GroupedAllocationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::GroupedAllocationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedAllocationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::GroupedAllocationPrice::BillingCycleConfiguration::duration_unit] + end + end + + type cadence = + :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom + + class Cadence < Orb::Enum + ONE_TIME: :one_time + MONTHLY: :monthly + QUARTERLY: :quarterly + SEMI_ANNUAL: :semi_annual + ANNUAL: :annual + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::Price::GroupedAllocationPrice::cadence] + end + + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::GroupedAllocationPrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedAllocationPrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::GroupedAllocationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::GroupedAllocationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::GroupedAllocationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::GroupedAllocationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedAllocationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom + def self.values: -> ::Array[Orb::Models::Price::GroupedAllocationPrice::InvoicingCycleConfiguration::duration_unit] + end + end - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom + type item = { id: String, name: String } - def self.values: -> ::Array[Orb::Models::Price::GroupedAllocationPrice::cadence] + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::GroupedAllocationPrice::item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedAllocationPrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::GroupedAllocationPrice::maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedAllocationPrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::GroupedAllocationPrice::minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedAllocationPrice::minimum end type price_type = :usage_price | :fixed_price @@ -2566,42 +6274,66 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::GroupedAllocationPrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::GroupedAllocationPrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedAllocationPrice::dimensional_price_configuration + end end type grouped_with_prorated_minimum_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::GroupedWithProratedMinimumPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::GroupedWithProratedMinimumPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::GroupedWithProratedMinimumPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::GroupedWithProratedMinimumPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_with_prorated_minimum_config: Orb::Models::custom_rating_function_config_model, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + grouped_with_prorated_minimum_config: ::Hash[Symbol, top], + invoicing_cycle_configuration: Orb::Models::Price::GroupedWithProratedMinimumPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::GroupedWithProratedMinimumPrice::Item, + maximum: Orb::Models::Price::GroupedWithProratedMinimumPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::GroupedWithProratedMinimumPrice::Minimum?, minimum_amount: String?, model_type: :grouped_with_prorated_minimum, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::GroupedWithProratedMinimumPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + dimensional_price_configuration: Orb::Models::Price::GroupedWithProratedMinimumPrice::DimensionalPriceConfiguration? } class GroupedWithProratedMinimumPrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::GroupedWithProratedMinimumPrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::GroupedWithProratedMinimumPrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::GroupedWithProratedMinimumPrice::cadence @@ -2609,7 +6341,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::GroupedWithProratedMinimumPrice::CreditAllocation? attr_accessor currency: String @@ -2619,19 +6351,19 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor grouped_with_prorated_minimum_config: Orb::Models::custom_rating_function_config_model + attr_accessor grouped_with_prorated_minimum_config: ::Hash[Symbol, top] - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::GroupedWithProratedMinimumPrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::GroupedWithProratedMinimumPrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::GroupedWithProratedMinimumPrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::GroupedWithProratedMinimumPrice::Minimum? attr_accessor minimum_amount: String? @@ -2643,33 +6375,33 @@ module Orb attr_accessor price_type: Orb::Models::Price::GroupedWithProratedMinimumPrice::price_type - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::GroupedWithProratedMinimumPrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::GroupedWithProratedMinimumPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::GroupedWithProratedMinimumPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::GroupedWithProratedMinimumPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::GroupedWithProratedMinimumPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_with_prorated_minimum_config: Orb::Models::custom_rating_function_config_model, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + grouped_with_prorated_minimum_config: ::Hash[Symbol, top], + invoicing_cycle_configuration: Orb::Models::Price::GroupedWithProratedMinimumPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::GroupedWithProratedMinimumPrice::Item, + maximum: Orb::Models::Price::GroupedWithProratedMinimumPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::GroupedWithProratedMinimumPrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::GroupedWithProratedMinimumPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + dimensional_price_configuration: Orb::Models::Price::GroupedWithProratedMinimumPrice::DimensionalPriceConfiguration?, model_type: :grouped_with_prorated_minimum ) -> void | ( @@ -2679,6 +6411,54 @@ module Orb def to_hash: -> Orb::Models::Price::grouped_with_prorated_minimum_price + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::GroupedWithProratedMinimumPrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedWithProratedMinimumPrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::GroupedWithProratedMinimumPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::GroupedWithProratedMinimumPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::GroupedWithProratedMinimumPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::GroupedWithProratedMinimumPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedWithProratedMinimumPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::GroupedWithProratedMinimumPrice::BillingCycleConfiguration::duration_unit] + end + end + type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -2693,6 +6473,115 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::GroupedWithProratedMinimumPrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::GroupedWithProratedMinimumPrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedWithProratedMinimumPrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::GroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::GroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::GroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::GroupedWithProratedMinimumPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedWithProratedMinimumPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::GroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::GroupedWithProratedMinimumPrice::item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedWithProratedMinimumPrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::GroupedWithProratedMinimumPrice::maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedWithProratedMinimumPrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::GroupedWithProratedMinimumPrice::minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedWithProratedMinimumPrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -2701,42 +6590,66 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::GroupedWithProratedMinimumPrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::GroupedWithProratedMinimumPrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedWithProratedMinimumPrice::dimensional_price_configuration + end end type grouped_with_metered_minimum_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::GroupedWithMeteredMinimumPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::GroupedWithMeteredMinimumPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_with_metered_minimum_config: Orb::Models::custom_rating_function_config_model, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + grouped_with_metered_minimum_config: ::Hash[Symbol, top], + invoicing_cycle_configuration: Orb::Models::Price::GroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::GroupedWithMeteredMinimumPrice::Item, + maximum: Orb::Models::Price::GroupedWithMeteredMinimumPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::GroupedWithMeteredMinimumPrice::Minimum?, minimum_amount: String?, model_type: :grouped_with_metered_minimum, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::GroupedWithMeteredMinimumPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + dimensional_price_configuration: Orb::Models::Price::GroupedWithMeteredMinimumPrice::DimensionalPriceConfiguration? } class GroupedWithMeteredMinimumPrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::GroupedWithMeteredMinimumPrice::cadence @@ -2744,7 +6657,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::GroupedWithMeteredMinimumPrice::CreditAllocation? attr_accessor currency: String @@ -2754,19 +6667,19 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor grouped_with_metered_minimum_config: Orb::Models::custom_rating_function_config_model + attr_accessor grouped_with_metered_minimum_config: ::Hash[Symbol, top] - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::GroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::GroupedWithMeteredMinimumPrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::GroupedWithMeteredMinimumPrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::GroupedWithMeteredMinimumPrice::Minimum? attr_accessor minimum_amount: String? @@ -2778,33 +6691,33 @@ module Orb attr_accessor price_type: Orb::Models::Price::GroupedWithMeteredMinimumPrice::price_type - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::GroupedWithMeteredMinimumPrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::GroupedWithMeteredMinimumPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::GroupedWithMeteredMinimumPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_with_metered_minimum_config: Orb::Models::custom_rating_function_config_model, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + grouped_with_metered_minimum_config: ::Hash[Symbol, top], + invoicing_cycle_configuration: Orb::Models::Price::GroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::GroupedWithMeteredMinimumPrice::Item, + maximum: Orb::Models::Price::GroupedWithMeteredMinimumPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::GroupedWithMeteredMinimumPrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::GroupedWithMeteredMinimumPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + dimensional_price_configuration: Orb::Models::Price::GroupedWithMeteredMinimumPrice::DimensionalPriceConfiguration?, model_type: :grouped_with_metered_minimum ) -> void | ( @@ -2814,6 +6727,54 @@ module Orb def to_hash: -> Orb::Models::Price::grouped_with_metered_minimum_price + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::GroupedWithMeteredMinimumPrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedWithMeteredMinimumPrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::GroupedWithMeteredMinimumPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedWithMeteredMinimumPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::GroupedWithMeteredMinimumPrice::BillingCycleConfiguration::duration_unit] + end + end + type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -2828,6 +6789,115 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::GroupedWithMeteredMinimumPrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::GroupedWithMeteredMinimumPrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedWithMeteredMinimumPrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::GroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::GroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::GroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::GroupedWithMeteredMinimumPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedWithMeteredMinimumPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::GroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::GroupedWithMeteredMinimumPrice::item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedWithMeteredMinimumPrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::GroupedWithMeteredMinimumPrice::maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedWithMeteredMinimumPrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::GroupedWithMeteredMinimumPrice::minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedWithMeteredMinimumPrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -2836,42 +6906,66 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::GroupedWithMeteredMinimumPrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::GroupedWithMeteredMinimumPrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedWithMeteredMinimumPrice::dimensional_price_configuration + end end type matrix_with_display_name_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::MatrixWithDisplayNamePrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::MatrixWithDisplayNamePrice::BillingCycleConfiguration, cadence: Orb::Models::Price::MatrixWithDisplayNamePrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::MatrixWithDisplayNamePrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - matrix_with_display_name_config: Orb::Models::custom_rating_function_config_model, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::MatrixWithDisplayNamePrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::MatrixWithDisplayNamePrice::Item, + matrix_with_display_name_config: ::Hash[Symbol, top], + maximum: Orb::Models::Price::MatrixWithDisplayNamePrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::MatrixWithDisplayNamePrice::Minimum?, minimum_amount: String?, model_type: :matrix_with_display_name, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::MatrixWithDisplayNamePrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + dimensional_price_configuration: Orb::Models::Price::MatrixWithDisplayNamePrice::DimensionalPriceConfiguration? } class MatrixWithDisplayNamePrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::MatrixWithDisplayNamePrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::MatrixWithDisplayNamePrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::MatrixWithDisplayNamePrice::cadence @@ -2879,7 +6973,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::MatrixWithDisplayNamePrice::CreditAllocation? attr_accessor currency: String @@ -2889,19 +6983,19 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::MatrixWithDisplayNamePrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::MatrixWithDisplayNamePrice::Item - attr_accessor matrix_with_display_name_config: Orb::Models::custom_rating_function_config_model + attr_accessor matrix_with_display_name_config: ::Hash[Symbol, top] - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::MatrixWithDisplayNamePrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::MatrixWithDisplayNamePrice::Minimum? attr_accessor minimum_amount: String? @@ -2913,33 +7007,33 @@ module Orb attr_accessor price_type: Orb::Models::Price::MatrixWithDisplayNamePrice::price_type - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::MatrixWithDisplayNamePrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::MatrixWithDisplayNamePrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::MatrixWithDisplayNamePrice::BillingCycleConfiguration, cadence: Orb::Models::Price::MatrixWithDisplayNamePrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::MatrixWithDisplayNamePrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - matrix_with_display_name_config: Orb::Models::custom_rating_function_config_model, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::MatrixWithDisplayNamePrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::MatrixWithDisplayNamePrice::Item, + matrix_with_display_name_config: ::Hash[Symbol, top], + maximum: Orb::Models::Price::MatrixWithDisplayNamePrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::MatrixWithDisplayNamePrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::MatrixWithDisplayNamePrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + dimensional_price_configuration: Orb::Models::Price::MatrixWithDisplayNamePrice::DimensionalPriceConfiguration?, model_type: :matrix_with_display_name ) -> void | ( @@ -2949,6 +7043,54 @@ module Orb def to_hash: -> Orb::Models::Price::matrix_with_display_name_price + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::MatrixWithDisplayNamePrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixWithDisplayNamePrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::MatrixWithDisplayNamePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::MatrixWithDisplayNamePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::MatrixWithDisplayNamePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::MatrixWithDisplayNamePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixWithDisplayNamePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::MatrixWithDisplayNamePrice::BillingCycleConfiguration::duration_unit] + end + end + type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -2963,6 +7105,115 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::MatrixWithDisplayNamePrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::MatrixWithDisplayNamePrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixWithDisplayNamePrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::MatrixWithDisplayNamePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::MatrixWithDisplayNamePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::MatrixWithDisplayNamePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::MatrixWithDisplayNamePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixWithDisplayNamePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::MatrixWithDisplayNamePrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::MatrixWithDisplayNamePrice::item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixWithDisplayNamePrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::MatrixWithDisplayNamePrice::maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixWithDisplayNamePrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::MatrixWithDisplayNamePrice::minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixWithDisplayNamePrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -2971,44 +7222,68 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::MatrixWithDisplayNamePrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::MatrixWithDisplayNamePrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MatrixWithDisplayNamePrice::dimensional_price_configuration + end end type bulk_with_proration_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_with_proration_config: Orb::Models::custom_rating_function_config_model, + billable_metric: Orb::Models::Price::BulkWithProrationPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::BulkWithProrationPrice::BillingCycleConfiguration, + bulk_with_proration_config: ::Hash[Symbol, top], cadence: Orb::Models::Price::BulkWithProrationPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::BulkWithProrationPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::BulkWithProrationPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::BulkWithProrationPrice::Item, + maximum: Orb::Models::Price::BulkWithProrationPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::BulkWithProrationPrice::Minimum?, minimum_amount: String?, model_type: :bulk_with_proration, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::BulkWithProrationPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + dimensional_price_configuration: Orb::Models::Price::BulkWithProrationPrice::DimensionalPriceConfiguration? } class BulkWithProrationPrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::BulkWithProrationPrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::BulkWithProrationPrice::BillingCycleConfiguration - attr_accessor bulk_with_proration_config: Orb::Models::custom_rating_function_config_model + attr_accessor bulk_with_proration_config: ::Hash[Symbol, top] attr_accessor cadence: Orb::Models::Price::BulkWithProrationPrice::cadence @@ -3016,7 +7291,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::BulkWithProrationPrice::CreditAllocation? attr_accessor currency: String @@ -3026,17 +7301,17 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::BulkWithProrationPrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::BulkWithProrationPrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::BulkWithProrationPrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::BulkWithProrationPrice::Minimum? attr_accessor minimum_amount: String? @@ -3048,33 +7323,33 @@ module Orb attr_accessor price_type: Orb::Models::Price::BulkWithProrationPrice::price_type - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::BulkWithProrationPrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_with_proration_config: Orb::Models::custom_rating_function_config_model, + billable_metric: Orb::Models::Price::BulkWithProrationPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::BulkWithProrationPrice::BillingCycleConfiguration, + bulk_with_proration_config: ::Hash[Symbol, top], cadence: Orb::Models::Price::BulkWithProrationPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::BulkWithProrationPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::BulkWithProrationPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::BulkWithProrationPrice::Item, + maximum: Orb::Models::Price::BulkWithProrationPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::BulkWithProrationPrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::BulkWithProrationPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + dimensional_price_configuration: Orb::Models::Price::BulkWithProrationPrice::DimensionalPriceConfiguration?, model_type: :bulk_with_proration ) -> void | ( @@ -3083,6 +7358,54 @@ module Orb def to_hash: -> Orb::Models::Price::bulk_with_proration_price + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::BulkWithProrationPrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkWithProrationPrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::BulkWithProrationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::BulkWithProrationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::BulkWithProrationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::BulkWithProrationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkWithProrationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::BulkWithProrationPrice::BillingCycleConfiguration::duration_unit] + end + end + type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -3097,6 +7420,115 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::BulkWithProrationPrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::BulkWithProrationPrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkWithProrationPrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::BulkWithProrationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::BulkWithProrationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::BulkWithProrationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::BulkWithProrationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkWithProrationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::BulkWithProrationPrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::BulkWithProrationPrice::item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkWithProrationPrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::BulkWithProrationPrice::maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkWithProrationPrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::BulkWithProrationPrice::minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkWithProrationPrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -3105,42 +7537,66 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::BulkWithProrationPrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::BulkWithProrationPrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::BulkWithProrationPrice::dimensional_price_configuration + end end type grouped_tiered_package_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::GroupedTieredPackagePrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::GroupedTieredPackagePrice::BillingCycleConfiguration, cadence: Orb::Models::Price::GroupedTieredPackagePrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::GroupedTieredPackagePrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_tiered_package_config: Orb::Models::custom_rating_function_config_model, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + grouped_tiered_package_config: ::Hash[Symbol, top], + invoicing_cycle_configuration: Orb::Models::Price::GroupedTieredPackagePrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::GroupedTieredPackagePrice::Item, + maximum: Orb::Models::Price::GroupedTieredPackagePrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::GroupedTieredPackagePrice::Minimum?, minimum_amount: String?, model_type: :grouped_tiered_package, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::GroupedTieredPackagePrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + dimensional_price_configuration: Orb::Models::Price::GroupedTieredPackagePrice::DimensionalPriceConfiguration? } class GroupedTieredPackagePrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::GroupedTieredPackagePrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::GroupedTieredPackagePrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::GroupedTieredPackagePrice::cadence @@ -3148,7 +7604,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::GroupedTieredPackagePrice::CreditAllocation? attr_accessor currency: String @@ -3158,19 +7614,19 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor grouped_tiered_package_config: Orb::Models::custom_rating_function_config_model + attr_accessor grouped_tiered_package_config: ::Hash[Symbol, top] - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::GroupedTieredPackagePrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::GroupedTieredPackagePrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::GroupedTieredPackagePrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::GroupedTieredPackagePrice::Minimum? attr_accessor minimum_amount: String? @@ -3182,33 +7638,33 @@ module Orb attr_accessor price_type: Orb::Models::Price::GroupedTieredPackagePrice::price_type - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::GroupedTieredPackagePrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::GroupedTieredPackagePrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::GroupedTieredPackagePrice::BillingCycleConfiguration, cadence: Orb::Models::Price::GroupedTieredPackagePrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::GroupedTieredPackagePrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_tiered_package_config: Orb::Models::custom_rating_function_config_model, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + grouped_tiered_package_config: ::Hash[Symbol, top], + invoicing_cycle_configuration: Orb::Models::Price::GroupedTieredPackagePrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::GroupedTieredPackagePrice::Item, + maximum: Orb::Models::Price::GroupedTieredPackagePrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::GroupedTieredPackagePrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::GroupedTieredPackagePrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + dimensional_price_configuration: Orb::Models::Price::GroupedTieredPackagePrice::DimensionalPriceConfiguration?, model_type: :grouped_tiered_package ) -> void | ( @@ -3216,7 +7672,55 @@ module Orb | Orb::BaseModel data ) -> void - def to_hash: -> Orb::Models::Price::grouped_tiered_package_price + def to_hash: -> Orb::Models::Price::grouped_tiered_package_price + + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::GroupedTieredPackagePrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedTieredPackagePrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::GroupedTieredPackagePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::GroupedTieredPackagePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::GroupedTieredPackagePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::GroupedTieredPackagePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedTieredPackagePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::GroupedTieredPackagePrice::BillingCycleConfiguration::duration_unit] + end + end type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -3232,6 +7736,115 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::GroupedTieredPackagePrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::GroupedTieredPackagePrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedTieredPackagePrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::GroupedTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::GroupedTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::GroupedTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::GroupedTieredPackagePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedTieredPackagePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::GroupedTieredPackagePrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::GroupedTieredPackagePrice::item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedTieredPackagePrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::GroupedTieredPackagePrice::maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedTieredPackagePrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::GroupedTieredPackagePrice::minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedTieredPackagePrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -3240,42 +7853,66 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::GroupedTieredPackagePrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::GroupedTieredPackagePrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::GroupedTieredPackagePrice::dimensional_price_configuration + end end type max_group_tiered_package_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::MaxGroupTieredPackagePrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::MaxGroupTieredPackagePrice::BillingCycleConfiguration, cadence: Orb::Models::Price::MaxGroupTieredPackagePrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::MaxGroupTieredPackagePrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - max_group_tiered_package_config: Orb::Models::custom_rating_function_config_model, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::MaxGroupTieredPackagePrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::MaxGroupTieredPackagePrice::Item, + max_group_tiered_package_config: ::Hash[Symbol, top], + maximum: Orb::Models::Price::MaxGroupTieredPackagePrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::MaxGroupTieredPackagePrice::Minimum?, minimum_amount: String?, model_type: :max_group_tiered_package, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::MaxGroupTieredPackagePrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + dimensional_price_configuration: Orb::Models::Price::MaxGroupTieredPackagePrice::DimensionalPriceConfiguration? } class MaxGroupTieredPackagePrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::MaxGroupTieredPackagePrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::MaxGroupTieredPackagePrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::MaxGroupTieredPackagePrice::cadence @@ -3283,7 +7920,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::MaxGroupTieredPackagePrice::CreditAllocation? attr_accessor currency: String @@ -3293,19 +7930,19 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::MaxGroupTieredPackagePrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::MaxGroupTieredPackagePrice::Item - attr_accessor max_group_tiered_package_config: Orb::Models::custom_rating_function_config_model + attr_accessor max_group_tiered_package_config: ::Hash[Symbol, top] - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::MaxGroupTieredPackagePrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::MaxGroupTieredPackagePrice::Minimum? attr_accessor minimum_amount: String? @@ -3317,33 +7954,33 @@ module Orb attr_accessor price_type: Orb::Models::Price::MaxGroupTieredPackagePrice::price_type - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::MaxGroupTieredPackagePrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::MaxGroupTieredPackagePrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::MaxGroupTieredPackagePrice::BillingCycleConfiguration, cadence: Orb::Models::Price::MaxGroupTieredPackagePrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::MaxGroupTieredPackagePrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - max_group_tiered_package_config: Orb::Models::custom_rating_function_config_model, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::MaxGroupTieredPackagePrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::MaxGroupTieredPackagePrice::Item, + max_group_tiered_package_config: ::Hash[Symbol, top], + maximum: Orb::Models::Price::MaxGroupTieredPackagePrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::MaxGroupTieredPackagePrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::MaxGroupTieredPackagePrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + dimensional_price_configuration: Orb::Models::Price::MaxGroupTieredPackagePrice::DimensionalPriceConfiguration?, model_type: :max_group_tiered_package ) -> void | ( @@ -3353,6 +7990,54 @@ module Orb def to_hash: -> Orb::Models::Price::max_group_tiered_package_price + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::MaxGroupTieredPackagePrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MaxGroupTieredPackagePrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::MaxGroupTieredPackagePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::MaxGroupTieredPackagePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::MaxGroupTieredPackagePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::MaxGroupTieredPackagePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MaxGroupTieredPackagePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::MaxGroupTieredPackagePrice::BillingCycleConfiguration::duration_unit] + end + end + type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -3367,6 +8052,115 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::MaxGroupTieredPackagePrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::MaxGroupTieredPackagePrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MaxGroupTieredPackagePrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::MaxGroupTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::MaxGroupTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::MaxGroupTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::MaxGroupTieredPackagePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MaxGroupTieredPackagePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::MaxGroupTieredPackagePrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::MaxGroupTieredPackagePrice::item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MaxGroupTieredPackagePrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::MaxGroupTieredPackagePrice::maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MaxGroupTieredPackagePrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::MaxGroupTieredPackagePrice::minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MaxGroupTieredPackagePrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -3375,42 +8169,66 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::MaxGroupTieredPackagePrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::MaxGroupTieredPackagePrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::MaxGroupTieredPackagePrice::dimensional_price_configuration + end end type scalable_matrix_with_unit_pricing_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Item, + maximum: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Minimum?, minimum_amount: String?, model_type: :scalable_matrix_with_unit_pricing, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::price_type, - scalable_matrix_with_unit_pricing_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + scalable_matrix_with_unit_pricing_config: ::Hash[Symbol, top], + dimensional_price_configuration: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::DimensionalPriceConfiguration? } class ScalableMatrixWithUnitPricingPrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::cadence @@ -3418,7 +8236,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::CreditAllocation? attr_accessor currency: String @@ -3428,17 +8246,17 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Minimum? attr_accessor minimum_amount: String? @@ -3450,35 +8268,35 @@ module Orb attr_accessor price_type: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::price_type - attr_accessor scalable_matrix_with_unit_pricing_config: Orb::Models::custom_rating_function_config_model + attr_accessor scalable_matrix_with_unit_pricing_config: ::Hash[Symbol, top] - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Item, + maximum: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::price_type, - scalable_matrix_with_unit_pricing_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + scalable_matrix_with_unit_pricing_config: ::Hash[Symbol, top], + dimensional_price_configuration: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::DimensionalPriceConfiguration?, model_type: :scalable_matrix_with_unit_pricing ) -> void | ( @@ -3488,6 +8306,54 @@ module Orb def to_hash: -> Orb::Models::Price::scalable_matrix_with_unit_pricing_price + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::duration_unit] + end + end + type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -3502,6 +8368,115 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -3510,42 +8485,66 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ScalableMatrixWithUnitPricingPrice::dimensional_price_configuration + end end type scalable_matrix_with_tiered_pricing_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Item, + maximum: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Minimum?, minimum_amount: String?, model_type: :scalable_matrix_with_tiered_pricing, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::price_type, - scalable_matrix_with_tiered_pricing_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + scalable_matrix_with_tiered_pricing_config: ::Hash[Symbol, top], + dimensional_price_configuration: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::DimensionalPriceConfiguration? } class ScalableMatrixWithTieredPricingPrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::cadence @@ -3553,7 +8552,7 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::CreditAllocation? attr_accessor currency: String @@ -3563,17 +8562,17 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Minimum? attr_accessor minimum_amount: String? @@ -3585,35 +8584,35 @@ module Orb attr_accessor price_type: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::price_type - attr_accessor scalable_matrix_with_tiered_pricing_config: Orb::Models::custom_rating_function_config_model + attr_accessor scalable_matrix_with_tiered_pricing_config: ::Hash[Symbol, top] - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, + credit_allocation: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::CreditAllocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Item, + maximum: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::price_type, - scalable_matrix_with_tiered_pricing_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + scalable_matrix_with_tiered_pricing_config: ::Hash[Symbol, top], + dimensional_price_configuration: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::DimensionalPriceConfiguration?, model_type: :scalable_matrix_with_tiered_pricing ) -> void | ( @@ -3623,6 +8622,54 @@ module Orb def to_hash: -> Orb::Models::Price::scalable_matrix_with_tiered_pricing_price + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::duration_unit] + end + end + type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -3637,6 +8684,115 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -3645,42 +8801,66 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::ScalableMatrixWithTieredPricingPrice::dimensional_price_configuration + end end type cumulative_grouped_bulk_price = { id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::CumulativeGroupedBulkPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::CumulativeGroupedBulkPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::CumulativeGroupedBulkPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - cumulative_grouped_bulk_config: Orb::Models::custom_rating_function_config_model, + credit_allocation: Orb::Models::Price::CumulativeGroupedBulkPrice::CreditAllocation?, + cumulative_grouped_bulk_config: ::Hash[Symbol, top], currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::CumulativeGroupedBulkPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::CumulativeGroupedBulkPrice::Item, + maximum: Orb::Models::Price::CumulativeGroupedBulkPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::CumulativeGroupedBulkPrice::Minimum?, minimum_amount: String?, model_type: :cumulative_grouped_bulk, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::CumulativeGroupedBulkPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + dimensional_price_configuration: Orb::Models::Price::CumulativeGroupedBulkPrice::DimensionalPriceConfiguration? } class CumulativeGroupedBulkPrice < Orb::BaseModel attr_accessor id: String - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? + attr_accessor billable_metric: Orb::Models::Price::CumulativeGroupedBulkPrice::BillableMetric? - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel + attr_accessor billing_cycle_configuration: Orb::Models::Price::CumulativeGroupedBulkPrice::BillingCycleConfiguration attr_accessor cadence: Orb::Models::Price::CumulativeGroupedBulkPrice::cadence @@ -3688,9 +8868,9 @@ module Orb attr_accessor created_at: Time - attr_accessor credit_allocation: Orb::Models::AllocationModel? + attr_accessor credit_allocation: Orb::Models::Price::CumulativeGroupedBulkPrice::CreditAllocation? - attr_accessor cumulative_grouped_bulk_config: Orb::Models::custom_rating_function_config_model + attr_accessor cumulative_grouped_bulk_config: ::Hash[Symbol, top] attr_accessor currency: String @@ -3700,17 +8880,17 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? + attr_accessor invoicing_cycle_configuration: Orb::Models::Price::CumulativeGroupedBulkPrice::InvoicingCycleConfiguration? - attr_accessor item: Orb::Models::ItemSlimModel + attr_accessor item: Orb::Models::Price::CumulativeGroupedBulkPrice::Item - attr_accessor maximum: Orb::Models::MaximumModel? + attr_accessor maximum: Orb::Models::Price::CumulativeGroupedBulkPrice::Maximum? attr_accessor maximum_amount: String? attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum: Orb::Models::MinimumModel? + attr_accessor minimum: Orb::Models::Price::CumulativeGroupedBulkPrice::Minimum? attr_accessor minimum_amount: String? @@ -3722,33 +8902,33 @@ module Orb attr_accessor price_type: Orb::Models::Price::CumulativeGroupedBulkPrice::price_type - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? + attr_accessor dimensional_price_configuration: Orb::Models::Price::CumulativeGroupedBulkPrice::DimensionalPriceConfiguration? def initialize: ( id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, + billable_metric: Orb::Models::Price::CumulativeGroupedBulkPrice::BillableMetric?, + billing_cycle_configuration: Orb::Models::Price::CumulativeGroupedBulkPrice::BillingCycleConfiguration, cadence: Orb::Models::Price::CumulativeGroupedBulkPrice::cadence, conversion_rate: Float?, created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - cumulative_grouped_bulk_config: Orb::Models::custom_rating_function_config_model, + credit_allocation: Orb::Models::Price::CumulativeGroupedBulkPrice::CreditAllocation?, + cumulative_grouped_bulk_config: ::Hash[Symbol, top], currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, + invoicing_cycle_configuration: Orb::Models::Price::CumulativeGroupedBulkPrice::InvoicingCycleConfiguration?, + item: Orb::Models::Price::CumulativeGroupedBulkPrice::Item, + maximum: Orb::Models::Price::CumulativeGroupedBulkPrice::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, + minimum: Orb::Models::Price::CumulativeGroupedBulkPrice::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, price_type: Orb::Models::Price::CumulativeGroupedBulkPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, + dimensional_price_configuration: Orb::Models::Price::CumulativeGroupedBulkPrice::DimensionalPriceConfiguration?, model_type: :cumulative_grouped_bulk ) -> void | ( @@ -3758,6 +8938,54 @@ module Orb def to_hash: -> Orb::Models::Price::cumulative_grouped_bulk_price + type billable_metric = { id: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + def initialize: + (id: String) -> void + | ( + ?Orb::Models::Price::CumulativeGroupedBulkPrice::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::CumulativeGroupedBulkPrice::billable_metric + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::CumulativeGroupedBulkPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::CumulativeGroupedBulkPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::CumulativeGroupedBulkPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::CumulativeGroupedBulkPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::CumulativeGroupedBulkPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::CumulativeGroupedBulkPrice::BillingCycleConfiguration::duration_unit] + end + end + type cadence = :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom @@ -3772,6 +9000,115 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::CumulativeGroupedBulkPrice::cadence] end + type credit_allocation = { allows_rollover: bool, currency: String } + + class CreditAllocation < Orb::BaseModel + attr_accessor allows_rollover: bool + + attr_accessor currency: String + + def initialize: + (allows_rollover: bool, currency: String) -> void + | ( + ?Orb::Models::Price::CumulativeGroupedBulkPrice::credit_allocation + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::CumulativeGroupedBulkPrice::credit_allocation + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::Price::CumulativeGroupedBulkPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::Price::CumulativeGroupedBulkPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::Price::CumulativeGroupedBulkPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::Price::CumulativeGroupedBulkPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::CumulativeGroupedBulkPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::Price::CumulativeGroupedBulkPrice::InvoicingCycleConfiguration::duration_unit] + end + end + + type item = { id: String, name: String } + + class Item < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::Price::CumulativeGroupedBulkPrice::item + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::CumulativeGroupedBulkPrice::item + end + + type maximum = + { applies_to_price_ids: ::Array[String], maximum_amount: String } + + class Maximum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String + ) -> void + | ( + ?Orb::Models::Price::CumulativeGroupedBulkPrice::maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::CumulativeGroupedBulkPrice::maximum + end + + type minimum = + { applies_to_price_ids: ::Array[String], minimum_amount: String } + + class Minimum < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor minimum_amount: String + + def initialize: + ( + applies_to_price_ids: ::Array[String], + minimum_amount: String + ) -> void + | ( + ?Orb::Models::Price::CumulativeGroupedBulkPrice::minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::CumulativeGroupedBulkPrice::minimum + end + type price_type = :usage_price | :fixed_price class PriceType < Orb::Enum @@ -3780,6 +9117,30 @@ module Orb def self.values: -> ::Array[Orb::Models::Price::CumulativeGroupedBulkPrice::price_type] end + + type dimensional_price_configuration = + { + dimension_values: ::Array[String], + dimensional_price_group_id: String + } + + class DimensionalPriceConfiguration < Orb::BaseModel + attr_accessor dimension_values: ::Array[String] + + attr_accessor dimensional_price_group_id: String + + def initialize: + ( + dimension_values: ::Array[String], + dimensional_price_group_id: String + ) -> void + | ( + ?Orb::Models::Price::CumulativeGroupedBulkPrice::dimensional_price_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Price::CumulativeGroupedBulkPrice::dimensional_price_configuration + end end private def self.variants: -> [[:unit, Orb::Models::Price::UnitPrice], [:package, Orb::Models::Price::PackagePrice], [:matrix, Orb::Models::Price::MatrixPrice], [:tiered, Orb::Models::Price::TieredPrice], [:tiered_bps, Orb::Models::Price::TieredBpsPrice], [:bps, Orb::Models::Price::BpsPrice], [:bulk_bps, Orb::Models::Price::BulkBpsPrice], [:bulk, Orb::Models::Price::BulkPrice], [:threshold_total_amount, Orb::Models::Price::ThresholdTotalAmountPrice], [:tiered_package, Orb::Models::Price::TieredPackagePrice], [:grouped_tiered, Orb::Models::Price::GroupedTieredPrice], [:tiered_with_minimum, Orb::Models::Price::TieredWithMinimumPrice], [:tiered_package_with_minimum, Orb::Models::Price::TieredPackageWithMinimumPrice], [:package_with_allocation, Orb::Models::Price::PackageWithAllocationPrice], [:unit_with_percent, Orb::Models::Price::UnitWithPercentPrice], [:matrix_with_allocation, Orb::Models::Price::MatrixWithAllocationPrice], [:tiered_with_proration, Orb::Models::Price::TieredWithProrationPrice], [:unit_with_proration, Orb::Models::Price::UnitWithProrationPrice], [:grouped_allocation, Orb::Models::Price::GroupedAllocationPrice], [:grouped_with_prorated_minimum, Orb::Models::Price::GroupedWithProratedMinimumPrice], [:grouped_with_metered_minimum, Orb::Models::Price::GroupedWithMeteredMinimumPrice], [:matrix_with_display_name, Orb::Models::Price::MatrixWithDisplayNamePrice], [:bulk_with_proration, Orb::Models::Price::BulkWithProrationPrice], [:grouped_tiered_package, Orb::Models::Price::GroupedTieredPackagePrice], [:max_group_tiered_package, Orb::Models::Price::MaxGroupTieredPackagePrice], [:scalable_matrix_with_unit_pricing, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice], [:scalable_matrix_with_tiered_pricing, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice], [:cumulative_grouped_bulk, Orb::Models::Price::CumulativeGroupedBulkPrice]] diff --git a/sig/orb/models/price_create_params.rbs b/sig/orb/models/price_create_params.rbs index 9b122545..fc176747 100644 --- a/sig/orb/models/price_create_params.rbs +++ b/sig/orb/models/price_create_params.rbs @@ -1,23 +1,584 @@ module Orb module Models type price_create_params = - { new_floating_price_model: Orb::Models::new_floating_price_model } + { + cadence: Orb::Models::PriceCreateParams::cadence, + currency: String, + item_id: String, + model_type: Orb::Models::PriceCreateParams::model_type, + name: String, + unit_config: Orb::Models::PriceCreateParams::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::PriceCreateParams::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::PriceCreateParams::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + package_config: Orb::Models::PriceCreateParams::PackageConfig, + matrix_config: Orb::Models::PriceCreateParams::MatrixConfig, + matrix_with_allocation_config: Orb::Models::PriceCreateParams::MatrixWithAllocationConfig, + tiered_config: Orb::Models::PriceCreateParams::TieredConfig, + tiered_bps_config: Orb::Models::PriceCreateParams::TieredBpsConfig, + bps_config: Orb::Models::PriceCreateParams::BpsConfig, + bulk_bps_config: Orb::Models::PriceCreateParams::BulkBpsConfig, + bulk_config: Orb::Models::PriceCreateParams::BulkConfig, + threshold_total_amount_config: ::Hash[Symbol, top], + tiered_package_config: ::Hash[Symbol, top], + grouped_tiered_config: ::Hash[Symbol, top], + max_group_tiered_package_config: ::Hash[Symbol, top], + tiered_with_minimum_config: ::Hash[Symbol, top], + package_with_allocation_config: ::Hash[Symbol, top], + tiered_package_with_minimum_config: ::Hash[Symbol, top], + unit_with_percent_config: ::Hash[Symbol, top], + tiered_with_proration_config: ::Hash[Symbol, top], + unit_with_proration_config: ::Hash[Symbol, top], + grouped_allocation_config: ::Hash[Symbol, top], + grouped_with_prorated_minimum_config: ::Hash[Symbol, top], + grouped_with_metered_minimum_config: ::Hash[Symbol, top], + matrix_with_display_name_config: ::Hash[Symbol, top], + bulk_with_proration_config: ::Hash[Symbol, top], + grouped_tiered_package_config: ::Hash[Symbol, top], + scalable_matrix_with_unit_pricing_config: ::Hash[Symbol, top], + scalable_matrix_with_tiered_pricing_config: ::Hash[Symbol, top], + cumulative_grouped_bulk_config: ::Hash[Symbol, top] + } & Orb::request_parameters class PriceCreateParams < Orb::BaseModel extend Orb::RequestParameters::Converter include Orb::RequestParameters - attr_accessor new_floating_price_model: Orb::Models::new_floating_price_model + attr_accessor cadence: Orb::Models::PriceCreateParams::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor model_type: Orb::Models::PriceCreateParams::model_type + + attr_accessor name: String + + attr_accessor unit_config: Orb::Models::PriceCreateParams::UnitConfig + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::PriceCreateParams::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::PriceCreateParams::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor package_config: Orb::Models::PriceCreateParams::PackageConfig + + attr_accessor matrix_config: Orb::Models::PriceCreateParams::MatrixConfig + + attr_accessor matrix_with_allocation_config: Orb::Models::PriceCreateParams::MatrixWithAllocationConfig + + attr_accessor tiered_config: Orb::Models::PriceCreateParams::TieredConfig + + attr_accessor tiered_bps_config: Orb::Models::PriceCreateParams::TieredBpsConfig + + attr_accessor bps_config: Orb::Models::PriceCreateParams::BpsConfig + + attr_accessor bulk_bps_config: Orb::Models::PriceCreateParams::BulkBpsConfig + + attr_accessor bulk_config: Orb::Models::PriceCreateParams::BulkConfig + + attr_accessor threshold_total_amount_config: ::Hash[Symbol, top] + + attr_accessor tiered_package_config: ::Hash[Symbol, top] + + attr_accessor grouped_tiered_config: ::Hash[Symbol, top] + + attr_accessor max_group_tiered_package_config: ::Hash[Symbol, top] + + attr_accessor tiered_with_minimum_config: ::Hash[Symbol, top] + + attr_accessor package_with_allocation_config: ::Hash[Symbol, top] + + attr_accessor tiered_package_with_minimum_config: ::Hash[Symbol, top] + + attr_accessor unit_with_percent_config: ::Hash[Symbol, top] + + attr_accessor tiered_with_proration_config: ::Hash[Symbol, top] + + attr_accessor unit_with_proration_config: ::Hash[Symbol, top] + + attr_accessor grouped_allocation_config: ::Hash[Symbol, top] + + attr_accessor grouped_with_prorated_minimum_config: ::Hash[Symbol, top] + + attr_accessor grouped_with_metered_minimum_config: ::Hash[Symbol, top] + + attr_accessor matrix_with_display_name_config: ::Hash[Symbol, top] + + attr_accessor bulk_with_proration_config: ::Hash[Symbol, top] + + attr_accessor grouped_tiered_package_config: ::Hash[Symbol, top] + + attr_accessor scalable_matrix_with_unit_pricing_config: ::Hash[Symbol, top] + + attr_accessor scalable_matrix_with_tiered_pricing_config: ::Hash[Symbol, top] + + attr_accessor cumulative_grouped_bulk_config: ::Hash[Symbol, top] def initialize: ( - new_floating_price_model: Orb::Models::new_floating_price_model, + cadence: Orb::Models::PriceCreateParams::cadence, + currency: String, + item_id: String, + model_type: Orb::Models::PriceCreateParams::model_type, + name: String, + unit_config: Orb::Models::PriceCreateParams::UnitConfig, + package_config: Orb::Models::PriceCreateParams::PackageConfig, + matrix_config: Orb::Models::PriceCreateParams::MatrixConfig, + matrix_with_allocation_config: Orb::Models::PriceCreateParams::MatrixWithAllocationConfig, + tiered_config: Orb::Models::PriceCreateParams::TieredConfig, + tiered_bps_config: Orb::Models::PriceCreateParams::TieredBpsConfig, + bps_config: Orb::Models::PriceCreateParams::BpsConfig, + bulk_bps_config: Orb::Models::PriceCreateParams::BulkBpsConfig, + bulk_config: Orb::Models::PriceCreateParams::BulkConfig, + threshold_total_amount_config: ::Hash[Symbol, top], + tiered_package_config: ::Hash[Symbol, top], + grouped_tiered_config: ::Hash[Symbol, top], + max_group_tiered_package_config: ::Hash[Symbol, top], + tiered_with_minimum_config: ::Hash[Symbol, top], + package_with_allocation_config: ::Hash[Symbol, top], + tiered_package_with_minimum_config: ::Hash[Symbol, top], + unit_with_percent_config: ::Hash[Symbol, top], + tiered_with_proration_config: ::Hash[Symbol, top], + unit_with_proration_config: ::Hash[Symbol, top], + grouped_allocation_config: ::Hash[Symbol, top], + grouped_with_prorated_minimum_config: ::Hash[Symbol, top], + grouped_with_metered_minimum_config: ::Hash[Symbol, top], + matrix_with_display_name_config: ::Hash[Symbol, top], + bulk_with_proration_config: ::Hash[Symbol, top], + grouped_tiered_package_config: ::Hash[Symbol, top], + scalable_matrix_with_unit_pricing_config: ::Hash[Symbol, top], + scalable_matrix_with_tiered_pricing_config: ::Hash[Symbol, top], + cumulative_grouped_bulk_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::PriceCreateParams::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::PriceCreateParams::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, request_options: Orb::request_opts ) -> void | (?Orb::Models::price_create_params | Orb::BaseModel data) -> void def to_hash: -> Orb::Models::price_create_params + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::PriceCreateParams::cadence] + end + + type model_type = :cumulative_grouped_bulk + + class ModelType < Orb::Enum + CUMULATIVE_GROUPED_BULK: :cumulative_grouped_bulk + + def self.values: -> ::Array[Orb::Models::PriceCreateParams::model_type] + end + + type unit_config = { unit_amount: String } + + class UnitConfig < Orb::BaseModel + attr_accessor unit_amount: String + + def initialize: + (unit_amount: String) -> void + | ( + ?Orb::Models::PriceCreateParams::unit_config | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PriceCreateParams::unit_config + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PriceCreateParams::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PriceCreateParams::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PriceCreateParams::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PriceCreateParams::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PriceCreateParams::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PriceCreateParams::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::PriceCreateParams::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::PriceCreateParams::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::PriceCreateParams::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::PriceCreateParams::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PriceCreateParams::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::PriceCreateParams::InvoicingCycleConfiguration::duration_unit] + end + end + + type package_config = { package_amount: String, package_size: Integer } + + class PackageConfig < Orb::BaseModel + attr_accessor package_amount: String + + attr_accessor package_size: Integer + + def initialize: + (package_amount: String, package_size: Integer) -> void + | ( + ?Orb::Models::PriceCreateParams::package_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PriceCreateParams::package_config + end + + type matrix_config = + { + default_unit_amount: String, + dimensions: ::Array[String?], + matrix_values: ::Array[Orb::Models::PriceCreateParams::MatrixConfig::MatrixValue] + } + + class MatrixConfig < Orb::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor matrix_values: ::Array[Orb::Models::PriceCreateParams::MatrixConfig::MatrixValue] + + def initialize: + ( + default_unit_amount: String, + dimensions: ::Array[String?], + matrix_values: ::Array[Orb::Models::PriceCreateParams::MatrixConfig::MatrixValue] + ) -> void + | ( + ?Orb::Models::PriceCreateParams::matrix_config | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PriceCreateParams::matrix_config + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: + (dimension_values: ::Array[String?], unit_amount: String) -> void + | ( + ?Orb::Models::PriceCreateParams::MatrixConfig::matrix_value + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PriceCreateParams::MatrixConfig::matrix_value + end + end + + type matrix_with_allocation_config = + { + allocation: Float, + default_unit_amount: String, + dimensions: ::Array[String?], + matrix_values: ::Array[Orb::Models::PriceCreateParams::MatrixWithAllocationConfig::MatrixValue] + } + + class MatrixWithAllocationConfig < Orb::BaseModel + attr_accessor allocation: Float + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor matrix_values: ::Array[Orb::Models::PriceCreateParams::MatrixWithAllocationConfig::MatrixValue] + + def initialize: + ( + allocation: Float, + default_unit_amount: String, + dimensions: ::Array[String?], + matrix_values: ::Array[Orb::Models::PriceCreateParams::MatrixWithAllocationConfig::MatrixValue] + ) -> void + | ( + ?Orb::Models::PriceCreateParams::matrix_with_allocation_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PriceCreateParams::matrix_with_allocation_config + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: + (dimension_values: ::Array[String?], unit_amount: String) -> void + | ( + ?Orb::Models::PriceCreateParams::MatrixWithAllocationConfig::matrix_value + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PriceCreateParams::MatrixWithAllocationConfig::matrix_value + end + end + + type tiered_config = + { tiers: ::Array[Orb::Models::PriceCreateParams::TieredConfig::Tier] } + + class TieredConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::PriceCreateParams::TieredConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::PriceCreateParams::TieredConfig::Tier] + ) -> void + | ( + ?Orb::Models::PriceCreateParams::tiered_config | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PriceCreateParams::tiered_config + + type tier = + { first_unit: Float, unit_amount: String, last_unit: Float? } + + class Tier < Orb::BaseModel + attr_accessor first_unit: Float + + attr_accessor unit_amount: String + + attr_accessor last_unit: Float? + + def initialize: + (first_unit: Float, unit_amount: String, last_unit: Float?) -> void + | ( + ?Orb::Models::PriceCreateParams::TieredConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PriceCreateParams::TieredConfig::tier + end + end + + type tiered_bps_config = + { + tiers: ::Array[Orb::Models::PriceCreateParams::TieredBpsConfig::Tier] + } + + class TieredBpsConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::PriceCreateParams::TieredBpsConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::PriceCreateParams::TieredBpsConfig::Tier] + ) -> void + | ( + ?Orb::Models::PriceCreateParams::tiered_bps_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PriceCreateParams::tiered_bps_config + + type tier = + { + bps: Float, + minimum_amount: String, + maximum_amount: String?, + per_unit_maximum: String? + } + + class Tier < Orb::BaseModel + attr_accessor bps: Float + + attr_accessor minimum_amount: String + + attr_accessor maximum_amount: String? + + attr_accessor per_unit_maximum: String? + + def initialize: + ( + bps: Float, + minimum_amount: String, + maximum_amount: String?, + per_unit_maximum: String? + ) -> void + | ( + ?Orb::Models::PriceCreateParams::TieredBpsConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PriceCreateParams::TieredBpsConfig::tier + end + end + + type bps_config = { bps: Float, per_unit_maximum: String? } + + class BpsConfig < Orb::BaseModel + attr_accessor bps: Float + + attr_accessor per_unit_maximum: String? + + def initialize: + (bps: Float, per_unit_maximum: String?) -> void + | ( + ?Orb::Models::PriceCreateParams::bps_config | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PriceCreateParams::bps_config + end + + type bulk_bps_config = + { tiers: ::Array[Orb::Models::PriceCreateParams::BulkBpsConfig::Tier] } + + class BulkBpsConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::PriceCreateParams::BulkBpsConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::PriceCreateParams::BulkBpsConfig::Tier] + ) -> void + | ( + ?Orb::Models::PriceCreateParams::bulk_bps_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PriceCreateParams::bulk_bps_config + + type tier = + { bps: Float, maximum_amount: String?, per_unit_maximum: String? } + + class Tier < Orb::BaseModel + attr_accessor bps: Float + + attr_accessor maximum_amount: String? + + attr_accessor per_unit_maximum: String? + + def initialize: + ( + bps: Float, + maximum_amount: String?, + per_unit_maximum: String? + ) -> void + | ( + ?Orb::Models::PriceCreateParams::BulkBpsConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PriceCreateParams::BulkBpsConfig::tier + end + end + + type bulk_config = + { tiers: ::Array[Orb::Models::PriceCreateParams::BulkConfig::Tier] } + + class BulkConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::PriceCreateParams::BulkConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::PriceCreateParams::BulkConfig::Tier] + ) -> void + | ( + ?Orb::Models::PriceCreateParams::bulk_config | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PriceCreateParams::bulk_config + + type tier = { unit_amount: String, maximum_units: Float? } + + class Tier < Orb::BaseModel + attr_accessor unit_amount: String + + attr_accessor maximum_units: Float? + + def initialize: + (unit_amount: String, maximum_units: Float?) -> void + | ( + ?Orb::Models::PriceCreateParams::BulkConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::PriceCreateParams::BulkConfig::tier + end + end end end end diff --git a/sig/orb/models/price_interval_fixed_fee_quantity_transition_model.rbs b/sig/orb/models/price_interval_fixed_fee_quantity_transition_model.rbs deleted file mode 100644 index 449ec3c5..00000000 --- a/sig/orb/models/price_interval_fixed_fee_quantity_transition_model.rbs +++ /dev/null @@ -1,21 +0,0 @@ -module Orb - module Models - type price_interval_fixed_fee_quantity_transition_model = - { effective_date: Time, quantity: Integer } - - class PriceIntervalFixedFeeQuantityTransitionModel < Orb::BaseModel - attr_accessor effective_date: Time - - attr_accessor quantity: Integer - - def initialize: - (effective_date: Time, quantity: Integer) -> void - | ( - ?Orb::Models::price_interval_fixed_fee_quantity_transition_model - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::price_interval_fixed_fee_quantity_transition_model - end - end -end diff --git a/sig/orb/models/price_interval_model.rbs b/sig/orb/models/price_interval_model.rbs deleted file mode 100644 index c0658375..00000000 --- a/sig/orb/models/price_interval_model.rbs +++ /dev/null @@ -1,76 +0,0 @@ -module Orb - module Models - type price_interval_model = - { - id: String, - billing_cycle_day: Integer, - current_billing_period_end_date: Time?, - current_billing_period_start_date: Time?, - end_date: Time?, - filter: String?, - fixed_fee_quantity_transitions: ::Array[Orb::Models::PriceIntervalModel::FixedFeeQuantityTransition]?, - price: Orb::Models::price_model, - start_date: Time, - usage_customer_ids: ::Array[String]? - } - - class PriceIntervalModel < Orb::BaseModel - attr_accessor id: String - - attr_accessor billing_cycle_day: Integer - - attr_accessor current_billing_period_end_date: Time? - - attr_accessor current_billing_period_start_date: Time? - - attr_accessor end_date: Time? - - attr_accessor filter: String? - - attr_accessor fixed_fee_quantity_transitions: ::Array[Orb::Models::PriceIntervalModel::FixedFeeQuantityTransition]? - - attr_accessor price: Orb::Models::price_model - - attr_accessor start_date: Time - - attr_accessor usage_customer_ids: ::Array[String]? - - def initialize: - ( - id: String, - billing_cycle_day: Integer, - current_billing_period_end_date: Time?, - current_billing_period_start_date: Time?, - end_date: Time?, - filter: String?, - fixed_fee_quantity_transitions: ::Array[Orb::Models::PriceIntervalModel::FixedFeeQuantityTransition]?, - price: Orb::Models::price_model, - start_date: Time, - usage_customer_ids: ::Array[String]? - ) -> void - | (?Orb::Models::price_interval_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::price_interval_model - - type fixed_fee_quantity_transition = - { effective_date: Time, price_id: String, quantity: Integer } - - class FixedFeeQuantityTransition < Orb::BaseModel - attr_accessor effective_date: Time - - attr_accessor price_id: String - - attr_accessor quantity: Integer - - def initialize: - (effective_date: Time, price_id: String, quantity: Integer) -> void - | ( - ?Orb::Models::PriceIntervalModel::fixed_fee_quantity_transition - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceIntervalModel::fixed_fee_quantity_transition - end - end - end -end diff --git a/sig/orb/models/price_model.rbs b/sig/orb/models/price_model.rbs deleted file mode 100644 index 9b124292..00000000 --- a/sig/orb/models/price_model.rbs +++ /dev/null @@ -1,3801 +0,0 @@ -module Orb - module Models - type price_model = - Orb::Models::PriceModel::UnitPrice - | Orb::Models::PriceModel::PackagePrice - | Orb::Models::PriceModel::MatrixPrice - | Orb::Models::PriceModel::TieredPrice - | Orb::Models::PriceModel::TieredBpsPrice - | Orb::Models::PriceModel::BpsPrice - | Orb::Models::PriceModel::BulkBpsPrice - | Orb::Models::PriceModel::BulkPrice - | Orb::Models::PriceModel::ThresholdTotalAmountPrice - | Orb::Models::PriceModel::TieredPackagePrice - | Orb::Models::PriceModel::GroupedTieredPrice - | Orb::Models::PriceModel::TieredWithMinimumPrice - | Orb::Models::PriceModel::TieredPackageWithMinimumPrice - | Orb::Models::PriceModel::PackageWithAllocationPrice - | Orb::Models::PriceModel::UnitWithPercentPrice - | Orb::Models::PriceModel::MatrixWithAllocationPrice - | Orb::Models::PriceModel::TieredWithProrationPrice - | Orb::Models::PriceModel::UnitWithProrationPrice - | Orb::Models::PriceModel::GroupedAllocationPrice - | Orb::Models::PriceModel::GroupedWithProratedMinimumPrice - | Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice - | Orb::Models::PriceModel::MatrixWithDisplayNamePrice - | Orb::Models::PriceModel::BulkWithProrationPrice - | Orb::Models::PriceModel::GroupedTieredPackagePrice - | Orb::Models::PriceModel::MaxGroupTieredPackagePrice - | Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice - | Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice - | Orb::Models::PriceModel::CumulativeGroupedBulkPrice - - class PriceModel < Orb::Union - type unit_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::UnitPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :unit, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::UnitPrice::price_type, - unit_config: Orb::Models::UnitConfigModel, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class UnitPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::UnitPrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :unit - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::UnitPrice::price_type - - attr_accessor unit_config: Orb::Models::UnitConfigModel - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::UnitPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::UnitPrice::price_type, - unit_config: Orb::Models::UnitConfigModel, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :unit - ) -> void - | (?Orb::Models::PriceModel::unit_price | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::PriceModel::unit_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::UnitPrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::UnitPrice::price_type] - end - end - - type package_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::PackagePrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :package, - name: String, - package_config: Orb::Models::PackageConfigModel, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::PackagePrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class PackagePrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::PackagePrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :package - - attr_accessor name: String - - attr_accessor package_config: Orb::Models::PackageConfigModel - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::PackagePrice::price_type - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::PackagePrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - package_config: Orb::Models::PackageConfigModel, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::PackagePrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :package - ) -> void - | ( - ?Orb::Models::PriceModel::package_price | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::package_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::PackagePrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::PackagePrice::price_type] - end - end - - type matrix_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::MatrixPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - matrix_config: Orb::Models::MatrixConfigModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :matrix, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::MatrixPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class MatrixPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::MatrixPrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor matrix_config: Orb::Models::MatrixConfigModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :matrix - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::MatrixPrice::price_type - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::MatrixPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - matrix_config: Orb::Models::MatrixConfigModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::MatrixPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :matrix - ) -> void - | ( - ?Orb::Models::PriceModel::matrix_price | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::matrix_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::MatrixPrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::MatrixPrice::price_type] - end - end - - type tiered_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::TieredPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :tiered, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::TieredPrice::price_type, - tiered_config: Orb::Models::TieredConfigModel, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class TieredPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::TieredPrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :tiered - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::TieredPrice::price_type - - attr_accessor tiered_config: Orb::Models::TieredConfigModel - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::TieredPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::TieredPrice::price_type, - tiered_config: Orb::Models::TieredConfigModel, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :tiered - ) -> void - | ( - ?Orb::Models::PriceModel::tiered_price | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::tiered_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::TieredPrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::TieredPrice::price_type] - end - end - - type tiered_bps_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::TieredBpsPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :tiered_bps, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::TieredBpsPrice::price_type, - tiered_bps_config: Orb::Models::TieredBpsConfigModel, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class TieredBpsPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::TieredBpsPrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :tiered_bps - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::TieredBpsPrice::price_type - - attr_accessor tiered_bps_config: Orb::Models::TieredBpsConfigModel - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::TieredBpsPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::TieredBpsPrice::price_type, - tiered_bps_config: Orb::Models::TieredBpsConfigModel, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :tiered_bps - ) -> void - | ( - ?Orb::Models::PriceModel::tiered_bps_price | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::tiered_bps_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::TieredBpsPrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::TieredBpsPrice::price_type] - end - end - - type bps_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bps_config: Orb::Models::BpsConfigModel, - cadence: Orb::Models::PriceModel::BpsPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :bps, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::BpsPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class BpsPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor bps_config: Orb::Models::BpsConfigModel - - attr_accessor cadence: Orb::Models::PriceModel::BpsPrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :bps - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::BpsPrice::price_type - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bps_config: Orb::Models::BpsConfigModel, - cadence: Orb::Models::PriceModel::BpsPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::BpsPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :bps - ) -> void - | (?Orb::Models::PriceModel::bps_price | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::PriceModel::bps_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::BpsPrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::BpsPrice::price_type] - end - end - - type bulk_bps_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_bps_config: Orb::Models::BulkBpsConfigModel, - cadence: Orb::Models::PriceModel::BulkBpsPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :bulk_bps, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::BulkBpsPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class BulkBpsPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor bulk_bps_config: Orb::Models::BulkBpsConfigModel - - attr_accessor cadence: Orb::Models::PriceModel::BulkBpsPrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :bulk_bps - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::BulkBpsPrice::price_type - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_bps_config: Orb::Models::BulkBpsConfigModel, - cadence: Orb::Models::PriceModel::BulkBpsPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::BulkBpsPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :bulk_bps - ) -> void - | ( - ?Orb::Models::PriceModel::bulk_bps_price | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::bulk_bps_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::BulkBpsPrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::BulkBpsPrice::price_type] - end - end - - type bulk_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_config: Orb::Models::BulkConfigModel, - cadence: Orb::Models::PriceModel::BulkPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :bulk, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::BulkPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class BulkPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor bulk_config: Orb::Models::BulkConfigModel - - attr_accessor cadence: Orb::Models::PriceModel::BulkPrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :bulk - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::BulkPrice::price_type - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_config: Orb::Models::BulkConfigModel, - cadence: Orb::Models::PriceModel::BulkPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::BulkPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :bulk - ) -> void - | (?Orb::Models::PriceModel::bulk_price | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::PriceModel::bulk_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::BulkPrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::BulkPrice::price_type] - end - end - - type threshold_total_amount_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::ThresholdTotalAmountPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :threshold_total_amount, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::ThresholdTotalAmountPrice::price_type, - threshold_total_amount_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class ThresholdTotalAmountPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::ThresholdTotalAmountPrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :threshold_total_amount - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::ThresholdTotalAmountPrice::price_type - - attr_accessor threshold_total_amount_config: Orb::Models::custom_rating_function_config_model - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::ThresholdTotalAmountPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::ThresholdTotalAmountPrice::price_type, - threshold_total_amount_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :threshold_total_amount - ) -> void - | ( - ?Orb::Models::PriceModel::threshold_total_amount_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::threshold_total_amount_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::ThresholdTotalAmountPrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::ThresholdTotalAmountPrice::price_type] - end - end - - type tiered_package_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::TieredPackagePrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :tiered_package, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::TieredPackagePrice::price_type, - tiered_package_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class TieredPackagePrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::TieredPackagePrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :tiered_package - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::TieredPackagePrice::price_type - - attr_accessor tiered_package_config: Orb::Models::custom_rating_function_config_model - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::TieredPackagePrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::TieredPackagePrice::price_type, - tiered_package_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :tiered_package - ) -> void - | ( - ?Orb::Models::PriceModel::tiered_package_price | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::tiered_package_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::TieredPackagePrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::TieredPackagePrice::price_type] - end - end - - type grouped_tiered_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::GroupedTieredPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - grouped_tiered_config: Orb::Models::custom_rating_function_config_model, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :grouped_tiered, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::GroupedTieredPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class GroupedTieredPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::GroupedTieredPrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor grouped_tiered_config: Orb::Models::custom_rating_function_config_model - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :grouped_tiered - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::GroupedTieredPrice::price_type - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::GroupedTieredPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - grouped_tiered_config: Orb::Models::custom_rating_function_config_model, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::GroupedTieredPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :grouped_tiered - ) -> void - | ( - ?Orb::Models::PriceModel::grouped_tiered_price | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::grouped_tiered_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::GroupedTieredPrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::GroupedTieredPrice::price_type] - end - end - - type tiered_with_minimum_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::TieredWithMinimumPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :tiered_with_minimum, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::TieredWithMinimumPrice::price_type, - tiered_with_minimum_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class TieredWithMinimumPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::TieredWithMinimumPrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :tiered_with_minimum - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::TieredWithMinimumPrice::price_type - - attr_accessor tiered_with_minimum_config: Orb::Models::custom_rating_function_config_model - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::TieredWithMinimumPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::TieredWithMinimumPrice::price_type, - tiered_with_minimum_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :tiered_with_minimum - ) -> void - | ( - ?Orb::Models::PriceModel::tiered_with_minimum_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::tiered_with_minimum_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::TieredWithMinimumPrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::TieredWithMinimumPrice::price_type] - end - end - - type tiered_package_with_minimum_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::TieredPackageWithMinimumPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :tiered_package_with_minimum, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::TieredPackageWithMinimumPrice::price_type, - tiered_package_with_minimum_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class TieredPackageWithMinimumPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::TieredPackageWithMinimumPrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :tiered_package_with_minimum - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::TieredPackageWithMinimumPrice::price_type - - attr_accessor tiered_package_with_minimum_config: Orb::Models::custom_rating_function_config_model - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::TieredPackageWithMinimumPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::TieredPackageWithMinimumPrice::price_type, - tiered_package_with_minimum_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :tiered_package_with_minimum - ) -> void - | ( - ?Orb::Models::PriceModel::tiered_package_with_minimum_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::tiered_package_with_minimum_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::TieredPackageWithMinimumPrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::TieredPackageWithMinimumPrice::price_type] - end - end - - type package_with_allocation_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::PackageWithAllocationPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :package_with_allocation, - name: String, - package_with_allocation_config: Orb::Models::custom_rating_function_config_model, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::PackageWithAllocationPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class PackageWithAllocationPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::PackageWithAllocationPrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :package_with_allocation - - attr_accessor name: String - - attr_accessor package_with_allocation_config: Orb::Models::custom_rating_function_config_model - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::PackageWithAllocationPrice::price_type - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::PackageWithAllocationPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - package_with_allocation_config: Orb::Models::custom_rating_function_config_model, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::PackageWithAllocationPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :package_with_allocation - ) -> void - | ( - ?Orb::Models::PriceModel::package_with_allocation_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::package_with_allocation_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::PackageWithAllocationPrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::PackageWithAllocationPrice::price_type] - end - end - - type unit_with_percent_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::UnitWithPercentPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :unit_with_percent, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::UnitWithPercentPrice::price_type, - unit_with_percent_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class UnitWithPercentPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::UnitWithPercentPrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :unit_with_percent - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::UnitWithPercentPrice::price_type - - attr_accessor unit_with_percent_config: Orb::Models::custom_rating_function_config_model - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::UnitWithPercentPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::UnitWithPercentPrice::price_type, - unit_with_percent_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :unit_with_percent - ) -> void - | ( - ?Orb::Models::PriceModel::unit_with_percent_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::unit_with_percent_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::UnitWithPercentPrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::UnitWithPercentPrice::price_type] - end - end - - type matrix_with_allocation_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::MatrixWithAllocationPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - matrix_with_allocation_config: Orb::Models::MatrixWithAllocationConfigModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :matrix_with_allocation, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::MatrixWithAllocationPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class MatrixWithAllocationPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::MatrixWithAllocationPrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor matrix_with_allocation_config: Orb::Models::MatrixWithAllocationConfigModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :matrix_with_allocation - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::MatrixWithAllocationPrice::price_type - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::MatrixWithAllocationPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - matrix_with_allocation_config: Orb::Models::MatrixWithAllocationConfigModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::MatrixWithAllocationPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :matrix_with_allocation - ) -> void - | ( - ?Orb::Models::PriceModel::matrix_with_allocation_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::matrix_with_allocation_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::MatrixWithAllocationPrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::MatrixWithAllocationPrice::price_type] - end - end - - type tiered_with_proration_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::TieredWithProrationPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :tiered_with_proration, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::TieredWithProrationPrice::price_type, - tiered_with_proration_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class TieredWithProrationPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::TieredWithProrationPrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :tiered_with_proration - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::TieredWithProrationPrice::price_type - - attr_accessor tiered_with_proration_config: Orb::Models::custom_rating_function_config_model - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::TieredWithProrationPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::TieredWithProrationPrice::price_type, - tiered_with_proration_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :tiered_with_proration - ) -> void - | ( - ?Orb::Models::PriceModel::tiered_with_proration_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::tiered_with_proration_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::TieredWithProrationPrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::TieredWithProrationPrice::price_type] - end - end - - type unit_with_proration_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::UnitWithProrationPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :unit_with_proration, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::UnitWithProrationPrice::price_type, - unit_with_proration_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class UnitWithProrationPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::UnitWithProrationPrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :unit_with_proration - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::UnitWithProrationPrice::price_type - - attr_accessor unit_with_proration_config: Orb::Models::custom_rating_function_config_model - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::UnitWithProrationPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::UnitWithProrationPrice::price_type, - unit_with_proration_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :unit_with_proration - ) -> void - | ( - ?Orb::Models::PriceModel::unit_with_proration_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::unit_with_proration_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::UnitWithProrationPrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::UnitWithProrationPrice::price_type] - end - end - - type grouped_allocation_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::GroupedAllocationPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - grouped_allocation_config: Orb::Models::custom_rating_function_config_model, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :grouped_allocation, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::GroupedAllocationPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class GroupedAllocationPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::GroupedAllocationPrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor grouped_allocation_config: Orb::Models::custom_rating_function_config_model - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :grouped_allocation - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::GroupedAllocationPrice::price_type - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::GroupedAllocationPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - grouped_allocation_config: Orb::Models::custom_rating_function_config_model, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::GroupedAllocationPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :grouped_allocation - ) -> void - | ( - ?Orb::Models::PriceModel::grouped_allocation_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::grouped_allocation_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::GroupedAllocationPrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::GroupedAllocationPrice::price_type] - end - end - - type grouped_with_prorated_minimum_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::GroupedWithProratedMinimumPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - grouped_with_prorated_minimum_config: Orb::Models::custom_rating_function_config_model, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :grouped_with_prorated_minimum, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::GroupedWithProratedMinimumPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class GroupedWithProratedMinimumPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::GroupedWithProratedMinimumPrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor grouped_with_prorated_minimum_config: Orb::Models::custom_rating_function_config_model - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :grouped_with_prorated_minimum - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::GroupedWithProratedMinimumPrice::price_type - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::GroupedWithProratedMinimumPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - grouped_with_prorated_minimum_config: Orb::Models::custom_rating_function_config_model, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::GroupedWithProratedMinimumPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :grouped_with_prorated_minimum - ) -> void - | ( - ?Orb::Models::PriceModel::grouped_with_prorated_minimum_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::grouped_with_prorated_minimum_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::GroupedWithProratedMinimumPrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::GroupedWithProratedMinimumPrice::price_type] - end - end - - type grouped_with_metered_minimum_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - grouped_with_metered_minimum_config: Orb::Models::custom_rating_function_config_model, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :grouped_with_metered_minimum, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class GroupedWithMeteredMinimumPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor grouped_with_metered_minimum_config: Orb::Models::custom_rating_function_config_model - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :grouped_with_metered_minimum - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice::price_type - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - grouped_with_metered_minimum_config: Orb::Models::custom_rating_function_config_model, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :grouped_with_metered_minimum - ) -> void - | ( - ?Orb::Models::PriceModel::grouped_with_metered_minimum_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::grouped_with_metered_minimum_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice::price_type] - end - end - - type matrix_with_display_name_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::MatrixWithDisplayNamePrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - matrix_with_display_name_config: Orb::Models::custom_rating_function_config_model, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :matrix_with_display_name, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::MatrixWithDisplayNamePrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class MatrixWithDisplayNamePrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::MatrixWithDisplayNamePrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor matrix_with_display_name_config: Orb::Models::custom_rating_function_config_model - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :matrix_with_display_name - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::MatrixWithDisplayNamePrice::price_type - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::MatrixWithDisplayNamePrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - matrix_with_display_name_config: Orb::Models::custom_rating_function_config_model, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::MatrixWithDisplayNamePrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :matrix_with_display_name - ) -> void - | ( - ?Orb::Models::PriceModel::matrix_with_display_name_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::matrix_with_display_name_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::MatrixWithDisplayNamePrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::MatrixWithDisplayNamePrice::price_type] - end - end - - type bulk_with_proration_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_with_proration_config: Orb::Models::custom_rating_function_config_model, - cadence: Orb::Models::PriceModel::BulkWithProrationPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :bulk_with_proration, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::BulkWithProrationPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class BulkWithProrationPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor bulk_with_proration_config: Orb::Models::custom_rating_function_config_model - - attr_accessor cadence: Orb::Models::PriceModel::BulkWithProrationPrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :bulk_with_proration - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::BulkWithProrationPrice::price_type - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - bulk_with_proration_config: Orb::Models::custom_rating_function_config_model, - cadence: Orb::Models::PriceModel::BulkWithProrationPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::BulkWithProrationPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :bulk_with_proration - ) -> void - | ( - ?Orb::Models::PriceModel::bulk_with_proration_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::bulk_with_proration_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::BulkWithProrationPrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::BulkWithProrationPrice::price_type] - end - end - - type grouped_tiered_package_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::GroupedTieredPackagePrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - grouped_tiered_package_config: Orb::Models::custom_rating_function_config_model, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :grouped_tiered_package, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::GroupedTieredPackagePrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class GroupedTieredPackagePrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::GroupedTieredPackagePrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor grouped_tiered_package_config: Orb::Models::custom_rating_function_config_model - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :grouped_tiered_package - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::GroupedTieredPackagePrice::price_type - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::GroupedTieredPackagePrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - grouped_tiered_package_config: Orb::Models::custom_rating_function_config_model, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::GroupedTieredPackagePrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :grouped_tiered_package - ) -> void - | ( - ?Orb::Models::PriceModel::grouped_tiered_package_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::grouped_tiered_package_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::GroupedTieredPackagePrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::GroupedTieredPackagePrice::price_type] - end - end - - type max_group_tiered_package_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::MaxGroupTieredPackagePrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - max_group_tiered_package_config: Orb::Models::custom_rating_function_config_model, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :max_group_tiered_package, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::MaxGroupTieredPackagePrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class MaxGroupTieredPackagePrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::MaxGroupTieredPackagePrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor max_group_tiered_package_config: Orb::Models::custom_rating_function_config_model - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :max_group_tiered_package - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::MaxGroupTieredPackagePrice::price_type - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::MaxGroupTieredPackagePrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - max_group_tiered_package_config: Orb::Models::custom_rating_function_config_model, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::MaxGroupTieredPackagePrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :max_group_tiered_package - ) -> void - | ( - ?Orb::Models::PriceModel::max_group_tiered_package_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::max_group_tiered_package_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::MaxGroupTieredPackagePrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::MaxGroupTieredPackagePrice::price_type] - end - end - - type scalable_matrix_with_unit_pricing_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :scalable_matrix_with_unit_pricing, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice::price_type, - scalable_matrix_with_unit_pricing_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class ScalableMatrixWithUnitPricingPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :scalable_matrix_with_unit_pricing - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice::price_type - - attr_accessor scalable_matrix_with_unit_pricing_config: Orb::Models::custom_rating_function_config_model - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice::price_type, - scalable_matrix_with_unit_pricing_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :scalable_matrix_with_unit_pricing - ) -> void - | ( - ?Orb::Models::PriceModel::scalable_matrix_with_unit_pricing_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::scalable_matrix_with_unit_pricing_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice::price_type] - end - end - - type scalable_matrix_with_tiered_pricing_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :scalable_matrix_with_tiered_pricing, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice::price_type, - scalable_matrix_with_tiered_pricing_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class ScalableMatrixWithTieredPricingPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :scalable_matrix_with_tiered_pricing - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice::price_type - - attr_accessor scalable_matrix_with_tiered_pricing_config: Orb::Models::custom_rating_function_config_model - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice::price_type, - scalable_matrix_with_tiered_pricing_config: Orb::Models::custom_rating_function_config_model, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :scalable_matrix_with_tiered_pricing - ) -> void - | ( - ?Orb::Models::PriceModel::scalable_matrix_with_tiered_pricing_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::scalable_matrix_with_tiered_pricing_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice::price_type] - end - end - - type cumulative_grouped_bulk_price = - { - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::CumulativeGroupedBulkPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - cumulative_grouped_bulk_config: Orb::Models::custom_rating_function_config_model, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - model_type: :cumulative_grouped_bulk, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::CumulativeGroupedBulkPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - } - - class CumulativeGroupedBulkPrice < Orb::BaseModel - attr_accessor id: String - - attr_accessor billable_metric: Orb::Models::BillableMetricTinyModel? - - attr_accessor billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel - - attr_accessor cadence: Orb::Models::PriceModel::CumulativeGroupedBulkPrice::cadence - - attr_accessor conversion_rate: Float? - - attr_accessor created_at: Time - - attr_accessor credit_allocation: Orb::Models::AllocationModel? - - attr_accessor cumulative_grouped_bulk_config: Orb::Models::custom_rating_function_config_model - - attr_accessor currency: String - - attr_accessor discount: Orb::Models::discount? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel? - - attr_accessor item: Orb::Models::ItemSlimModel - - attr_accessor maximum: Orb::Models::MaximumModel? - - attr_accessor maximum_amount: String? - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum: Orb::Models::MinimumModel? - - attr_accessor minimum_amount: String? - - attr_accessor model_type: :cumulative_grouped_bulk - - attr_accessor name: String - - attr_accessor plan_phase_order: Integer? - - attr_accessor price_type: Orb::Models::PriceModel::CumulativeGroupedBulkPrice::price_type - - attr_accessor dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel? - - def initialize: - ( - id: String, - billable_metric: Orb::Models::BillableMetricTinyModel?, - billing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel, - cadence: Orb::Models::PriceModel::CumulativeGroupedBulkPrice::cadence, - conversion_rate: Float?, - created_at: Time, - credit_allocation: Orb::Models::AllocationModel?, - cumulative_grouped_bulk_config: Orb::Models::custom_rating_function_config_model, - currency: String, - discount: Orb::Models::discount?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoicing_cycle_configuration: Orb::Models::BillingCycleConfigurationModel?, - item: Orb::Models::ItemSlimModel, - maximum: Orb::Models::MaximumModel?, - maximum_amount: String?, - metadata: ::Hash[Symbol, String], - minimum: Orb::Models::MinimumModel?, - minimum_amount: String?, - name: String, - plan_phase_order: Integer?, - price_type: Orb::Models::PriceModel::CumulativeGroupedBulkPrice::price_type, - dimensional_price_configuration: Orb::Models::DimensionalPriceConfigurationModel?, - model_type: :cumulative_grouped_bulk - ) -> void - | ( - ?Orb::Models::PriceModel::cumulative_grouped_bulk_price - | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::PriceModel::cumulative_grouped_bulk_price - - type cadence = - :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom - - class Cadence < Orb::Enum - ONE_TIME: :one_time - MONTHLY: :monthly - QUARTERLY: :quarterly - SEMI_ANNUAL: :semi_annual - ANNUAL: :annual - CUSTOM: :custom - - def self.values: -> ::Array[Orb::Models::PriceModel::CumulativeGroupedBulkPrice::cadence] - end - - type price_type = :usage_price | :fixed_price - - class PriceType < Orb::Enum - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - - def self.values: -> ::Array[Orb::Models::PriceModel::CumulativeGroupedBulkPrice::price_type] - end - end - - private def self.variants: -> [[:unit, Orb::Models::PriceModel::UnitPrice], [:package, Orb::Models::PriceModel::PackagePrice], [:matrix, Orb::Models::PriceModel::MatrixPrice], [:tiered, Orb::Models::PriceModel::TieredPrice], [:tiered_bps, Orb::Models::PriceModel::TieredBpsPrice], [:bps, Orb::Models::PriceModel::BpsPrice], [:bulk_bps, Orb::Models::PriceModel::BulkBpsPrice], [:bulk, Orb::Models::PriceModel::BulkPrice], [:threshold_total_amount, Orb::Models::PriceModel::ThresholdTotalAmountPrice], [:tiered_package, Orb::Models::PriceModel::TieredPackagePrice], [:grouped_tiered, Orb::Models::PriceModel::GroupedTieredPrice], [:tiered_with_minimum, Orb::Models::PriceModel::TieredWithMinimumPrice], [:tiered_package_with_minimum, Orb::Models::PriceModel::TieredPackageWithMinimumPrice], [:package_with_allocation, Orb::Models::PriceModel::PackageWithAllocationPrice], [:unit_with_percent, Orb::Models::PriceModel::UnitWithPercentPrice], [:matrix_with_allocation, Orb::Models::PriceModel::MatrixWithAllocationPrice], [:tiered_with_proration, Orb::Models::PriceModel::TieredWithProrationPrice], [:unit_with_proration, Orb::Models::PriceModel::UnitWithProrationPrice], [:grouped_allocation, Orb::Models::PriceModel::GroupedAllocationPrice], [:grouped_with_prorated_minimum, Orb::Models::PriceModel::GroupedWithProratedMinimumPrice], [:grouped_with_metered_minimum, Orb::Models::PriceModel::GroupedWithMeteredMinimumPrice], [:matrix_with_display_name, Orb::Models::PriceModel::MatrixWithDisplayNamePrice], [:bulk_with_proration, Orb::Models::PriceModel::BulkWithProrationPrice], [:grouped_tiered_package, Orb::Models::PriceModel::GroupedTieredPackagePrice], [:max_group_tiered_package, Orb::Models::PriceModel::MaxGroupTieredPackagePrice], [:scalable_matrix_with_unit_pricing, Orb::Models::PriceModel::ScalableMatrixWithUnitPricingPrice], [:scalable_matrix_with_tiered_pricing, Orb::Models::PriceModel::ScalableMatrixWithTieredPricingPrice], [:cumulative_grouped_bulk, Orb::Models::PriceModel::CumulativeGroupedBulkPrice]] - end - end -end diff --git a/sig/orb/models/replace_subscription_adjustment_params.rbs b/sig/orb/models/replace_subscription_adjustment_params.rbs index edf0f27a..65191009 100644 --- a/sig/orb/models/replace_subscription_adjustment_params.rbs +++ b/sig/orb/models/replace_subscription_adjustment_params.rbs @@ -2,18 +2,18 @@ module Orb module Models type replace_subscription_adjustment_params = { - adjustment: Orb::Models::new_adjustment_model, + adjustment: Orb::Models::ReplaceSubscriptionAdjustmentParams::adjustment, replaces_adjustment_id: String } class ReplaceSubscriptionAdjustmentParams < Orb::BaseModel - attr_accessor adjustment: Orb::Models::new_adjustment_model + attr_accessor adjustment: Orb::Models::ReplaceSubscriptionAdjustmentParams::adjustment attr_accessor replaces_adjustment_id: String def initialize: ( - adjustment: Orb::Models::new_adjustment_model, + adjustment: Orb::Models::ReplaceSubscriptionAdjustmentParams::adjustment, replaces_adjustment_id: String ) -> void | ( @@ -22,6 +22,191 @@ module Orb ) -> void def to_hash: -> Orb::Models::replace_subscription_adjustment_params + + type adjustment = + Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount + | Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount + | Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount + | Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMinimum + | Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMaximum + + class Adjustment < Orb::Union + type new_percentage_discount = + { + adjustment_type: :percentage_discount, + applies_to_price_ids: ::Array[String], + percentage_discount: Float, + is_invoice_level: bool + } + + class NewPercentageDiscount < Orb::BaseModel + attr_accessor adjustment_type: :percentage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor percentage_discount: Float + + attr_reader is_invoice_level: bool? + + def is_invoice_level=: (bool) -> bool + + def initialize: + ( + applies_to_price_ids: ::Array[String], + percentage_discount: Float, + is_invoice_level: bool, + adjustment_type: :percentage_discount + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::new_percentage_discount + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::new_percentage_discount + end + + type new_usage_discount = + { + adjustment_type: :usage_discount, + applies_to_price_ids: ::Array[String], + usage_discount: Float, + is_invoice_level: bool + } + + class NewUsageDiscount < Orb::BaseModel + attr_accessor adjustment_type: :usage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor usage_discount: Float + + attr_reader is_invoice_level: bool? + + def is_invoice_level=: (bool) -> bool + + def initialize: + ( + applies_to_price_ids: ::Array[String], + usage_discount: Float, + is_invoice_level: bool, + adjustment_type: :usage_discount + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::new_usage_discount + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::new_usage_discount + end + + type new_amount_discount = + { + adjustment_type: :amount_discount, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool + } + + class NewAmountDiscount < Orb::BaseModel + attr_accessor adjustment_type: :amount_discount + + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_reader is_invoice_level: bool? + + def is_invoice_level=: (bool) -> bool + + def initialize: + ( + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + adjustment_type: :amount_discount + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::new_amount_discount + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::new_amount_discount + end + + type new_minimum = + { + adjustment_type: :minimum, + applies_to_price_ids: ::Array[String], + item_id: String, + minimum_amount: String, + is_invoice_level: bool + } + + class NewMinimum < Orb::BaseModel + attr_accessor adjustment_type: :minimum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor item_id: String + + attr_accessor minimum_amount: String + + attr_reader is_invoice_level: bool? + + def is_invoice_level=: (bool) -> bool + + def initialize: + ( + applies_to_price_ids: ::Array[String], + item_id: String, + minimum_amount: String, + is_invoice_level: bool, + adjustment_type: :minimum + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::new_minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::new_minimum + end + + type new_maximum = + { + adjustment_type: :maximum, + applies_to_price_ids: ::Array[String], + maximum_amount: String, + is_invoice_level: bool + } + + class NewMaximum < Orb::BaseModel + attr_accessor adjustment_type: :maximum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + attr_reader is_invoice_level: bool? + + def is_invoice_level=: (bool) -> bool + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String, + is_invoice_level: bool, + adjustment_type: :maximum + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::new_maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::new_maximum + end + + private def self.variants: -> [[:percentage_discount, Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewPercentageDiscount], [:usage_discount, Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewUsageDiscount], [:amount_discount, Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewAmountDiscount], [:minimum, Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMinimum], [:maximum, Orb::Models::ReplaceSubscriptionAdjustmentParams::Adjustment::NewMaximum]] + end end end end diff --git a/sig/orb/models/replace_subscription_price_params.rbs b/sig/orb/models/replace_subscription_price_params.rbs index e9ca48e7..902347e2 100644 --- a/sig/orb/models/replace_subscription_price_params.rbs +++ b/sig/orb/models/replace_subscription_price_params.rbs @@ -3,22 +3,22 @@ module Orb type replace_subscription_price_params = { replaces_price_id: String, - allocation_price: Orb::Models::NewAllocationPriceModel?, - discounts: ::Array[Orb::Models::DiscountOverrideModel]?, + allocation_price: Orb::Models::ReplaceSubscriptionPriceParams::AllocationPrice?, + discounts: ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Discount]?, external_price_id: String?, fixed_price_quantity: Float?, maximum_amount: String?, minimum_amount: String?, - price: Orb::Models::new_subscription_price_model?, + price: Orb::Models::ReplaceSubscriptionPriceParams::price?, price_id: String? } class ReplaceSubscriptionPriceParams < Orb::BaseModel attr_accessor replaces_price_id: String - attr_accessor allocation_price: Orb::Models::NewAllocationPriceModel? + attr_accessor allocation_price: Orb::Models::ReplaceSubscriptionPriceParams::AllocationPrice? - attr_accessor discounts: ::Array[Orb::Models::DiscountOverrideModel]? + attr_accessor discounts: ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Discount]? attr_accessor external_price_id: String? @@ -28,20 +28,20 @@ module Orb attr_accessor minimum_amount: String? - attr_accessor price: Orb::Models::new_subscription_price_model? + attr_accessor price: Orb::Models::ReplaceSubscriptionPriceParams::price? attr_accessor price_id: String? def initialize: ( replaces_price_id: String, - allocation_price: Orb::Models::NewAllocationPriceModel?, - discounts: ::Array[Orb::Models::DiscountOverrideModel]?, + allocation_price: Orb::Models::ReplaceSubscriptionPriceParams::AllocationPrice?, + discounts: ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Discount]?, external_price_id: String?, fixed_price_quantity: Float?, maximum_amount: String?, minimum_amount: String?, - price: Orb::Models::new_subscription_price_model?, + price: Orb::Models::ReplaceSubscriptionPriceParams::price?, price_id: String? ) -> void | ( @@ -49,6 +49,4401 @@ module Orb ) -> void def to_hash: -> Orb::Models::replace_subscription_price_params + + type allocation_price = + { + amount: String, + cadence: Orb::Models::ReplaceSubscriptionPriceParams::AllocationPrice::cadence, + currency: String, + expires_at_end_of_cadence: bool + } + + class AllocationPrice < Orb::BaseModel + attr_accessor amount: String + + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::AllocationPrice::cadence + + attr_accessor currency: String + + attr_accessor expires_at_end_of_cadence: bool + + def initialize: + ( + amount: String, + cadence: Orb::Models::ReplaceSubscriptionPriceParams::AllocationPrice::cadence, + currency: String, + expires_at_end_of_cadence: bool + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::allocation_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::allocation_price + + type cadence = + :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom + + class Cadence < Orb::Enum + ONE_TIME: :one_time + MONTHLY: :monthly + QUARTERLY: :quarterly + SEMI_ANNUAL: :semi_annual + ANNUAL: :annual + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::AllocationPrice::cadence] + end + end + + type discount = + { + discount_type: Orb::Models::ReplaceSubscriptionPriceParams::Discount::discount_type, + amount_discount: String?, + percentage_discount: Float?, + usage_discount: Float? + } + + class Discount < Orb::BaseModel + attr_accessor discount_type: Orb::Models::ReplaceSubscriptionPriceParams::Discount::discount_type + + attr_accessor amount_discount: String? + + attr_accessor percentage_discount: Float? + + attr_accessor usage_discount: Float? + + def initialize: + ( + discount_type: Orb::Models::ReplaceSubscriptionPriceParams::Discount::discount_type, + amount_discount: String?, + percentage_discount: Float?, + usage_discount: Float? + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::discount + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::discount + + type discount_type = :percentage | :usage | :amount + + class DiscountType < Orb::Enum + PERCENTAGE: :percentage + USAGE: :usage + AMOUNT: :amount + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Discount::discount_type] + end + end + + type price = + Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice + | Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice + + class Price < Orb::Union + type new_subscription_unit_price = + { + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::cadence, + item_id: String, + model_type: :unit, + name: String, + unit_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionUnitPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :unit + + attr_accessor name: String + + attr_accessor unit_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::UnitConfig + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::cadence, + item_id: String, + name: String, + unit_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_unit_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_unit_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::cadence] + end + + type unit_config = { unit_amount: String } + + class UnitConfig < Orb::BaseModel + attr_accessor unit_amount: String + + def initialize: + (unit_amount: String) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::unit_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::unit_config + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_package_price = + { + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::cadence, + item_id: String, + model_type: :package, + name: String, + package_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::PackageConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionPackagePrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :package + + attr_accessor name: String + + attr_accessor package_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::PackageConfig + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::cadence, + item_id: String, + name: String, + package_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::PackageConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :package + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_package_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_package_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::cadence] + end + + type package_config = + { package_amount: String, package_size: Integer } + + class PackageConfig < Orb::BaseModel + attr_accessor package_amount: String + + attr_accessor package_size: Integer + + def initialize: + (package_amount: String, package_size: Integer) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::package_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::package_config + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_matrix_price = + { + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::cadence, + item_id: String, + matrix_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig, + model_type: :matrix, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionMatrixPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::cadence + + attr_accessor item_id: String + + attr_accessor matrix_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig + + attr_accessor model_type: :matrix + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::cadence, + item_id: String, + matrix_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :matrix + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_matrix_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_matrix_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::cadence] + end + + type matrix_config = + { + default_unit_amount: String, + dimensions: ::Array[String?], + matrix_values: ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig::MatrixValue] + } + + class MatrixConfig < Orb::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor matrix_values: ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig::MatrixValue] + + def initialize: + ( + default_unit_amount: String, + dimensions: ::Array[String?], + matrix_values: ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig::MatrixValue] + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::matrix_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::matrix_config + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: + ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig::matrix_value + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::MatrixConfig::matrix_value + end + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_tiered_price = + { + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::cadence, + item_id: String, + model_type: :tiered, + name: String, + tiered_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionTieredPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :tiered + + attr_accessor name: String + + attr_accessor tiered_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::cadence, + item_id: String, + name: String, + tiered_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :tiered + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_tiered_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_tiered_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::cadence] + end + + type tiered_config = + { + tiers: ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig::Tier] + } + + class TieredConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig::Tier] + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::tiered_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::tiered_config + + type tier = + { first_unit: Float, unit_amount: String, last_unit: Float? } + + class Tier < Orb::BaseModel + attr_accessor first_unit: Float + + attr_accessor unit_amount: String + + attr_accessor last_unit: Float? + + def initialize: + ( + first_unit: Float, + unit_amount: String, + last_unit: Float? + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::TieredConfig::tier + end + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_tiered_bps_price = + { + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::cadence, + item_id: String, + model_type: :tiered_bps, + name: String, + tiered_bps_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionTieredBpsPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :tiered_bps + + attr_accessor name: String + + attr_accessor tiered_bps_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::cadence, + item_id: String, + name: String, + tiered_bps_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :tiered_bps + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_tiered_bps_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_tiered_bps_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::cadence] + end + + type tiered_bps_config = + { + tiers: ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig::Tier] + } + + class TieredBpsConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig::Tier] + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::tiered_bps_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::tiered_bps_config + + type tier = + { + bps: Float, + minimum_amount: String, + maximum_amount: String?, + per_unit_maximum: String? + } + + class Tier < Orb::BaseModel + attr_accessor bps: Float + + attr_accessor minimum_amount: String + + attr_accessor maximum_amount: String? + + attr_accessor per_unit_maximum: String? + + def initialize: + ( + bps: Float, + minimum_amount: String, + maximum_amount: String?, + per_unit_maximum: String? + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::TieredBpsConfig::tier + end + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_bps_price = + { + bps_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig, + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::cadence, + item_id: String, + model_type: :bps, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionBpsPrice < Orb::BaseModel + attr_accessor bps_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig + + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :bps + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + bps_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BpsConfig, + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::cadence, + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :bps + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_bps_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_bps_price + + type bps_config = { bps: Float, per_unit_maximum: String? } + + class BpsConfig < Orb::BaseModel + attr_accessor bps: Float + + attr_accessor per_unit_maximum: String? + + def initialize: + (bps: Float, per_unit_maximum: String?) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::bps_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::bps_config + end + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_bulk_bps_price = + { + bulk_bps_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig, + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::cadence, + item_id: String, + model_type: :bulk_bps, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionBulkBpsPrice < Orb::BaseModel + attr_accessor bulk_bps_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig + + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :bulk_bps + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + bulk_bps_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig, + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::cadence, + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :bulk_bps + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_bulk_bps_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_bulk_bps_price + + type bulk_bps_config = + { + tiers: ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig::Tier] + } + + class BulkBpsConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig::Tier] + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::bulk_bps_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::bulk_bps_config + + type tier = + { bps: Float, maximum_amount: String?, per_unit_maximum: String? } + + class Tier < Orb::BaseModel + attr_accessor bps: Float + + attr_accessor maximum_amount: String? + + attr_accessor per_unit_maximum: String? + + def initialize: + ( + bps: Float, + maximum_amount: String?, + per_unit_maximum: String? + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig::tier + end + end + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_bulk_price = + { + bulk_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig, + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::cadence, + item_id: String, + model_type: :bulk, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionBulkPrice < Orb::BaseModel + attr_accessor bulk_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig + + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :bulk + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + bulk_config: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig, + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::cadence, + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :bulk + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_bulk_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_bulk_price + + type bulk_config = + { + tiers: ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig::Tier] + } + + class BulkConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig::Tier] + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::bulk_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::bulk_config + + type tier = { unit_amount: String, maximum_units: Float? } + + class Tier < Orb::BaseModel + attr_accessor unit_amount: String + + attr_accessor maximum_units: Float? + + def initialize: + (unit_amount: String, maximum_units: Float?) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BulkConfig::tier + end + end + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_threshold_total_amount_price = + { + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::cadence, + item_id: String, + model_type: :threshold_total_amount, + name: String, + threshold_total_amount_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionThresholdTotalAmountPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :threshold_total_amount + + attr_accessor name: String + + attr_accessor threshold_total_amount_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::cadence, + item_id: String, + name: String, + threshold_total_amount_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :threshold_total_amount + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_threshold_total_amount_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_threshold_total_amount_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_tiered_package_price = + { + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::cadence, + item_id: String, + model_type: :tiered_package, + name: String, + tiered_package_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionTieredPackagePrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :tiered_package + + attr_accessor name: String + + attr_accessor tiered_package_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::cadence, + item_id: String, + name: String, + tiered_package_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :tiered_package + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_tiered_package_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_tiered_package_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_tiered_with_minimum_price = + { + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::cadence, + item_id: String, + model_type: :tiered_with_minimum, + name: String, + tiered_with_minimum_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionTieredWithMinimumPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :tiered_with_minimum + + attr_accessor name: String + + attr_accessor tiered_with_minimum_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::cadence, + item_id: String, + name: String, + tiered_with_minimum_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :tiered_with_minimum + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_tiered_with_minimum_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_tiered_with_minimum_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_unit_with_percent_price = + { + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::cadence, + item_id: String, + model_type: :unit_with_percent, + name: String, + unit_with_percent_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionUnitWithPercentPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :unit_with_percent + + attr_accessor name: String + + attr_accessor unit_with_percent_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::cadence, + item_id: String, + name: String, + unit_with_percent_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :unit_with_percent + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_unit_with_percent_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_unit_with_percent_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_package_with_allocation_price = + { + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::cadence, + item_id: String, + model_type: :package_with_allocation, + name: String, + package_with_allocation_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionPackageWithAllocationPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :package_with_allocation + + attr_accessor name: String + + attr_accessor package_with_allocation_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::cadence, + item_id: String, + name: String, + package_with_allocation_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :package_with_allocation + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_package_with_allocation_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_package_with_allocation_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_tier_with_proration_price = + { + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::cadence, + item_id: String, + model_type: :tiered_with_proration, + name: String, + tiered_with_proration_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionTierWithProrationPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :tiered_with_proration + + attr_accessor name: String + + attr_accessor tiered_with_proration_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::cadence, + item_id: String, + name: String, + tiered_with_proration_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :tiered_with_proration + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_tier_with_proration_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_tier_with_proration_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_unit_with_proration_price = + { + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::cadence, + item_id: String, + model_type: :unit_with_proration, + name: String, + unit_with_proration_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionUnitWithProrationPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :unit_with_proration + + attr_accessor name: String + + attr_accessor unit_with_proration_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::cadence, + item_id: String, + name: String, + unit_with_proration_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :unit_with_proration + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_unit_with_proration_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_unit_with_proration_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_grouped_allocation_price = + { + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::cadence, + grouped_allocation_config: ::Hash[Symbol, top], + item_id: String, + model_type: :grouped_allocation, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionGroupedAllocationPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::cadence + + attr_accessor grouped_allocation_config: ::Hash[Symbol, top] + + attr_accessor item_id: String + + attr_accessor model_type: :grouped_allocation + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::cadence, + grouped_allocation_config: ::Hash[Symbol, top], + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :grouped_allocation + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_grouped_allocation_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_grouped_allocation_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_grouped_with_prorated_minimum_price = + { + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::cadence, + grouped_with_prorated_minimum_config: ::Hash[Symbol, top], + item_id: String, + model_type: :grouped_with_prorated_minimum, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionGroupedWithProratedMinimumPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::cadence + + attr_accessor grouped_with_prorated_minimum_config: ::Hash[Symbol, top] + + attr_accessor item_id: String + + attr_accessor model_type: :grouped_with_prorated_minimum + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::cadence, + grouped_with_prorated_minimum_config: ::Hash[Symbol, top], + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :grouped_with_prorated_minimum + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_grouped_with_prorated_minimum_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_grouped_with_prorated_minimum_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_bulk_with_proration_price = + { + bulk_with_proration_config: ::Hash[Symbol, top], + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::cadence, + item_id: String, + model_type: :bulk_with_proration, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionBulkWithProrationPrice < Orb::BaseModel + attr_accessor bulk_with_proration_config: ::Hash[Symbol, top] + + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :bulk_with_proration + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + bulk_with_proration_config: ::Hash[Symbol, top], + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::cadence, + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :bulk_with_proration + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_bulk_with_proration_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_bulk_with_proration_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_scalable_matrix_with_unit_pricing_price = + { + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::cadence, + item_id: String, + model_type: :scalable_matrix_with_unit_pricing, + name: String, + scalable_matrix_with_unit_pricing_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionScalableMatrixWithUnitPricingPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :scalable_matrix_with_unit_pricing + + attr_accessor name: String + + attr_accessor scalable_matrix_with_unit_pricing_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::cadence, + item_id: String, + name: String, + scalable_matrix_with_unit_pricing_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :scalable_matrix_with_unit_pricing + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_scalable_matrix_with_unit_pricing_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_scalable_matrix_with_unit_pricing_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_scalable_matrix_with_tiered_pricing_price = + { + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::cadence, + item_id: String, + model_type: :scalable_matrix_with_tiered_pricing, + name: String, + scalable_matrix_with_tiered_pricing_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionScalableMatrixWithTieredPricingPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :scalable_matrix_with_tiered_pricing + + attr_accessor name: String + + attr_accessor scalable_matrix_with_tiered_pricing_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::cadence, + item_id: String, + name: String, + scalable_matrix_with_tiered_pricing_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :scalable_matrix_with_tiered_pricing + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_scalable_matrix_with_tiered_pricing_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_scalable_matrix_with_tiered_pricing_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_cumulative_grouped_bulk_price = + { + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::cadence, + cumulative_grouped_bulk_config: ::Hash[Symbol, top], + item_id: String, + model_type: :cumulative_grouped_bulk, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionCumulativeGroupedBulkPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::cadence + + attr_accessor cumulative_grouped_bulk_config: ::Hash[Symbol, top] + + attr_accessor item_id: String + + attr_accessor model_type: :cumulative_grouped_bulk + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::cadence, + cumulative_grouped_bulk_config: ::Hash[Symbol, top], + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :cumulative_grouped_bulk + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_cumulative_grouped_bulk_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_cumulative_grouped_bulk_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_max_group_tiered_package_price = + { + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::cadence, + item_id: String, + max_group_tiered_package_config: ::Hash[Symbol, top], + model_type: :max_group_tiered_package, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionMaxGroupTieredPackagePrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::cadence + + attr_accessor item_id: String + + attr_accessor max_group_tiered_package_config: ::Hash[Symbol, top] + + attr_accessor model_type: :max_group_tiered_package + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::cadence, + item_id: String, + max_group_tiered_package_config: ::Hash[Symbol, top], + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :max_group_tiered_package + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_max_group_tiered_package_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_max_group_tiered_package_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_grouped_with_metered_minimum_price = + { + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::cadence, + grouped_with_metered_minimum_config: ::Hash[Symbol, top], + item_id: String, + model_type: :grouped_with_metered_minimum, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionGroupedWithMeteredMinimumPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::cadence + + attr_accessor grouped_with_metered_minimum_config: ::Hash[Symbol, top] + + attr_accessor item_id: String + + attr_accessor model_type: :grouped_with_metered_minimum + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::cadence, + grouped_with_metered_minimum_config: ::Hash[Symbol, top], + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :grouped_with_metered_minimum + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_grouped_with_metered_minimum_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_grouped_with_metered_minimum_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_matrix_with_display_name_price = + { + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::cadence, + item_id: String, + matrix_with_display_name_config: ::Hash[Symbol, top], + model_type: :matrix_with_display_name, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionMatrixWithDisplayNamePrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::cadence + + attr_accessor item_id: String + + attr_accessor matrix_with_display_name_config: ::Hash[Symbol, top] + + attr_accessor model_type: :matrix_with_display_name + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::cadence, + item_id: String, + matrix_with_display_name_config: ::Hash[Symbol, top], + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :matrix_with_display_name + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_matrix_with_display_name_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_matrix_with_display_name_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_subscription_grouped_tiered_package_price = + { + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::cadence, + grouped_tiered_package_config: ::Hash[Symbol, top], + item_id: String, + model_type: :grouped_tiered_package, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class NewSubscriptionGroupedTieredPackagePrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::cadence + + attr_accessor grouped_tiered_package_config: ::Hash[Symbol, top] + + attr_accessor item_id: String + + attr_accessor model_type: :grouped_tiered_package + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor currency: String? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: + ( + cadence: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::cadence, + grouped_tiered_package_config: ::Hash[Symbol, top], + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + currency: String?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String?, + model_type: :grouped_tiered_package + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_grouped_tiered_package_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::new_subscription_grouped_tiered_package_price + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + private def self.variants: -> [[:unit, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitPrice], [:package, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackagePrice], [:matrix, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixPrice], [:tiered, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPrice], [:tiered_bps, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredBpsPrice], [:bps, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBpsPrice], [:bulk_bps, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkBpsPrice], [:bulk, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkPrice], [:threshold_total_amount, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionThresholdTotalAmountPrice], [:tiered_package, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredPackagePrice], [:tiered_with_minimum, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTieredWithMinimumPrice], [:unit_with_percent, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithPercentPrice], [:package_with_allocation, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionPackageWithAllocationPrice], [:tiered_with_proration, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionTierWithProrationPrice], [:unit_with_proration, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionUnitWithProrationPrice], [:grouped_allocation, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedAllocationPrice], [:grouped_with_prorated_minimum, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithProratedMinimumPrice], [:bulk_with_proration, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionBulkWithProrationPrice], [:scalable_matrix_with_unit_pricing, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice], [:scalable_matrix_with_tiered_pricing, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice], [:cumulative_grouped_bulk, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionCumulativeGroupedBulkPrice], [:max_group_tiered_package, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMaxGroupTieredPackagePrice], [:grouped_with_metered_minimum, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedWithMeteredMinimumPrice], [:matrix_with_display_name, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionMatrixWithDisplayNamePrice], [:grouped_tiered_package, Orb::Models::ReplaceSubscriptionPriceParams::Price::NewSubscriptionGroupedTieredPackagePrice]] + end end end end diff --git a/sig/orb/models/sub_line_item_grouping_model.rbs b/sig/orb/models/sub_line_item_grouping_model.rbs deleted file mode 100644 index dcc6a7b4..00000000 --- a/sig/orb/models/sub_line_item_grouping_model.rbs +++ /dev/null @@ -1,19 +0,0 @@ -module Orb - module Models - type sub_line_item_grouping_model = { key: String, value: String? } - - class SubLineItemGroupingModel < Orb::BaseModel - attr_accessor key: String - - attr_accessor value: String? - - def initialize: - (key: String, value: String?) -> void - | ( - ?Orb::Models::sub_line_item_grouping_model | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::sub_line_item_grouping_model - end - end -end diff --git a/sig/orb/models/subscription.rbs b/sig/orb/models/subscription.rbs index 27e50d40..3dc3b3a4 100644 --- a/sig/orb/models/subscription.rbs +++ b/sig/orb/models/subscription.rbs @@ -4,29 +4,29 @@ module Orb { id: String, active_plan_phase_order: Integer?, - adjustment_intervals: ::Array[Orb::Models::AdjustmentIntervalModel], + adjustment_intervals: ::Array[Orb::Models::Subscription::AdjustmentInterval], auto_collection: bool?, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, + billing_cycle_anchor_configuration: Orb::Models::Subscription::BillingCycleAnchorConfiguration, billing_cycle_day: Integer, created_at: Time, current_billing_period_end_date: Time?, current_billing_period_start_date: Time?, - customer: Orb::Models::CustomerModel, + customer: Orb::Models::Customer, default_invoice_memo: String?, discount_intervals: ::Array[Orb::Models::Subscription::discount_interval], end_date: Time?, - fixed_fee_quantity_schedule: ::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel], + fixed_fee_quantity_schedule: ::Array[Orb::Models::Subscription::FixedFeeQuantitySchedule], invoicing_threshold: String?, - maximum_intervals: ::Array[Orb::Models::MaximumIntervalModel], + maximum_intervals: ::Array[Orb::Models::Subscription::MaximumInterval], metadata: ::Hash[Symbol, String], - minimum_intervals: ::Array[Orb::Models::MinimumIntervalModel], + minimum_intervals: ::Array[Orb::Models::Subscription::MinimumInterval], net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: ::Array[Orb::Models::PriceIntervalModel], - redeemed_coupon: Orb::Models::CouponRedemptionModel?, + plan: Orb::Models::Plan, + price_intervals: ::Array[Orb::Models::Subscription::PriceInterval], + redeemed_coupon: Orb::Models::Subscription::RedeemedCoupon?, start_date: Time, status: Orb::Models::Subscription::status, - trial_info: Orb::Models::SubscriptionTrialInfoModel + trial_info: Orb::Models::Subscription::TrialInfo } class Subscription < Orb::BaseModel @@ -34,11 +34,11 @@ module Orb attr_accessor active_plan_phase_order: Integer? - attr_accessor adjustment_intervals: ::Array[Orb::Models::AdjustmentIntervalModel] + attr_accessor adjustment_intervals: ::Array[Orb::Models::Subscription::AdjustmentInterval] attr_accessor auto_collection: bool? - attr_accessor billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel + attr_accessor billing_cycle_anchor_configuration: Orb::Models::Subscription::BillingCycleAnchorConfiguration attr_accessor billing_cycle_day: Integer @@ -48,7 +48,7 @@ module Orb attr_accessor current_billing_period_start_date: Time? - attr_accessor customer: Orb::Models::CustomerModel + attr_accessor customer: Orb::Models::Customer attr_accessor default_invoice_memo: String? @@ -56,69 +56,671 @@ module Orb attr_accessor end_date: Time? - attr_accessor fixed_fee_quantity_schedule: ::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel] + attr_accessor fixed_fee_quantity_schedule: ::Array[Orb::Models::Subscription::FixedFeeQuantitySchedule] attr_accessor invoicing_threshold: String? - attr_accessor maximum_intervals: ::Array[Orb::Models::MaximumIntervalModel] + attr_accessor maximum_intervals: ::Array[Orb::Models::Subscription::MaximumInterval] attr_accessor metadata: ::Hash[Symbol, String] - attr_accessor minimum_intervals: ::Array[Orb::Models::MinimumIntervalModel] + attr_accessor minimum_intervals: ::Array[Orb::Models::Subscription::MinimumInterval] attr_accessor net_terms: Integer - attr_accessor plan: Orb::Models::PlanModel + attr_accessor plan: Orb::Models::Plan - attr_accessor price_intervals: ::Array[Orb::Models::PriceIntervalModel] + attr_accessor price_intervals: ::Array[Orb::Models::Subscription::PriceInterval] - attr_accessor redeemed_coupon: Orb::Models::CouponRedemptionModel? + attr_accessor redeemed_coupon: Orb::Models::Subscription::RedeemedCoupon? attr_accessor start_date: Time attr_accessor status: Orb::Models::Subscription::status - attr_accessor trial_info: Orb::Models::SubscriptionTrialInfoModel + attr_accessor trial_info: Orb::Models::Subscription::TrialInfo def initialize: ( id: String, active_plan_phase_order: Integer?, - adjustment_intervals: ::Array[Orb::Models::AdjustmentIntervalModel], + adjustment_intervals: ::Array[Orb::Models::Subscription::AdjustmentInterval], auto_collection: bool?, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, + billing_cycle_anchor_configuration: Orb::Models::Subscription::BillingCycleAnchorConfiguration, billing_cycle_day: Integer, created_at: Time, current_billing_period_end_date: Time?, current_billing_period_start_date: Time?, - customer: Orb::Models::CustomerModel, + customer: Orb::Models::Customer, default_invoice_memo: String?, discount_intervals: ::Array[Orb::Models::Subscription::discount_interval], end_date: Time?, - fixed_fee_quantity_schedule: ::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel], + fixed_fee_quantity_schedule: ::Array[Orb::Models::Subscription::FixedFeeQuantitySchedule], invoicing_threshold: String?, - maximum_intervals: ::Array[Orb::Models::MaximumIntervalModel], + maximum_intervals: ::Array[Orb::Models::Subscription::MaximumInterval], metadata: ::Hash[Symbol, String], - minimum_intervals: ::Array[Orb::Models::MinimumIntervalModel], + minimum_intervals: ::Array[Orb::Models::Subscription::MinimumInterval], net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: ::Array[Orb::Models::PriceIntervalModel], - redeemed_coupon: Orb::Models::CouponRedemptionModel?, + plan: Orb::Models::Plan, + price_intervals: ::Array[Orb::Models::Subscription::PriceInterval], + redeemed_coupon: Orb::Models::Subscription::RedeemedCoupon?, start_date: Time, status: Orb::Models::Subscription::status, - trial_info: Orb::Models::SubscriptionTrialInfoModel + trial_info: Orb::Models::Subscription::TrialInfo ) -> void | (?Orb::Models::subscription | Orb::BaseModel data) -> void def to_hash: -> Orb::Models::subscription + type adjustment_interval = + { + id: String, + adjustment: Orb::Models::Subscription::AdjustmentInterval::adjustment, + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time + } + + class AdjustmentInterval < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment: Orb::Models::Subscription::AdjustmentInterval::adjustment + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + ( + id: String, + adjustment: Orb::Models::Subscription::AdjustmentInterval::adjustment, + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time + ) -> void + | ( + ?Orb::Models::Subscription::adjustment_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Subscription::adjustment_interval + + type adjustment = + Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment + | Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment + | Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment + | Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment + | Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + + class Adjustment < Orb::Union + type plan_phase_usage_discount_adjustment = + { + id: String, + adjustment_type: :usage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float + } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :usage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + attr_accessor usage_discount: Float + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float, + adjustment_type: :usage_discount + ) -> void + | ( + ?Orb::Models::Subscription::AdjustmentInterval::Adjustment::plan_phase_usage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Subscription::AdjustmentInterval::Adjustment::plan_phase_usage_discount_adjustment + end + + type plan_phase_amount_discount_adjustment = + { + id: String, + adjustment_type: :amount_discount, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :amount_discount + + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :amount_discount + ) -> void + | ( + ?Orb::Models::Subscription::AdjustmentInterval::Adjustment::plan_phase_amount_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Subscription::AdjustmentInterval::Adjustment::plan_phase_amount_discount_adjustment + end + + type plan_phase_percentage_discount_adjustment = + { + id: String, + adjustment_type: :percentage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :percentage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor percentage_discount: Float + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :percentage_discount + ) -> void + | ( + ?Orb::Models::Subscription::AdjustmentInterval::Adjustment::plan_phase_percentage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Subscription::AdjustmentInterval::Adjustment::plan_phase_percentage_discount_adjustment + end + + type plan_phase_minimum_adjustment = + { + id: String, + adjustment_type: :minimum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :minimum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor item_id: String + + attr_accessor minimum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :minimum + ) -> void + | ( + ?Orb::Models::Subscription::AdjustmentInterval::Adjustment::plan_phase_minimum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Subscription::AdjustmentInterval::Adjustment::plan_phase_minimum_adjustment + end + + type plan_phase_maximum_adjustment = + { + id: String, + adjustment_type: :maximum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :maximum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor maximum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :maximum + ) -> void + | ( + ?Orb::Models::Subscription::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Subscription::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment + end + + private def self.variants: -> [[:usage_discount, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + end + end + + type billing_cycle_anchor_configuration = + { day: Integer, month: Integer?, year: Integer? } + + class BillingCycleAnchorConfiguration < Orb::BaseModel + attr_accessor day: Integer + + attr_accessor month: Integer? + + attr_accessor year: Integer? + + def initialize: + (day: Integer, month: Integer?, year: Integer?) -> void + | ( + ?Orb::Models::Subscription::billing_cycle_anchor_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Subscription::billing_cycle_anchor_configuration + end + type discount_interval = - Orb::Models::AmountDiscountIntervalModel - | Orb::Models::PercentageDiscountIntervalModel - | Orb::Models::UsageDiscountIntervalModel + Orb::Models::Subscription::DiscountInterval::AmountDiscountInterval + | Orb::Models::Subscription::DiscountInterval::PercentageDiscountInterval + | Orb::Models::Subscription::DiscountInterval::UsageDiscountInterval class DiscountInterval < Orb::Union - private def self.variants: -> [[:amount, Orb::Models::AmountDiscountIntervalModel], [:percentage, Orb::Models::PercentageDiscountIntervalModel], [:usage, Orb::Models::UsageDiscountIntervalModel]] + type amount_discount_interval = + { + amount_discount: String, + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :amount, + end_date: Time?, + start_date: Time + } + + class AmountDiscountInterval < Orb::BaseModel + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :amount + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + ( + amount_discount: String, + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time, + discount_type: :amount + ) -> void + | ( + ?Orb::Models::Subscription::DiscountInterval::amount_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Subscription::DiscountInterval::amount_discount_interval + end + + type percentage_discount_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :percentage, + end_date: Time?, + percentage_discount: Float, + start_date: Time + } + + class PercentageDiscountInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :percentage + + attr_accessor end_date: Time? + + attr_accessor percentage_discount: Float + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + percentage_discount: Float, + start_date: Time, + discount_type: :percentage + ) -> void + | ( + ?Orb::Models::Subscription::DiscountInterval::percentage_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Subscription::DiscountInterval::percentage_discount_interval + end + + type usage_discount_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :usage, + end_date: Time?, + start_date: Time, + usage_discount: Float + } + + class UsageDiscountInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :usage + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + attr_accessor usage_discount: Float + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time, + usage_discount: Float, + discount_type: :usage + ) -> void + | ( + ?Orb::Models::Subscription::DiscountInterval::usage_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Subscription::DiscountInterval::usage_discount_interval + end + + private def self.variants: -> [[:amount, Orb::Models::Subscription::DiscountInterval::AmountDiscountInterval], [:percentage, Orb::Models::Subscription::DiscountInterval::PercentageDiscountInterval], [:usage, Orb::Models::Subscription::DiscountInterval::UsageDiscountInterval]] + end + + type fixed_fee_quantity_schedule = + { end_date: Time?, price_id: String, quantity: Float, start_date: Time } + + class FixedFeeQuantitySchedule < Orb::BaseModel + attr_accessor end_date: Time? + + attr_accessor price_id: String + + attr_accessor quantity: Float + + attr_accessor start_date: Time + + def initialize: + ( + end_date: Time?, + price_id: String, + quantity: Float, + start_date: Time + ) -> void + | ( + ?Orb::Models::Subscription::fixed_fee_quantity_schedule + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Subscription::fixed_fee_quantity_schedule + end + + type maximum_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + maximum_amount: String, + start_date: Time + } + + class MaximumInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor maximum_amount: String + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + maximum_amount: String, + start_date: Time + ) -> void + | ( + ?Orb::Models::Subscription::maximum_interval | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Subscription::maximum_interval + end + + type minimum_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + minimum_amount: String, + start_date: Time + } + + class MinimumInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor minimum_amount: String + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + minimum_amount: String, + start_date: Time + ) -> void + | ( + ?Orb::Models::Subscription::minimum_interval | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Subscription::minimum_interval + end + + type price_interval = + { + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + end_date: Time?, + filter: String?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::Subscription::PriceInterval::FixedFeeQuantityTransition]?, + price: Orb::Models::price, + start_date: Time, + usage_customer_ids: ::Array[String]? + } + + class PriceInterval < Orb::BaseModel + attr_accessor id: String + + attr_accessor billing_cycle_day: Integer + + attr_accessor current_billing_period_end_date: Time? + + attr_accessor current_billing_period_start_date: Time? + + attr_accessor end_date: Time? + + attr_accessor filter: String? + + attr_accessor fixed_fee_quantity_transitions: ::Array[Orb::Models::Subscription::PriceInterval::FixedFeeQuantityTransition]? + + attr_accessor price: Orb::Models::price + + attr_accessor start_date: Time + + attr_accessor usage_customer_ids: ::Array[String]? + + def initialize: + ( + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + end_date: Time?, + filter: String?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::Subscription::PriceInterval::FixedFeeQuantityTransition]?, + price: Orb::Models::price, + start_date: Time, + usage_customer_ids: ::Array[String]? + ) -> void + | ( + ?Orb::Models::Subscription::price_interval | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Subscription::price_interval + + type fixed_fee_quantity_transition = + { effective_date: Time, price_id: String, quantity: Integer } + + class FixedFeeQuantityTransition < Orb::BaseModel + attr_accessor effective_date: Time + + attr_accessor price_id: String + + attr_accessor quantity: Integer + + def initialize: + (effective_date: Time, price_id: String, quantity: Integer) -> void + | ( + ?Orb::Models::Subscription::PriceInterval::fixed_fee_quantity_transition + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Subscription::PriceInterval::fixed_fee_quantity_transition + end + end + + type redeemed_coupon = + { coupon_id: String, end_date: Time?, start_date: Time } + + class RedeemedCoupon < Orb::BaseModel + attr_accessor coupon_id: String + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + (coupon_id: String, end_date: Time?, start_date: Time) -> void + | ( + ?Orb::Models::Subscription::redeemed_coupon | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Subscription::redeemed_coupon end type status = :active | :ended | :upcoming @@ -130,6 +732,20 @@ module Orb def self.values: -> ::Array[Orb::Models::Subscription::status] end + + type trial_info = { end_date: Time? } + + class TrialInfo < Orb::BaseModel + attr_accessor end_date: Time? + + def initialize: + (end_date: Time?) -> void + | ( + ?Orb::Models::Subscription::trial_info | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::Subscription::trial_info + end end end end diff --git a/sig/orb/models/subscription_cancel_response.rbs b/sig/orb/models/subscription_cancel_response.rbs new file mode 100644 index 00000000..df27e807 --- /dev/null +++ b/sig/orb/models/subscription_cancel_response.rbs @@ -0,0 +1,758 @@ +module Orb + module Models + type subscription_cancel_response = + { + id: String, + active_plan_phase_order: Integer?, + adjustment_intervals: ::Array[Orb::Models::SubscriptionCancelResponse::AdjustmentInterval], + auto_collection: bool?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionCancelResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + customer: Orb::Models::Customer, + default_invoice_memo: String?, + discount_intervals: ::Array[Orb::Models::SubscriptionCancelResponse::discount_interval], + end_date: Time?, + fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionCancelResponse::FixedFeeQuantitySchedule], + invoicing_threshold: String?, + maximum_intervals: ::Array[Orb::Models::SubscriptionCancelResponse::MaximumInterval], + metadata: ::Hash[Symbol, String], + minimum_intervals: ::Array[Orb::Models::SubscriptionCancelResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: ::Array[Orb::Models::SubscriptionCancelResponse::PriceInterval], + redeemed_coupon: Orb::Models::SubscriptionCancelResponse::RedeemedCoupon?, + start_date: Time, + status: Orb::Models::SubscriptionCancelResponse::status, + trial_info: Orb::Models::SubscriptionCancelResponse::TrialInfo + } + + class SubscriptionCancelResponse < Orb::BaseModel + attr_accessor id: String + + attr_accessor active_plan_phase_order: Integer? + + attr_accessor adjustment_intervals: ::Array[Orb::Models::SubscriptionCancelResponse::AdjustmentInterval] + + attr_accessor auto_collection: bool? + + attr_accessor billing_cycle_anchor_configuration: Orb::Models::SubscriptionCancelResponse::BillingCycleAnchorConfiguration + + attr_accessor billing_cycle_day: Integer + + attr_accessor created_at: Time + + attr_accessor current_billing_period_end_date: Time? + + attr_accessor current_billing_period_start_date: Time? + + attr_accessor customer: Orb::Models::Customer + + attr_accessor default_invoice_memo: String? + + attr_accessor discount_intervals: ::Array[Orb::Models::SubscriptionCancelResponse::discount_interval] + + attr_accessor end_date: Time? + + attr_accessor fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionCancelResponse::FixedFeeQuantitySchedule] + + attr_accessor invoicing_threshold: String? + + attr_accessor maximum_intervals: ::Array[Orb::Models::SubscriptionCancelResponse::MaximumInterval] + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor minimum_intervals: ::Array[Orb::Models::SubscriptionCancelResponse::MinimumInterval] + + attr_accessor net_terms: Integer + + attr_accessor plan: Orb::Models::Plan + + attr_accessor price_intervals: ::Array[Orb::Models::SubscriptionCancelResponse::PriceInterval] + + attr_accessor redeemed_coupon: Orb::Models::SubscriptionCancelResponse::RedeemedCoupon? + + attr_accessor start_date: Time + + attr_accessor status: Orb::Models::SubscriptionCancelResponse::status + + attr_accessor trial_info: Orb::Models::SubscriptionCancelResponse::TrialInfo + + def initialize: + ( + id: String, + active_plan_phase_order: Integer?, + adjustment_intervals: ::Array[Orb::Models::SubscriptionCancelResponse::AdjustmentInterval], + auto_collection: bool?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionCancelResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + customer: Orb::Models::Customer, + default_invoice_memo: String?, + discount_intervals: ::Array[Orb::Models::SubscriptionCancelResponse::discount_interval], + end_date: Time?, + fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionCancelResponse::FixedFeeQuantitySchedule], + invoicing_threshold: String?, + maximum_intervals: ::Array[Orb::Models::SubscriptionCancelResponse::MaximumInterval], + metadata: ::Hash[Symbol, String], + minimum_intervals: ::Array[Orb::Models::SubscriptionCancelResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: ::Array[Orb::Models::SubscriptionCancelResponse::PriceInterval], + redeemed_coupon: Orb::Models::SubscriptionCancelResponse::RedeemedCoupon?, + start_date: Time, + status: Orb::Models::SubscriptionCancelResponse::status, + trial_info: Orb::Models::SubscriptionCancelResponse::TrialInfo + ) -> void + | ( + ?Orb::Models::subscription_cancel_response | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::subscription_cancel_response + + type adjustment_interval = + { + id: String, + adjustment: Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::adjustment, + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time + } + + class AdjustmentInterval < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment: Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::adjustment + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + ( + id: String, + adjustment: Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::adjustment, + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionCancelResponse::adjustment_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCancelResponse::adjustment_interval + + type adjustment = + Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment + | Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment + | Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment + | Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment + | Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + + class Adjustment < Orb::Union + type plan_phase_usage_discount_adjustment = + { + id: String, + adjustment_type: :usage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float + } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :usage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + attr_accessor usage_discount: Float + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float, + adjustment_type: :usage_discount + ) -> void + | ( + ?Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::plan_phase_usage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::plan_phase_usage_discount_adjustment + end + + type plan_phase_amount_discount_adjustment = + { + id: String, + adjustment_type: :amount_discount, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :amount_discount + + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :amount_discount + ) -> void + | ( + ?Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::plan_phase_amount_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::plan_phase_amount_discount_adjustment + end + + type plan_phase_percentage_discount_adjustment = + { + id: String, + adjustment_type: :percentage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :percentage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor percentage_discount: Float + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :percentage_discount + ) -> void + | ( + ?Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::plan_phase_percentage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::plan_phase_percentage_discount_adjustment + end + + type plan_phase_minimum_adjustment = + { + id: String, + adjustment_type: :minimum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :minimum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor item_id: String + + attr_accessor minimum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :minimum + ) -> void + | ( + ?Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::plan_phase_minimum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::plan_phase_minimum_adjustment + end + + type plan_phase_maximum_adjustment = + { + id: String, + adjustment_type: :maximum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :maximum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor maximum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :maximum + ) -> void + | ( + ?Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment + end + + private def self.variants: -> [[:usage_discount, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + end + end + + type billing_cycle_anchor_configuration = + { day: Integer, month: Integer?, year: Integer? } + + class BillingCycleAnchorConfiguration < Orb::BaseModel + attr_accessor day: Integer + + attr_accessor month: Integer? + + attr_accessor year: Integer? + + def initialize: + (day: Integer, month: Integer?, year: Integer?) -> void + | ( + ?Orb::Models::SubscriptionCancelResponse::billing_cycle_anchor_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCancelResponse::billing_cycle_anchor_configuration + end + + type discount_interval = + Orb::Models::SubscriptionCancelResponse::DiscountInterval::AmountDiscountInterval + | Orb::Models::SubscriptionCancelResponse::DiscountInterval::PercentageDiscountInterval + | Orb::Models::SubscriptionCancelResponse::DiscountInterval::UsageDiscountInterval + + class DiscountInterval < Orb::Union + type amount_discount_interval = + { + amount_discount: String, + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :amount, + end_date: Time?, + start_date: Time + } + + class AmountDiscountInterval < Orb::BaseModel + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :amount + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + ( + amount_discount: String, + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time, + discount_type: :amount + ) -> void + | ( + ?Orb::Models::SubscriptionCancelResponse::DiscountInterval::amount_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCancelResponse::DiscountInterval::amount_discount_interval + end + + type percentage_discount_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :percentage, + end_date: Time?, + percentage_discount: Float, + start_date: Time + } + + class PercentageDiscountInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :percentage + + attr_accessor end_date: Time? + + attr_accessor percentage_discount: Float + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + percentage_discount: Float, + start_date: Time, + discount_type: :percentage + ) -> void + | ( + ?Orb::Models::SubscriptionCancelResponse::DiscountInterval::percentage_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCancelResponse::DiscountInterval::percentage_discount_interval + end + + type usage_discount_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :usage, + end_date: Time?, + start_date: Time, + usage_discount: Float + } + + class UsageDiscountInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :usage + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + attr_accessor usage_discount: Float + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time, + usage_discount: Float, + discount_type: :usage + ) -> void + | ( + ?Orb::Models::SubscriptionCancelResponse::DiscountInterval::usage_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCancelResponse::DiscountInterval::usage_discount_interval + end + + private def self.variants: -> [[:amount, Orb::Models::SubscriptionCancelResponse::DiscountInterval::AmountDiscountInterval], [:percentage, Orb::Models::SubscriptionCancelResponse::DiscountInterval::PercentageDiscountInterval], [:usage, Orb::Models::SubscriptionCancelResponse::DiscountInterval::UsageDiscountInterval]] + end + + type fixed_fee_quantity_schedule = + { end_date: Time?, price_id: String, quantity: Float, start_date: Time } + + class FixedFeeQuantitySchedule < Orb::BaseModel + attr_accessor end_date: Time? + + attr_accessor price_id: String + + attr_accessor quantity: Float + + attr_accessor start_date: Time + + def initialize: + ( + end_date: Time?, + price_id: String, + quantity: Float, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionCancelResponse::fixed_fee_quantity_schedule + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCancelResponse::fixed_fee_quantity_schedule + end + + type maximum_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + maximum_amount: String, + start_date: Time + } + + class MaximumInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor maximum_amount: String + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + maximum_amount: String, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionCancelResponse::maximum_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCancelResponse::maximum_interval + end + + type minimum_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + minimum_amount: String, + start_date: Time + } + + class MinimumInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor minimum_amount: String + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + minimum_amount: String, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionCancelResponse::minimum_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCancelResponse::minimum_interval + end + + type price_interval = + { + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + end_date: Time?, + filter: String?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionCancelResponse::PriceInterval::FixedFeeQuantityTransition]?, + price: Orb::Models::price, + start_date: Time, + usage_customer_ids: ::Array[String]? + } + + class PriceInterval < Orb::BaseModel + attr_accessor id: String + + attr_accessor billing_cycle_day: Integer + + attr_accessor current_billing_period_end_date: Time? + + attr_accessor current_billing_period_start_date: Time? + + attr_accessor end_date: Time? + + attr_accessor filter: String? + + attr_accessor fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionCancelResponse::PriceInterval::FixedFeeQuantityTransition]? + + attr_accessor price: Orb::Models::price + + attr_accessor start_date: Time + + attr_accessor usage_customer_ids: ::Array[String]? + + def initialize: + ( + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + end_date: Time?, + filter: String?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionCancelResponse::PriceInterval::FixedFeeQuantityTransition]?, + price: Orb::Models::price, + start_date: Time, + usage_customer_ids: ::Array[String]? + ) -> void + | ( + ?Orb::Models::SubscriptionCancelResponse::price_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCancelResponse::price_interval + + type fixed_fee_quantity_transition = + { effective_date: Time, price_id: String, quantity: Integer } + + class FixedFeeQuantityTransition < Orb::BaseModel + attr_accessor effective_date: Time + + attr_accessor price_id: String + + attr_accessor quantity: Integer + + def initialize: + (effective_date: Time, price_id: String, quantity: Integer) -> void + | ( + ?Orb::Models::SubscriptionCancelResponse::PriceInterval::fixed_fee_quantity_transition + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCancelResponse::PriceInterval::fixed_fee_quantity_transition + end + end + + type redeemed_coupon = + { coupon_id: String, end_date: Time?, start_date: Time } + + class RedeemedCoupon < Orb::BaseModel + attr_accessor coupon_id: String + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + (coupon_id: String, end_date: Time?, start_date: Time) -> void + | ( + ?Orb::Models::SubscriptionCancelResponse::redeemed_coupon + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCancelResponse::redeemed_coupon + end + + type status = :active | :ended | :upcoming + + class Status < Orb::Enum + ACTIVE: :active + ENDED: :ended + UPCOMING: :upcoming + + def self.values: -> ::Array[Orb::Models::SubscriptionCancelResponse::status] + end + + type trial_info = { end_date: Time? } + + class TrialInfo < Orb::BaseModel + attr_accessor end_date: Time? + + def initialize: + (end_date: Time?) -> void + | ( + ?Orb::Models::SubscriptionCancelResponse::trial_info + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCancelResponse::trial_info + end + end + end +end diff --git a/sig/orb/models/subscription_create_params.rbs b/sig/orb/models/subscription_create_params.rbs index 8d4af8aa..e6821185 100644 --- a/sig/orb/models/subscription_create_params.rbs +++ b/sig/orb/models/subscription_create_params.rbs @@ -7,7 +7,7 @@ module Orb align_billing_with_subscription_start_date: bool, auto_collection: bool?, aws_region: String?, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionCreateParams::BillingCycleAnchorConfiguration?, coupon_redemption_code: String?, credits_overage_rate: Float?, customer_id: String?, @@ -52,7 +52,7 @@ module Orb attr_accessor aws_region: String? - attr_accessor billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel? + attr_accessor billing_cycle_anchor_configuration: Orb::Models::SubscriptionCreateParams::BillingCycleAnchorConfiguration? attr_accessor coupon_redemption_code: String? @@ -111,7 +111,7 @@ module Orb align_billing_with_subscription_start_date: bool, auto_collection: bool?, aws_region: String?, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionCreateParams::BillingCycleAnchorConfiguration?, coupon_redemption_code: String?, credits_overage_rate: Float?, customer_id: String?, @@ -145,6 +145,26 @@ module Orb def to_hash: -> Orb::Models::subscription_create_params + type billing_cycle_anchor_configuration = + { day: Integer, month: Integer?, year: Integer? } + + class BillingCycleAnchorConfiguration < Orb::BaseModel + attr_accessor day: Integer + + attr_accessor month: Integer? + + attr_accessor year: Integer? + + def initialize: + (day: Integer, month: Integer?, year: Integer?) -> void + | ( + ?Orb::Models::SubscriptionCreateParams::billing_cycle_anchor_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCreateParams::billing_cycle_anchor_configuration + end + type external_marketplace = :google | :aws | :azure class ExternalMarketplace < Orb::Enum diff --git a/sig/orb/models/subscription_create_response.rbs b/sig/orb/models/subscription_create_response.rbs new file mode 100644 index 00000000..23b52d9e --- /dev/null +++ b/sig/orb/models/subscription_create_response.rbs @@ -0,0 +1,758 @@ +module Orb + module Models + type subscription_create_response = + { + id: String, + active_plan_phase_order: Integer?, + adjustment_intervals: ::Array[Orb::Models::SubscriptionCreateResponse::AdjustmentInterval], + auto_collection: bool?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionCreateResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + customer: Orb::Models::Customer, + default_invoice_memo: String?, + discount_intervals: ::Array[Orb::Models::SubscriptionCreateResponse::discount_interval], + end_date: Time?, + fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionCreateResponse::FixedFeeQuantitySchedule], + invoicing_threshold: String?, + maximum_intervals: ::Array[Orb::Models::SubscriptionCreateResponse::MaximumInterval], + metadata: ::Hash[Symbol, String], + minimum_intervals: ::Array[Orb::Models::SubscriptionCreateResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: ::Array[Orb::Models::SubscriptionCreateResponse::PriceInterval], + redeemed_coupon: Orb::Models::SubscriptionCreateResponse::RedeemedCoupon?, + start_date: Time, + status: Orb::Models::SubscriptionCreateResponse::status, + trial_info: Orb::Models::SubscriptionCreateResponse::TrialInfo + } + + class SubscriptionCreateResponse < Orb::BaseModel + attr_accessor id: String + + attr_accessor active_plan_phase_order: Integer? + + attr_accessor adjustment_intervals: ::Array[Orb::Models::SubscriptionCreateResponse::AdjustmentInterval] + + attr_accessor auto_collection: bool? + + attr_accessor billing_cycle_anchor_configuration: Orb::Models::SubscriptionCreateResponse::BillingCycleAnchorConfiguration + + attr_accessor billing_cycle_day: Integer + + attr_accessor created_at: Time + + attr_accessor current_billing_period_end_date: Time? + + attr_accessor current_billing_period_start_date: Time? + + attr_accessor customer: Orb::Models::Customer + + attr_accessor default_invoice_memo: String? + + attr_accessor discount_intervals: ::Array[Orb::Models::SubscriptionCreateResponse::discount_interval] + + attr_accessor end_date: Time? + + attr_accessor fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionCreateResponse::FixedFeeQuantitySchedule] + + attr_accessor invoicing_threshold: String? + + attr_accessor maximum_intervals: ::Array[Orb::Models::SubscriptionCreateResponse::MaximumInterval] + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor minimum_intervals: ::Array[Orb::Models::SubscriptionCreateResponse::MinimumInterval] + + attr_accessor net_terms: Integer + + attr_accessor plan: Orb::Models::Plan + + attr_accessor price_intervals: ::Array[Orb::Models::SubscriptionCreateResponse::PriceInterval] + + attr_accessor redeemed_coupon: Orb::Models::SubscriptionCreateResponse::RedeemedCoupon? + + attr_accessor start_date: Time + + attr_accessor status: Orb::Models::SubscriptionCreateResponse::status + + attr_accessor trial_info: Orb::Models::SubscriptionCreateResponse::TrialInfo + + def initialize: + ( + id: String, + active_plan_phase_order: Integer?, + adjustment_intervals: ::Array[Orb::Models::SubscriptionCreateResponse::AdjustmentInterval], + auto_collection: bool?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionCreateResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + customer: Orb::Models::Customer, + default_invoice_memo: String?, + discount_intervals: ::Array[Orb::Models::SubscriptionCreateResponse::discount_interval], + end_date: Time?, + fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionCreateResponse::FixedFeeQuantitySchedule], + invoicing_threshold: String?, + maximum_intervals: ::Array[Orb::Models::SubscriptionCreateResponse::MaximumInterval], + metadata: ::Hash[Symbol, String], + minimum_intervals: ::Array[Orb::Models::SubscriptionCreateResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: ::Array[Orb::Models::SubscriptionCreateResponse::PriceInterval], + redeemed_coupon: Orb::Models::SubscriptionCreateResponse::RedeemedCoupon?, + start_date: Time, + status: Orb::Models::SubscriptionCreateResponse::status, + trial_info: Orb::Models::SubscriptionCreateResponse::TrialInfo + ) -> void + | ( + ?Orb::Models::subscription_create_response | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::subscription_create_response + + type adjustment_interval = + { + id: String, + adjustment: Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::adjustment, + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time + } + + class AdjustmentInterval < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment: Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::adjustment + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + ( + id: String, + adjustment: Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::adjustment, + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionCreateResponse::adjustment_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCreateResponse::adjustment_interval + + type adjustment = + Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment + | Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment + | Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment + | Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment + | Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + + class Adjustment < Orb::Union + type plan_phase_usage_discount_adjustment = + { + id: String, + adjustment_type: :usage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float + } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :usage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + attr_accessor usage_discount: Float + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float, + adjustment_type: :usage_discount + ) -> void + | ( + ?Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::plan_phase_usage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::plan_phase_usage_discount_adjustment + end + + type plan_phase_amount_discount_adjustment = + { + id: String, + adjustment_type: :amount_discount, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :amount_discount + + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :amount_discount + ) -> void + | ( + ?Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::plan_phase_amount_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::plan_phase_amount_discount_adjustment + end + + type plan_phase_percentage_discount_adjustment = + { + id: String, + adjustment_type: :percentage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :percentage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor percentage_discount: Float + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :percentage_discount + ) -> void + | ( + ?Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::plan_phase_percentage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::plan_phase_percentage_discount_adjustment + end + + type plan_phase_minimum_adjustment = + { + id: String, + adjustment_type: :minimum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :minimum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor item_id: String + + attr_accessor minimum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :minimum + ) -> void + | ( + ?Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::plan_phase_minimum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::plan_phase_minimum_adjustment + end + + type plan_phase_maximum_adjustment = + { + id: String, + adjustment_type: :maximum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :maximum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor maximum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :maximum + ) -> void + | ( + ?Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment + end + + private def self.variants: -> [[:usage_discount, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + end + end + + type billing_cycle_anchor_configuration = + { day: Integer, month: Integer?, year: Integer? } + + class BillingCycleAnchorConfiguration < Orb::BaseModel + attr_accessor day: Integer + + attr_accessor month: Integer? + + attr_accessor year: Integer? + + def initialize: + (day: Integer, month: Integer?, year: Integer?) -> void + | ( + ?Orb::Models::SubscriptionCreateResponse::billing_cycle_anchor_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCreateResponse::billing_cycle_anchor_configuration + end + + type discount_interval = + Orb::Models::SubscriptionCreateResponse::DiscountInterval::AmountDiscountInterval + | Orb::Models::SubscriptionCreateResponse::DiscountInterval::PercentageDiscountInterval + | Orb::Models::SubscriptionCreateResponse::DiscountInterval::UsageDiscountInterval + + class DiscountInterval < Orb::Union + type amount_discount_interval = + { + amount_discount: String, + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :amount, + end_date: Time?, + start_date: Time + } + + class AmountDiscountInterval < Orb::BaseModel + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :amount + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + ( + amount_discount: String, + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time, + discount_type: :amount + ) -> void + | ( + ?Orb::Models::SubscriptionCreateResponse::DiscountInterval::amount_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCreateResponse::DiscountInterval::amount_discount_interval + end + + type percentage_discount_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :percentage, + end_date: Time?, + percentage_discount: Float, + start_date: Time + } + + class PercentageDiscountInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :percentage + + attr_accessor end_date: Time? + + attr_accessor percentage_discount: Float + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + percentage_discount: Float, + start_date: Time, + discount_type: :percentage + ) -> void + | ( + ?Orb::Models::SubscriptionCreateResponse::DiscountInterval::percentage_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCreateResponse::DiscountInterval::percentage_discount_interval + end + + type usage_discount_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :usage, + end_date: Time?, + start_date: Time, + usage_discount: Float + } + + class UsageDiscountInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :usage + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + attr_accessor usage_discount: Float + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time, + usage_discount: Float, + discount_type: :usage + ) -> void + | ( + ?Orb::Models::SubscriptionCreateResponse::DiscountInterval::usage_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCreateResponse::DiscountInterval::usage_discount_interval + end + + private def self.variants: -> [[:amount, Orb::Models::SubscriptionCreateResponse::DiscountInterval::AmountDiscountInterval], [:percentage, Orb::Models::SubscriptionCreateResponse::DiscountInterval::PercentageDiscountInterval], [:usage, Orb::Models::SubscriptionCreateResponse::DiscountInterval::UsageDiscountInterval]] + end + + type fixed_fee_quantity_schedule = + { end_date: Time?, price_id: String, quantity: Float, start_date: Time } + + class FixedFeeQuantitySchedule < Orb::BaseModel + attr_accessor end_date: Time? + + attr_accessor price_id: String + + attr_accessor quantity: Float + + attr_accessor start_date: Time + + def initialize: + ( + end_date: Time?, + price_id: String, + quantity: Float, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionCreateResponse::fixed_fee_quantity_schedule + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCreateResponse::fixed_fee_quantity_schedule + end + + type maximum_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + maximum_amount: String, + start_date: Time + } + + class MaximumInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor maximum_amount: String + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + maximum_amount: String, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionCreateResponse::maximum_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCreateResponse::maximum_interval + end + + type minimum_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + minimum_amount: String, + start_date: Time + } + + class MinimumInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor minimum_amount: String + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + minimum_amount: String, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionCreateResponse::minimum_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCreateResponse::minimum_interval + end + + type price_interval = + { + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + end_date: Time?, + filter: String?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionCreateResponse::PriceInterval::FixedFeeQuantityTransition]?, + price: Orb::Models::price, + start_date: Time, + usage_customer_ids: ::Array[String]? + } + + class PriceInterval < Orb::BaseModel + attr_accessor id: String + + attr_accessor billing_cycle_day: Integer + + attr_accessor current_billing_period_end_date: Time? + + attr_accessor current_billing_period_start_date: Time? + + attr_accessor end_date: Time? + + attr_accessor filter: String? + + attr_accessor fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionCreateResponse::PriceInterval::FixedFeeQuantityTransition]? + + attr_accessor price: Orb::Models::price + + attr_accessor start_date: Time + + attr_accessor usage_customer_ids: ::Array[String]? + + def initialize: + ( + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + end_date: Time?, + filter: String?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionCreateResponse::PriceInterval::FixedFeeQuantityTransition]?, + price: Orb::Models::price, + start_date: Time, + usage_customer_ids: ::Array[String]? + ) -> void + | ( + ?Orb::Models::SubscriptionCreateResponse::price_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCreateResponse::price_interval + + type fixed_fee_quantity_transition = + { effective_date: Time, price_id: String, quantity: Integer } + + class FixedFeeQuantityTransition < Orb::BaseModel + attr_accessor effective_date: Time + + attr_accessor price_id: String + + attr_accessor quantity: Integer + + def initialize: + (effective_date: Time, price_id: String, quantity: Integer) -> void + | ( + ?Orb::Models::SubscriptionCreateResponse::PriceInterval::fixed_fee_quantity_transition + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCreateResponse::PriceInterval::fixed_fee_quantity_transition + end + end + + type redeemed_coupon = + { coupon_id: String, end_date: Time?, start_date: Time } + + class RedeemedCoupon < Orb::BaseModel + attr_accessor coupon_id: String + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + (coupon_id: String, end_date: Time?, start_date: Time) -> void + | ( + ?Orb::Models::SubscriptionCreateResponse::redeemed_coupon + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCreateResponse::redeemed_coupon + end + + type status = :active | :ended | :upcoming + + class Status < Orb::Enum + ACTIVE: :active + ENDED: :ended + UPCOMING: :upcoming + + def self.values: -> ::Array[Orb::Models::SubscriptionCreateResponse::status] + end + + type trial_info = { end_date: Time? } + + class TrialInfo < Orb::BaseModel + attr_accessor end_date: Time? + + def initialize: + (end_date: Time?) -> void + | ( + ?Orb::Models::SubscriptionCreateResponse::trial_info + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionCreateResponse::trial_info + end + end + end +end diff --git a/sig/orb/models/subscription_fetch_costs_response.rbs b/sig/orb/models/subscription_fetch_costs_response.rbs index fda66cc9..8d28c0f5 100644 --- a/sig/orb/models/subscription_fetch_costs_response.rbs +++ b/sig/orb/models/subscription_fetch_costs_response.rbs @@ -1,18 +1,92 @@ module Orb module Models type subscription_fetch_costs_response = - { data: ::Array[Orb::Models::AggregatedCostModel] } + { data: ::Array[Orb::Models::SubscriptionFetchCostsResponse::Data] } class SubscriptionFetchCostsResponse < Orb::BaseModel - attr_accessor data: ::Array[Orb::Models::AggregatedCostModel] + attr_accessor data: ::Array[Orb::Models::SubscriptionFetchCostsResponse::Data] def initialize: - (data: ::Array[Orb::Models::AggregatedCostModel]) -> void + ( + data: ::Array[Orb::Models::SubscriptionFetchCostsResponse::Data] + ) -> void | ( ?Orb::Models::subscription_fetch_costs_response | Orb::BaseModel data ) -> void def to_hash: -> Orb::Models::subscription_fetch_costs_response + + type data = + { + per_price_costs: ::Array[Orb::Models::SubscriptionFetchCostsResponse::Data::PerPriceCost], + subtotal: String, + timeframe_end: Time, + timeframe_start: Time, + total: String + } + + class Data < Orb::BaseModel + attr_accessor per_price_costs: ::Array[Orb::Models::SubscriptionFetchCostsResponse::Data::PerPriceCost] + + attr_accessor subtotal: String + + attr_accessor timeframe_end: Time + + attr_accessor timeframe_start: Time + + attr_accessor total: String + + def initialize: + ( + per_price_costs: ::Array[Orb::Models::SubscriptionFetchCostsResponse::Data::PerPriceCost], + subtotal: String, + timeframe_end: Time, + timeframe_start: Time, + total: String + ) -> void + | ( + ?Orb::Models::SubscriptionFetchCostsResponse::data + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionFetchCostsResponse::data + + type per_price_cost = + { + price: Orb::Models::price, + price_id: String, + subtotal: String, + total: String, + quantity: Float? + } + + class PerPriceCost < Orb::BaseModel + attr_accessor price: Orb::Models::price + + attr_accessor price_id: String + + attr_accessor subtotal: String + + attr_accessor total: String + + attr_accessor quantity: Float? + + def initialize: + ( + price: Orb::Models::price, + price_id: String, + subtotal: String, + total: String, + quantity: Float? + ) -> void + | ( + ?Orb::Models::SubscriptionFetchCostsResponse::Data::per_price_cost + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionFetchCostsResponse::Data::per_price_cost + end + end end end end diff --git a/sig/orb/models/subscription_fetch_schedule_response.rbs b/sig/orb/models/subscription_fetch_schedule_response.rbs index e1feaf29..1d25b050 100644 --- a/sig/orb/models/subscription_fetch_schedule_response.rbs +++ b/sig/orb/models/subscription_fetch_schedule_response.rbs @@ -4,7 +4,7 @@ module Orb { created_at: Time, end_date: Time?, - plan: Orb::Models::PlanMinifiedModel, + plan: Orb::Models::SubscriptionFetchScheduleResponse::Plan, start_date: Time } @@ -13,7 +13,7 @@ module Orb attr_accessor end_date: Time? - attr_accessor plan: Orb::Models::PlanMinifiedModel + attr_accessor plan: Orb::Models::SubscriptionFetchScheduleResponse::Plan attr_accessor start_date: Time @@ -21,7 +21,7 @@ module Orb ( created_at: Time, end_date: Time?, - plan: Orb::Models::PlanMinifiedModel, + plan: Orb::Models::SubscriptionFetchScheduleResponse::Plan, start_date: Time ) -> void | ( @@ -30,6 +30,25 @@ module Orb ) -> void def to_hash: -> Orb::Models::subscription_fetch_schedule_response + + type plan = { id: String?, external_plan_id: String?, name: String? } + + class Plan < Orb::BaseModel + attr_accessor id: String? + + attr_accessor external_plan_id: String? + + attr_accessor name: String? + + def initialize: + (id: String?, external_plan_id: String?, name: String?) -> void + | ( + ?Orb::Models::SubscriptionFetchScheduleResponse::plan + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionFetchScheduleResponse::plan + end end end end diff --git a/sig/orb/models/subscription_minified_model.rbs b/sig/orb/models/subscription_minified_model.rbs deleted file mode 100644 index 1d9dd150..00000000 --- a/sig/orb/models/subscription_minified_model.rbs +++ /dev/null @@ -1,17 +0,0 @@ -module Orb - module Models - type subscription_minified_model = { id: String } - - class SubscriptionMinifiedModel < Orb::BaseModel - attr_accessor id: String - - def initialize: - (id: String) -> void - | ( - ?Orb::Models::subscription_minified_model | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::subscription_minified_model - end - end -end diff --git a/sig/orb/models/subscription_model.rbs b/sig/orb/models/subscription_model.rbs deleted file mode 100644 index c1e50d77..00000000 --- a/sig/orb/models/subscription_model.rbs +++ /dev/null @@ -1,135 +0,0 @@ -module Orb - module Models - type subscription_model = - { - id: String, - active_plan_phase_order: Integer?, - adjustment_intervals: ::Array[Orb::Models::AdjustmentIntervalModel], - auto_collection: bool?, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, - billing_cycle_day: Integer, - created_at: Time, - current_billing_period_end_date: Time?, - current_billing_period_start_date: Time?, - customer: Orb::Models::CustomerModel, - default_invoice_memo: String?, - discount_intervals: ::Array[Orb::Models::SubscriptionModel::discount_interval], - end_date: Time?, - fixed_fee_quantity_schedule: ::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel], - invoicing_threshold: String?, - maximum_intervals: ::Array[Orb::Models::MaximumIntervalModel], - metadata: ::Hash[Symbol, String], - minimum_intervals: ::Array[Orb::Models::MinimumIntervalModel], - net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: ::Array[Orb::Models::PriceIntervalModel], - redeemed_coupon: Orb::Models::CouponRedemptionModel?, - start_date: Time, - status: Orb::Models::SubscriptionModel::status, - trial_info: Orb::Models::SubscriptionTrialInfoModel - } - - class SubscriptionModel < Orb::BaseModel - attr_accessor id: String - - attr_accessor active_plan_phase_order: Integer? - - attr_accessor adjustment_intervals: ::Array[Orb::Models::AdjustmentIntervalModel] - - attr_accessor auto_collection: bool? - - attr_accessor billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel - - attr_accessor billing_cycle_day: Integer - - attr_accessor created_at: Time - - attr_accessor current_billing_period_end_date: Time? - - attr_accessor current_billing_period_start_date: Time? - - attr_accessor customer: Orb::Models::CustomerModel - - attr_accessor default_invoice_memo: String? - - attr_accessor discount_intervals: ::Array[Orb::Models::SubscriptionModel::discount_interval] - - attr_accessor end_date: Time? - - attr_accessor fixed_fee_quantity_schedule: ::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel] - - attr_accessor invoicing_threshold: String? - - attr_accessor maximum_intervals: ::Array[Orb::Models::MaximumIntervalModel] - - attr_accessor metadata: ::Hash[Symbol, String] - - attr_accessor minimum_intervals: ::Array[Orb::Models::MinimumIntervalModel] - - attr_accessor net_terms: Integer - - attr_accessor plan: Orb::Models::PlanModel - - attr_accessor price_intervals: ::Array[Orb::Models::PriceIntervalModel] - - attr_accessor redeemed_coupon: Orb::Models::CouponRedemptionModel? - - attr_accessor start_date: Time - - attr_accessor status: Orb::Models::SubscriptionModel::status - - attr_accessor trial_info: Orb::Models::SubscriptionTrialInfoModel - - def initialize: - ( - id: String, - active_plan_phase_order: Integer?, - adjustment_intervals: ::Array[Orb::Models::AdjustmentIntervalModel], - auto_collection: bool?, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, - billing_cycle_day: Integer, - created_at: Time, - current_billing_period_end_date: Time?, - current_billing_period_start_date: Time?, - customer: Orb::Models::CustomerModel, - default_invoice_memo: String?, - discount_intervals: ::Array[Orb::Models::SubscriptionModel::discount_interval], - end_date: Time?, - fixed_fee_quantity_schedule: ::Array[Orb::Models::FixedFeeQuantityScheduleEntryModel], - invoicing_threshold: String?, - maximum_intervals: ::Array[Orb::Models::MaximumIntervalModel], - metadata: ::Hash[Symbol, String], - minimum_intervals: ::Array[Orb::Models::MinimumIntervalModel], - net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: ::Array[Orb::Models::PriceIntervalModel], - redeemed_coupon: Orb::Models::CouponRedemptionModel?, - start_date: Time, - status: Orb::Models::SubscriptionModel::status, - trial_info: Orb::Models::SubscriptionTrialInfoModel - ) -> void - | (?Orb::Models::subscription_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::subscription_model - - type discount_interval = - Orb::Models::AmountDiscountIntervalModel - | Orb::Models::PercentageDiscountIntervalModel - | Orb::Models::UsageDiscountIntervalModel - - class DiscountInterval < Orb::Union - private def self.variants: -> [[:amount, Orb::Models::AmountDiscountIntervalModel], [:percentage, Orb::Models::PercentageDiscountIntervalModel], [:usage, Orb::Models::UsageDiscountIntervalModel]] - end - - type status = :active | :ended | :upcoming - - class Status < Orb::Enum - ACTIVE: :active - ENDED: :ended - UPCOMING: :upcoming - - def self.values: -> ::Array[Orb::Models::SubscriptionModel::status] - end - end - end -end diff --git a/sig/orb/models/subscription_price_intervals_params.rbs b/sig/orb/models/subscription_price_intervals_params.rbs index 2da9ea97..6e4031df 100644 --- a/sig/orb/models/subscription_price_intervals_params.rbs +++ b/sig/orb/models/subscription_price_intervals_params.rbs @@ -59,15 +59,15 @@ module Orb type add = { start_date: Orb::Models::SubscriptionPriceIntervalsParams::Add::start_date, - allocation_price: Orb::Models::NewAllocationPriceModel?, + allocation_price: Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice?, discounts: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::discount]?, end_date: Orb::Models::SubscriptionPriceIntervalsParams::Add::end_date?, external_price_id: String?, filter: String?, - fixed_fee_quantity_transitions: ::Array[Orb::Models::PriceIntervalFixedFeeQuantityTransitionModel]?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::FixedFeeQuantityTransition]?, maximum_amount: Float?, minimum_amount: Float?, - price: Orb::Models::new_floating_price_model?, + price: Orb::Models::SubscriptionPriceIntervalsParams::Add::price?, price_id: String?, usage_customer_ids: ::Array[String]? } @@ -75,7 +75,7 @@ module Orb class Add < Orb::BaseModel attr_accessor start_date: Orb::Models::SubscriptionPriceIntervalsParams::Add::start_date - attr_accessor allocation_price: Orb::Models::NewAllocationPriceModel? + attr_accessor allocation_price: Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice? attr_accessor discounts: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::discount]? @@ -85,13 +85,13 @@ module Orb attr_accessor filter: String? - attr_accessor fixed_fee_quantity_transitions: ::Array[Orb::Models::PriceIntervalFixedFeeQuantityTransitionModel]? + attr_accessor fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::FixedFeeQuantityTransition]? attr_accessor maximum_amount: Float? attr_accessor minimum_amount: Float? - attr_accessor price: Orb::Models::new_floating_price_model? + attr_accessor price: Orb::Models::SubscriptionPriceIntervalsParams::Add::price? attr_accessor price_id: String? @@ -100,15 +100,15 @@ module Orb def initialize: ( start_date: Orb::Models::SubscriptionPriceIntervalsParams::Add::start_date, - allocation_price: Orb::Models::NewAllocationPriceModel?, + allocation_price: Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice?, discounts: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::discount]?, end_date: Orb::Models::SubscriptionPriceIntervalsParams::Add::end_date?, external_price_id: String?, filter: String?, - fixed_fee_quantity_transitions: ::Array[Orb::Models::PriceIntervalFixedFeeQuantityTransitionModel]?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::FixedFeeQuantityTransition]?, maximum_amount: Float?, minimum_amount: Float?, - price: Orb::Models::new_floating_price_model?, + price: Orb::Models::SubscriptionPriceIntervalsParams::Add::price?, price_id: String?, usage_customer_ids: ::Array[String]? ) -> void @@ -125,85 +125,5024 @@ module Orb private def self.variants: -> [[nil, Time], [nil, Orb::Models::billing_cycle_relative_date]] end + type allocation_price = + { + amount: String, + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice::cadence, + currency: String, + expires_at_end_of_cadence: bool + } + + class AllocationPrice < Orb::BaseModel + attr_accessor amount: String + + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice::cadence + + attr_accessor currency: String + + attr_accessor expires_at_end_of_cadence: bool + + def initialize: + ( + amount: String, + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice::cadence, + currency: String, + expires_at_end_of_cadence: bool + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::allocation_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::allocation_price + + type cadence = + :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom + + class Cadence < Orb::Enum + ONE_TIME: :one_time + MONTHLY: :monthly + QUARTERLY: :quarterly + SEMI_ANNUAL: :semi_annual + ANNUAL: :annual + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice::cadence] + end + end + type discount = Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::AmountDiscountCreationParams | Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::PercentageDiscountCreationParams | Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::UsageDiscountCreationParams - class Discount < Orb::Union - type amount_discount_creation_params = - { amount_discount: Float, discount_type: :amount } + class Discount < Orb::Union + type amount_discount_creation_params = + { amount_discount: Float, discount_type: :amount } + + class AmountDiscountCreationParams < Orb::BaseModel + attr_accessor amount_discount: Float + + attr_accessor discount_type: :amount + + def initialize: + (amount_discount: Float, discount_type: :amount) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::amount_discount_creation_params + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::amount_discount_creation_params + end + + type percentage_discount_creation_params = + { discount_type: :percentage, percentage_discount: Float } + + class PercentageDiscountCreationParams < Orb::BaseModel + attr_accessor discount_type: :percentage + + attr_accessor percentage_discount: Float + + def initialize: + (percentage_discount: Float, discount_type: :percentage) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::percentage_discount_creation_params + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::percentage_discount_creation_params + end + + type usage_discount_creation_params = + { discount_type: :usage, usage_discount: Float } + + class UsageDiscountCreationParams < Orb::BaseModel + attr_accessor discount_type: :usage + + attr_accessor usage_discount: Float + + def initialize: + (usage_discount: Float, discount_type: :usage) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::usage_discount_creation_params + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::usage_discount_creation_params + end + + private def self.variants: -> [[:amount, Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::AmountDiscountCreationParams], [:percentage, Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::PercentageDiscountCreationParams], [:usage, Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::UsageDiscountCreationParams]] + end + + type end_date = Time | Orb::Models::billing_cycle_relative_date + + class EndDate < Orb::Union + private def self.variants: -> [[nil, Time], [nil, Orb::Models::billing_cycle_relative_date]] + end + + type fixed_fee_quantity_transition = + { effective_date: Time, quantity: Integer } + + class FixedFeeQuantityTransition < Orb::BaseModel + attr_accessor effective_date: Time + + attr_accessor quantity: Integer + + def initialize: + (effective_date: Time, quantity: Integer) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::fixed_fee_quantity_transition + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::fixed_fee_quantity_transition + end + + type price = + Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice + | Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice + + class Price < Orb::Union + type new_floating_unit_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::cadence, + currency: String, + item_id: String, + model_type: :unit, + name: String, + unit_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingUnitPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor model_type: :unit + + attr_accessor name: String + + attr_accessor unit_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::UnitConfig + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::cadence, + currency: String, + item_id: String, + name: String, + unit_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_unit_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_unit_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::cadence] + end + + type unit_config = { unit_amount: String } + + class UnitConfig < Orb::BaseModel + attr_accessor unit_amount: String + + def initialize: + (unit_amount: String) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::unit_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::unit_config + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_package_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::cadence, + currency: String, + item_id: String, + model_type: :package, + name: String, + package_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::PackageConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingPackagePrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor model_type: :package + + attr_accessor name: String + + attr_accessor package_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::PackageConfig + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::cadence, + currency: String, + item_id: String, + name: String, + package_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::PackageConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :package + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_package_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_package_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::cadence] + end + + type package_config = + { package_amount: String, package_size: Integer } + + class PackageConfig < Orb::BaseModel + attr_accessor package_amount: String + + attr_accessor package_size: Integer + + def initialize: + (package_amount: String, package_size: Integer) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::package_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::package_config + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_matrix_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::cadence, + currency: String, + item_id: String, + matrix_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::MatrixConfig, + model_type: :matrix, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingMatrixPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor matrix_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::MatrixConfig + + attr_accessor model_type: :matrix + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::cadence, + currency: String, + item_id: String, + matrix_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::MatrixConfig, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :matrix + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_matrix_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_matrix_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::cadence] + end + + type matrix_config = + { + default_unit_amount: String, + dimensions: ::Array[String?], + matrix_values: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::MatrixConfig::MatrixValue] + } + + class MatrixConfig < Orb::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor matrix_values: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::MatrixConfig::MatrixValue] + + def initialize: + ( + default_unit_amount: String, + dimensions: ::Array[String?], + matrix_values: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::MatrixConfig::MatrixValue] + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::matrix_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::matrix_config + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: + ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::MatrixConfig::matrix_value + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::MatrixConfig::matrix_value + end + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_matrix_with_allocation_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::cadence, + currency: String, + item_id: String, + matrix_with_allocation_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::MatrixWithAllocationConfig, + model_type: :matrix_with_allocation, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingMatrixWithAllocationPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor matrix_with_allocation_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::MatrixWithAllocationConfig + + attr_accessor model_type: :matrix_with_allocation + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::cadence, + currency: String, + item_id: String, + matrix_with_allocation_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::MatrixWithAllocationConfig, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :matrix_with_allocation + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_matrix_with_allocation_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_matrix_with_allocation_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::cadence] + end + + type matrix_with_allocation_config = + { + allocation: Float, + default_unit_amount: String, + dimensions: ::Array[String?], + matrix_values: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::MatrixWithAllocationConfig::MatrixValue] + } + + class MatrixWithAllocationConfig < Orb::BaseModel + attr_accessor allocation: Float + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor matrix_values: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::MatrixWithAllocationConfig::MatrixValue] + + def initialize: + ( + allocation: Float, + default_unit_amount: String, + dimensions: ::Array[String?], + matrix_values: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::MatrixWithAllocationConfig::MatrixValue] + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::matrix_with_allocation_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::matrix_with_allocation_config + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: + ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::MatrixWithAllocationConfig::matrix_value + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::MatrixWithAllocationConfig::matrix_value + end + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_tiered_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::cadence, + currency: String, + item_id: String, + model_type: :tiered, + name: String, + tiered_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::TieredConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingTieredPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor model_type: :tiered + + attr_accessor name: String + + attr_accessor tiered_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::TieredConfig + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::cadence, + currency: String, + item_id: String, + name: String, + tiered_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::TieredConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :tiered + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_tiered_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_tiered_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::cadence] + end + + type tiered_config = + { + tiers: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::TieredConfig::Tier] + } + + class TieredConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::TieredConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::TieredConfig::Tier] + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::tiered_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::tiered_config + + type tier = + { first_unit: Float, unit_amount: String, last_unit: Float? } + + class Tier < Orb::BaseModel + attr_accessor first_unit: Float + + attr_accessor unit_amount: String + + attr_accessor last_unit: Float? + + def initialize: + ( + first_unit: Float, + unit_amount: String, + last_unit: Float? + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::TieredConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::TieredConfig::tier + end + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_tiered_bps_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::cadence, + currency: String, + item_id: String, + model_type: :tiered_bps, + name: String, + tiered_bps_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::TieredBpsConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingTieredBpsPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor model_type: :tiered_bps + + attr_accessor name: String + + attr_accessor tiered_bps_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::TieredBpsConfig + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::cadence, + currency: String, + item_id: String, + name: String, + tiered_bps_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::TieredBpsConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :tiered_bps + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_tiered_bps_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_tiered_bps_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::cadence] + end + + type tiered_bps_config = + { + tiers: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::TieredBpsConfig::Tier] + } + + class TieredBpsConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::TieredBpsConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::TieredBpsConfig::Tier] + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::tiered_bps_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::tiered_bps_config + + type tier = + { + bps: Float, + minimum_amount: String, + maximum_amount: String?, + per_unit_maximum: String? + } + + class Tier < Orb::BaseModel + attr_accessor bps: Float + + attr_accessor minimum_amount: String + + attr_accessor maximum_amount: String? + + attr_accessor per_unit_maximum: String? + + def initialize: + ( + bps: Float, + minimum_amount: String, + maximum_amount: String?, + per_unit_maximum: String? + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::TieredBpsConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::TieredBpsConfig::tier + end + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_bps_price = + { + bps_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BpsConfig, + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::cadence, + currency: String, + item_id: String, + model_type: :bps, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingBpsPrice < Orb::BaseModel + attr_accessor bps_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BpsConfig + + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor model_type: :bps + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + bps_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BpsConfig, + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::cadence, + currency: String, + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :bps + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_bps_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_bps_price + + type bps_config = { bps: Float, per_unit_maximum: String? } + + class BpsConfig < Orb::BaseModel + attr_accessor bps: Float + + attr_accessor per_unit_maximum: String? + + def initialize: + (bps: Float, per_unit_maximum: String?) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::bps_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::bps_config + end + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_bulk_bps_price = + { + bulk_bps_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig, + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::cadence, + currency: String, + item_id: String, + model_type: :bulk_bps, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingBulkBpsPrice < Orb::BaseModel + attr_accessor bulk_bps_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig + + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor model_type: :bulk_bps + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + bulk_bps_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig, + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::cadence, + currency: String, + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :bulk_bps + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_bulk_bps_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_bulk_bps_price + + type bulk_bps_config = + { + tiers: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig::Tier] + } + + class BulkBpsConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig::Tier] + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::bulk_bps_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::bulk_bps_config + + type tier = + { + bps: Float, + maximum_amount: String?, + per_unit_maximum: String? + } + + class Tier < Orb::BaseModel + attr_accessor bps: Float + + attr_accessor maximum_amount: String? + + attr_accessor per_unit_maximum: String? + + def initialize: + ( + bps: Float, + maximum_amount: String?, + per_unit_maximum: String? + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig::tier + end + end + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_bulk_price = + { + bulk_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig, + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::cadence, + currency: String, + item_id: String, + model_type: :bulk, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingBulkPrice < Orb::BaseModel + attr_accessor bulk_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig + + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor model_type: :bulk + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + bulk_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig, + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::cadence, + currency: String, + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :bulk + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_bulk_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_bulk_price + + type bulk_config = + { + tiers: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig::Tier] + } + + class BulkConfig < Orb::BaseModel + attr_accessor tiers: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig::Tier] + + def initialize: + ( + tiers: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig::Tier] + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::bulk_config + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::bulk_config + + type tier = { unit_amount: String, maximum_units: Float? } + + class Tier < Orb::BaseModel + attr_accessor unit_amount: String + + attr_accessor maximum_units: Float? + + def initialize: + (unit_amount: String, maximum_units: Float?) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig::tier + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig::tier + end + end + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_threshold_total_amount_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::cadence, + currency: String, + item_id: String, + model_type: :threshold_total_amount, + name: String, + threshold_total_amount_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingThresholdTotalAmountPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor model_type: :threshold_total_amount + + attr_accessor name: String + + attr_accessor threshold_total_amount_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::cadence, + currency: String, + item_id: String, + name: String, + threshold_total_amount_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :threshold_total_amount + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_threshold_total_amount_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_threshold_total_amount_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_tiered_package_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::cadence, + currency: String, + item_id: String, + model_type: :tiered_package, + name: String, + tiered_package_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingTieredPackagePrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor model_type: :tiered_package + + attr_accessor name: String + + attr_accessor tiered_package_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::cadence, + currency: String, + item_id: String, + name: String, + tiered_package_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :tiered_package + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_tiered_package_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_tiered_package_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_grouped_tiered_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::cadence, + currency: String, + grouped_tiered_config: ::Hash[Symbol, top], + item_id: String, + model_type: :grouped_tiered, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingGroupedTieredPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::cadence + + attr_accessor currency: String + + attr_accessor grouped_tiered_config: ::Hash[Symbol, top] + + attr_accessor item_id: String + + attr_accessor model_type: :grouped_tiered + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::cadence, + currency: String, + grouped_tiered_config: ::Hash[Symbol, top], + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :grouped_tiered + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_grouped_tiered_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_grouped_tiered_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_max_group_tiered_package_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::cadence, + currency: String, + item_id: String, + max_group_tiered_package_config: ::Hash[Symbol, top], + model_type: :max_group_tiered_package, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingMaxGroupTieredPackagePrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor max_group_tiered_package_config: ::Hash[Symbol, top] + + attr_accessor model_type: :max_group_tiered_package + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::cadence, + currency: String, + item_id: String, + max_group_tiered_package_config: ::Hash[Symbol, top], + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :max_group_tiered_package + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_max_group_tiered_package_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_max_group_tiered_package_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_tiered_with_minimum_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::cadence, + currency: String, + item_id: String, + model_type: :tiered_with_minimum, + name: String, + tiered_with_minimum_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingTieredWithMinimumPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor model_type: :tiered_with_minimum + + attr_accessor name: String + + attr_accessor tiered_with_minimum_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::cadence, + currency: String, + item_id: String, + name: String, + tiered_with_minimum_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :tiered_with_minimum + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_tiered_with_minimum_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_tiered_with_minimum_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_package_with_allocation_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::cadence, + currency: String, + item_id: String, + model_type: :package_with_allocation, + name: String, + package_with_allocation_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingPackageWithAllocationPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor model_type: :package_with_allocation + + attr_accessor name: String + + attr_accessor package_with_allocation_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::cadence, + currency: String, + item_id: String, + name: String, + package_with_allocation_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :package_with_allocation + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_package_with_allocation_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_package_with_allocation_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_tiered_package_with_minimum_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::cadence, + currency: String, + item_id: String, + model_type: :tiered_package_with_minimum, + name: String, + tiered_package_with_minimum_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingTieredPackageWithMinimumPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor model_type: :tiered_package_with_minimum + + attr_accessor name: String + + attr_accessor tiered_package_with_minimum_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::cadence, + currency: String, + item_id: String, + name: String, + tiered_package_with_minimum_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :tiered_package_with_minimum + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_tiered_package_with_minimum_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_tiered_package_with_minimum_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_unit_with_percent_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::cadence, + currency: String, + item_id: String, + model_type: :unit_with_percent, + name: String, + unit_with_percent_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingUnitWithPercentPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor model_type: :unit_with_percent + + attr_accessor name: String + + attr_accessor unit_with_percent_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::cadence, + currency: String, + item_id: String, + name: String, + unit_with_percent_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :unit_with_percent + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_unit_with_percent_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_unit_with_percent_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_tiered_with_proration_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::cadence, + currency: String, + item_id: String, + model_type: :tiered_with_proration, + name: String, + tiered_with_proration_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingTieredWithProrationPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor model_type: :tiered_with_proration + + attr_accessor name: String + + attr_accessor tiered_with_proration_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::cadence, + currency: String, + item_id: String, + name: String, + tiered_with_proration_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :tiered_with_proration + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_tiered_with_proration_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_tiered_with_proration_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_unit_with_proration_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::cadence, + currency: String, + item_id: String, + model_type: :unit_with_proration, + name: String, + unit_with_proration_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingUnitWithProrationPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor model_type: :unit_with_proration + + attr_accessor name: String + + attr_accessor unit_with_proration_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::cadence, + currency: String, + item_id: String, + name: String, + unit_with_proration_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :unit_with_proration + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_unit_with_proration_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_unit_with_proration_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_grouped_allocation_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::cadence, + currency: String, + grouped_allocation_config: ::Hash[Symbol, top], + item_id: String, + model_type: :grouped_allocation, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingGroupedAllocationPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::cadence + + attr_accessor currency: String + + attr_accessor grouped_allocation_config: ::Hash[Symbol, top] + + attr_accessor item_id: String + + attr_accessor model_type: :grouped_allocation + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::cadence, + currency: String, + grouped_allocation_config: ::Hash[Symbol, top], + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :grouped_allocation + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_grouped_allocation_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_grouped_allocation_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_grouped_with_prorated_minimum_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::cadence, + currency: String, + grouped_with_prorated_minimum_config: ::Hash[Symbol, top], + item_id: String, + model_type: :grouped_with_prorated_minimum, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingGroupedWithProratedMinimumPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::cadence + + attr_accessor currency: String + + attr_accessor grouped_with_prorated_minimum_config: ::Hash[Symbol, top] + + attr_accessor item_id: String + + attr_accessor model_type: :grouped_with_prorated_minimum + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::cadence, + currency: String, + grouped_with_prorated_minimum_config: ::Hash[Symbol, top], + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :grouped_with_prorated_minimum + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_grouped_with_prorated_minimum_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_grouped_with_prorated_minimum_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_grouped_with_metered_minimum_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::cadence, + currency: String, + grouped_with_metered_minimum_config: ::Hash[Symbol, top], + item_id: String, + model_type: :grouped_with_metered_minimum, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingGroupedWithMeteredMinimumPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::cadence + + attr_accessor currency: String + + attr_accessor grouped_with_metered_minimum_config: ::Hash[Symbol, top] + + attr_accessor item_id: String + + attr_accessor model_type: :grouped_with_metered_minimum + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::cadence, + currency: String, + grouped_with_metered_minimum_config: ::Hash[Symbol, top], + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :grouped_with_metered_minimum + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_grouped_with_metered_minimum_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_grouped_with_metered_minimum_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_matrix_with_display_name_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::cadence, + currency: String, + item_id: String, + matrix_with_display_name_config: ::Hash[Symbol, top], + model_type: :matrix_with_display_name, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingMatrixWithDisplayNamePrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor matrix_with_display_name_config: ::Hash[Symbol, top] + + attr_accessor model_type: :matrix_with_display_name + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::cadence, + currency: String, + item_id: String, + matrix_with_display_name_config: ::Hash[Symbol, top], + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :matrix_with_display_name + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_matrix_with_display_name_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_matrix_with_display_name_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_bulk_with_proration_price = + { + bulk_with_proration_config: ::Hash[Symbol, top], + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::cadence, + currency: String, + item_id: String, + model_type: :bulk_with_proration, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingBulkWithProrationPrice < Orb::BaseModel + attr_accessor bulk_with_proration_config: ::Hash[Symbol, top] + + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor model_type: :bulk_with_proration + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + bulk_with_proration_config: ::Hash[Symbol, top], + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::cadence, + currency: String, + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :bulk_with_proration + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_bulk_with_proration_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_bulk_with_proration_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month - class AmountDiscountCreationParams < Orb::BaseModel - attr_accessor amount_discount: Float + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month - attr_accessor discount_type: :amount + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + type new_floating_grouped_tiered_package_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::cadence, + currency: String, + grouped_tiered_package_config: ::Hash[Symbol, top], + item_id: String, + model_type: :grouped_tiered_package, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } + + class NewFloatingGroupedTieredPackagePrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::cadence + + attr_accessor currency: String + + attr_accessor grouped_tiered_package_config: ::Hash[Symbol, top] + + attr_accessor item_id: String + + attr_accessor model_type: :grouped_tiered_package + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: - (amount_discount: Float, discount_type: :amount) -> void + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::cadence, + currency: String, + grouped_tiered_package_config: ::Hash[Symbol, top], + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :grouped_tiered_package + ) -> void | ( - ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::amount_discount_creation_params + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_grouped_tiered_package_price | Orb::BaseModel data ) -> void - def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::amount_discount_creation_params + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_grouped_tiered_package_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice::InvoicingCycleConfiguration::duration_unit] + end + end end - type percentage_discount_creation_params = - { discount_type: :percentage, percentage_discount: Float } + type new_floating_scalable_matrix_with_unit_pricing_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::cadence, + currency: String, + item_id: String, + model_type: :scalable_matrix_with_unit_pricing, + name: String, + scalable_matrix_with_unit_pricing_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } - class PercentageDiscountCreationParams < Orb::BaseModel - attr_accessor discount_type: :percentage + class NewFloatingScalableMatrixWithUnitPricingPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::cadence - attr_accessor percentage_discount: Float + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor model_type: :scalable_matrix_with_unit_pricing + + attr_accessor name: String + + attr_accessor scalable_matrix_with_unit_pricing_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: - (percentage_discount: Float, discount_type: :percentage) -> void + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::cadence, + currency: String, + item_id: String, + name: String, + scalable_matrix_with_unit_pricing_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :scalable_matrix_with_unit_pricing + ) -> void | ( - ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::percentage_discount_creation_params + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_scalable_matrix_with_unit_pricing_price | Orb::BaseModel data ) -> void - def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::percentage_discount_creation_params + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_scalable_matrix_with_unit_pricing_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice::InvoicingCycleConfiguration::duration_unit] + end + end end - type usage_discount_creation_params = - { discount_type: :usage, usage_discount: Float } + type new_floating_scalable_matrix_with_tiered_pricing_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::cadence, + currency: String, + item_id: String, + model_type: :scalable_matrix_with_tiered_pricing, + name: String, + scalable_matrix_with_tiered_pricing_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } - class UsageDiscountCreationParams < Orb::BaseModel - attr_accessor discount_type: :usage + class NewFloatingScalableMatrixWithTieredPricingPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::cadence - attr_accessor usage_discount: Float + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor model_type: :scalable_matrix_with_tiered_pricing + + attr_accessor name: String + + attr_accessor scalable_matrix_with_tiered_pricing_config: ::Hash[Symbol, top] + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: - (usage_discount: Float, discount_type: :usage) -> void + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::cadence, + currency: String, + item_id: String, + name: String, + scalable_matrix_with_tiered_pricing_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :scalable_matrix_with_tiered_pricing + ) -> void | ( - ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::usage_discount_creation_params + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_scalable_matrix_with_tiered_pricing_price | Orb::BaseModel data ) -> void - def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::usage_discount_creation_params + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_scalable_matrix_with_tiered_pricing_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice::InvoicingCycleConfiguration::duration_unit] + end + end end - private def self.variants: -> [[:amount, Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::AmountDiscountCreationParams], [:percentage, Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::PercentageDiscountCreationParams], [:usage, Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::UsageDiscountCreationParams]] - end + type new_floating_cumulative_grouped_bulk_price = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::cadence, + cumulative_grouped_bulk_config: ::Hash[Symbol, top], + currency: String, + item_id: String, + model_type: :cumulative_grouped_bulk, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]? + } - type end_date = Time | Orb::Models::billing_cycle_relative_date + class NewFloatingCumulativeGroupedBulkPrice < Orb::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::cadence - class EndDate < Orb::Union - private def self.variants: -> [[nil, Time], [nil, Orb::Models::billing_cycle_relative_date]] + attr_accessor cumulative_grouped_bulk_config: ::Hash[Symbol, top] + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor model_type: :cumulative_grouped_bulk + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::BillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::InvoicingCycleConfiguration? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: + ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::cadence, + cumulative_grouped_bulk_config: ::Hash[Symbol, top], + currency: String, + item_id: String, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, + model_type: :cumulative_grouped_bulk + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_cumulative_grouped_bulk_price + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::new_floating_cumulative_grouped_bulk_price + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + class Cadence < Orb::Enum + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::cadence] + end + + type billing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::BillingCycleConfiguration::duration_unit + } + + class BillingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::BillingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::BillingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::billing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::billing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::BillingCycleConfiguration::duration_unit] + end + end + + type invoicing_cycle_configuration = + { + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::duration_unit + } + + class InvoicingCycleConfiguration < Orb::BaseModel + attr_accessor duration: Integer + + attr_accessor duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::duration_unit + + def initialize: + ( + duration: Integer, + duration_unit: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::duration_unit + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::invoicing_cycle_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::invoicing_cycle_configuration + + type duration_unit = :day | :month + + class DurationUnit < Orb::Enum + DAY: :day + MONTH: :month + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice::InvoicingCycleConfiguration::duration_unit] + end + end + end + + private def self.variants: -> [[:unit, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice], [:package, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice], [:matrix, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice], [:matrix_with_allocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice], [:tiered, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice], [:tiered_bps, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice], [:bps, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice], [:bulk_bps, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice], [:bulk, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice], [:threshold_total_amount, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice], [:tiered_package, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice], [:grouped_tiered, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice], [:max_group_tiered_package, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice], [:tiered_with_minimum, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice], [:package_with_allocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice], [:tiered_package_with_minimum, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice], [:unit_with_percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice], [:tiered_with_proration, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice], [:unit_with_proration, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice], [:grouped_allocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice], [:grouped_with_prorated_minimum, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice], [:grouped_with_metered_minimum, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice], [:matrix_with_display_name, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice], [:bulk_with_proration, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice], [:grouped_tiered_package, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice], [:scalable_matrix_with_unit_pricing, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice], [:scalable_matrix_with_tiered_pricing, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice], [:cumulative_grouped_bulk, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice]] end end type add_adjustment = { - adjustment: Orb::Models::new_adjustment_model, + adjustment: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::adjustment, start_date: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::start_date, end_date: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::end_date? } class AddAdjustment < Orb::BaseModel - attr_accessor adjustment: Orb::Models::new_adjustment_model + attr_accessor adjustment: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::adjustment attr_accessor start_date: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::start_date @@ -211,7 +5150,7 @@ module Orb def initialize: ( - adjustment: Orb::Models::new_adjustment_model, + adjustment: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::adjustment, start_date: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::start_date, end_date: Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::end_date? ) -> void @@ -222,6 +5161,191 @@ module Orb def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::add_adjustment + type adjustment = + Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewPercentageDiscount + | Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewUsageDiscount + | Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewAmountDiscount + | Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMinimum + | Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMaximum + + class Adjustment < Orb::Union + type new_percentage_discount = + { + adjustment_type: :percentage_discount, + applies_to_price_ids: ::Array[String], + percentage_discount: Float, + is_invoice_level: bool + } + + class NewPercentageDiscount < Orb::BaseModel + attr_accessor adjustment_type: :percentage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor percentage_discount: Float + + attr_reader is_invoice_level: bool? + + def is_invoice_level=: (bool) -> bool + + def initialize: + ( + applies_to_price_ids: ::Array[String], + percentage_discount: Float, + is_invoice_level: bool, + adjustment_type: :percentage_discount + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::new_percentage_discount + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::new_percentage_discount + end + + type new_usage_discount = + { + adjustment_type: :usage_discount, + applies_to_price_ids: ::Array[String], + usage_discount: Float, + is_invoice_level: bool + } + + class NewUsageDiscount < Orb::BaseModel + attr_accessor adjustment_type: :usage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor usage_discount: Float + + attr_reader is_invoice_level: bool? + + def is_invoice_level=: (bool) -> bool + + def initialize: + ( + applies_to_price_ids: ::Array[String], + usage_discount: Float, + is_invoice_level: bool, + adjustment_type: :usage_discount + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::new_usage_discount + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::new_usage_discount + end + + type new_amount_discount = + { + adjustment_type: :amount_discount, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool + } + + class NewAmountDiscount < Orb::BaseModel + attr_accessor adjustment_type: :amount_discount + + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_reader is_invoice_level: bool? + + def is_invoice_level=: (bool) -> bool + + def initialize: + ( + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + adjustment_type: :amount_discount + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::new_amount_discount + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::new_amount_discount + end + + type new_minimum = + { + adjustment_type: :minimum, + applies_to_price_ids: ::Array[String], + item_id: String, + minimum_amount: String, + is_invoice_level: bool + } + + class NewMinimum < Orb::BaseModel + attr_accessor adjustment_type: :minimum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor item_id: String + + attr_accessor minimum_amount: String + + attr_reader is_invoice_level: bool? + + def is_invoice_level=: (bool) -> bool + + def initialize: + ( + applies_to_price_ids: ::Array[String], + item_id: String, + minimum_amount: String, + is_invoice_level: bool, + adjustment_type: :minimum + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::new_minimum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::new_minimum + end + + type new_maximum = + { + adjustment_type: :maximum, + applies_to_price_ids: ::Array[String], + maximum_amount: String, + is_invoice_level: bool + } + + class NewMaximum < Orb::BaseModel + attr_accessor adjustment_type: :maximum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor maximum_amount: String + + attr_reader is_invoice_level: bool? + + def is_invoice_level=: (bool) -> bool + + def initialize: + ( + applies_to_price_ids: ::Array[String], + maximum_amount: String, + is_invoice_level: bool, + adjustment_type: :maximum + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::new_maximum + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::new_maximum + end + + private def self.variants: -> [[:percentage_discount, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewPercentageDiscount], [:usage_discount, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewUsageDiscount], [:amount_discount, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewAmountDiscount], [:minimum, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMinimum], [:maximum, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMaximum]] + end + type start_date = Time | Orb::Models::billing_cycle_relative_date class StartDate < Orb::Union @@ -241,7 +5365,7 @@ module Orb billing_cycle_day: Integer?, end_date: Orb::Models::SubscriptionPriceIntervalsParams::Edit::end_date?, filter: String?, - fixed_fee_quantity_transitions: ::Array[Orb::Models::PriceIntervalFixedFeeQuantityTransitionModel]?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Edit::FixedFeeQuantityTransition]?, start_date: Orb::Models::SubscriptionPriceIntervalsParams::Edit::start_date, usage_customer_ids: ::Array[String]? } @@ -255,7 +5379,7 @@ module Orb attr_accessor filter: String? - attr_accessor fixed_fee_quantity_transitions: ::Array[Orb::Models::PriceIntervalFixedFeeQuantityTransitionModel]? + attr_accessor fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Edit::FixedFeeQuantityTransition]? attr_reader start_date: Orb::Models::SubscriptionPriceIntervalsParams::Edit::start_date? @@ -271,7 +5395,7 @@ module Orb billing_cycle_day: Integer?, end_date: Orb::Models::SubscriptionPriceIntervalsParams::Edit::end_date?, filter: String?, - fixed_fee_quantity_transitions: ::Array[Orb::Models::PriceIntervalFixedFeeQuantityTransitionModel]?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Edit::FixedFeeQuantityTransition]?, start_date: Orb::Models::SubscriptionPriceIntervalsParams::Edit::start_date, usage_customer_ids: ::Array[String]? ) -> void @@ -288,6 +5412,24 @@ module Orb private def self.variants: -> [[nil, Time], [nil, Orb::Models::billing_cycle_relative_date]] end + type fixed_fee_quantity_transition = + { effective_date: Time, quantity: Integer } + + class FixedFeeQuantityTransition < Orb::BaseModel + attr_accessor effective_date: Time + + attr_accessor quantity: Integer + + def initialize: + (effective_date: Time, quantity: Integer) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsParams::Edit::fixed_fee_quantity_transition + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Edit::fixed_fee_quantity_transition + end + type start_date = Time | Orb::Models::billing_cycle_relative_date class StartDate < Orb::Union diff --git a/sig/orb/models/subscription_price_intervals_response.rbs b/sig/orb/models/subscription_price_intervals_response.rbs new file mode 100644 index 00000000..985fa4ca --- /dev/null +++ b/sig/orb/models/subscription_price_intervals_response.rbs @@ -0,0 +1,759 @@ +module Orb + module Models + type subscription_price_intervals_response = + { + id: String, + active_plan_phase_order: Integer?, + adjustment_intervals: ::Array[Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval], + auto_collection: bool?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionPriceIntervalsResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + customer: Orb::Models::Customer, + default_invoice_memo: String?, + discount_intervals: ::Array[Orb::Models::SubscriptionPriceIntervalsResponse::discount_interval], + end_date: Time?, + fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionPriceIntervalsResponse::FixedFeeQuantitySchedule], + invoicing_threshold: String?, + maximum_intervals: ::Array[Orb::Models::SubscriptionPriceIntervalsResponse::MaximumInterval], + metadata: ::Hash[Symbol, String], + minimum_intervals: ::Array[Orb::Models::SubscriptionPriceIntervalsResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: ::Array[Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval], + redeemed_coupon: Orb::Models::SubscriptionPriceIntervalsResponse::RedeemedCoupon?, + start_date: Time, + status: Orb::Models::SubscriptionPriceIntervalsResponse::status, + trial_info: Orb::Models::SubscriptionPriceIntervalsResponse::TrialInfo + } + + class SubscriptionPriceIntervalsResponse < Orb::BaseModel + attr_accessor id: String + + attr_accessor active_plan_phase_order: Integer? + + attr_accessor adjustment_intervals: ::Array[Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval] + + attr_accessor auto_collection: bool? + + attr_accessor billing_cycle_anchor_configuration: Orb::Models::SubscriptionPriceIntervalsResponse::BillingCycleAnchorConfiguration + + attr_accessor billing_cycle_day: Integer + + attr_accessor created_at: Time + + attr_accessor current_billing_period_end_date: Time? + + attr_accessor current_billing_period_start_date: Time? + + attr_accessor customer: Orb::Models::Customer + + attr_accessor default_invoice_memo: String? + + attr_accessor discount_intervals: ::Array[Orb::Models::SubscriptionPriceIntervalsResponse::discount_interval] + + attr_accessor end_date: Time? + + attr_accessor fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionPriceIntervalsResponse::FixedFeeQuantitySchedule] + + attr_accessor invoicing_threshold: String? + + attr_accessor maximum_intervals: ::Array[Orb::Models::SubscriptionPriceIntervalsResponse::MaximumInterval] + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor minimum_intervals: ::Array[Orb::Models::SubscriptionPriceIntervalsResponse::MinimumInterval] + + attr_accessor net_terms: Integer + + attr_accessor plan: Orb::Models::Plan + + attr_accessor price_intervals: ::Array[Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval] + + attr_accessor redeemed_coupon: Orb::Models::SubscriptionPriceIntervalsResponse::RedeemedCoupon? + + attr_accessor start_date: Time + + attr_accessor status: Orb::Models::SubscriptionPriceIntervalsResponse::status + + attr_accessor trial_info: Orb::Models::SubscriptionPriceIntervalsResponse::TrialInfo + + def initialize: + ( + id: String, + active_plan_phase_order: Integer?, + adjustment_intervals: ::Array[Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval], + auto_collection: bool?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionPriceIntervalsResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + customer: Orb::Models::Customer, + default_invoice_memo: String?, + discount_intervals: ::Array[Orb::Models::SubscriptionPriceIntervalsResponse::discount_interval], + end_date: Time?, + fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionPriceIntervalsResponse::FixedFeeQuantitySchedule], + invoicing_threshold: String?, + maximum_intervals: ::Array[Orb::Models::SubscriptionPriceIntervalsResponse::MaximumInterval], + metadata: ::Hash[Symbol, String], + minimum_intervals: ::Array[Orb::Models::SubscriptionPriceIntervalsResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: ::Array[Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval], + redeemed_coupon: Orb::Models::SubscriptionPriceIntervalsResponse::RedeemedCoupon?, + start_date: Time, + status: Orb::Models::SubscriptionPriceIntervalsResponse::status, + trial_info: Orb::Models::SubscriptionPriceIntervalsResponse::TrialInfo + ) -> void + | ( + ?Orb::Models::subscription_price_intervals_response + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::subscription_price_intervals_response + + type adjustment_interval = + { + id: String, + adjustment: Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::adjustment, + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time + } + + class AdjustmentInterval < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment: Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::adjustment + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + ( + id: String, + adjustment: Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::adjustment, + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsResponse::adjustment_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsResponse::adjustment_interval + + type adjustment = + Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment + | Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment + | Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment + | Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment + | Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + + class Adjustment < Orb::Union + type plan_phase_usage_discount_adjustment = + { + id: String, + adjustment_type: :usage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float + } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :usage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + attr_accessor usage_discount: Float + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float, + adjustment_type: :usage_discount + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::plan_phase_usage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::plan_phase_usage_discount_adjustment + end + + type plan_phase_amount_discount_adjustment = + { + id: String, + adjustment_type: :amount_discount, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :amount_discount + + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :amount_discount + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::plan_phase_amount_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::plan_phase_amount_discount_adjustment + end + + type plan_phase_percentage_discount_adjustment = + { + id: String, + adjustment_type: :percentage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :percentage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor percentage_discount: Float + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :percentage_discount + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::plan_phase_percentage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::plan_phase_percentage_discount_adjustment + end + + type plan_phase_minimum_adjustment = + { + id: String, + adjustment_type: :minimum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :minimum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor item_id: String + + attr_accessor minimum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :minimum + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::plan_phase_minimum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::plan_phase_minimum_adjustment + end + + type plan_phase_maximum_adjustment = + { + id: String, + adjustment_type: :maximum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :maximum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor maximum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :maximum + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment + end + + private def self.variants: -> [[:usage_discount, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + end + end + + type billing_cycle_anchor_configuration = + { day: Integer, month: Integer?, year: Integer? } + + class BillingCycleAnchorConfiguration < Orb::BaseModel + attr_accessor day: Integer + + attr_accessor month: Integer? + + attr_accessor year: Integer? + + def initialize: + (day: Integer, month: Integer?, year: Integer?) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsResponse::billing_cycle_anchor_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsResponse::billing_cycle_anchor_configuration + end + + type discount_interval = + Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::AmountDiscountInterval + | Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::PercentageDiscountInterval + | Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::UsageDiscountInterval + + class DiscountInterval < Orb::Union + type amount_discount_interval = + { + amount_discount: String, + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :amount, + end_date: Time?, + start_date: Time + } + + class AmountDiscountInterval < Orb::BaseModel + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :amount + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + ( + amount_discount: String, + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time, + discount_type: :amount + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::amount_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::amount_discount_interval + end + + type percentage_discount_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :percentage, + end_date: Time?, + percentage_discount: Float, + start_date: Time + } + + class PercentageDiscountInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :percentage + + attr_accessor end_date: Time? + + attr_accessor percentage_discount: Float + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + percentage_discount: Float, + start_date: Time, + discount_type: :percentage + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::percentage_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::percentage_discount_interval + end + + type usage_discount_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :usage, + end_date: Time?, + start_date: Time, + usage_discount: Float + } + + class UsageDiscountInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :usage + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + attr_accessor usage_discount: Float + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time, + usage_discount: Float, + discount_type: :usage + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::usage_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::usage_discount_interval + end + + private def self.variants: -> [[:amount, Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::AmountDiscountInterval], [:percentage, Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::PercentageDiscountInterval], [:usage, Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::UsageDiscountInterval]] + end + + type fixed_fee_quantity_schedule = + { end_date: Time?, price_id: String, quantity: Float, start_date: Time } + + class FixedFeeQuantitySchedule < Orb::BaseModel + attr_accessor end_date: Time? + + attr_accessor price_id: String + + attr_accessor quantity: Float + + attr_accessor start_date: Time + + def initialize: + ( + end_date: Time?, + price_id: String, + quantity: Float, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsResponse::fixed_fee_quantity_schedule + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsResponse::fixed_fee_quantity_schedule + end + + type maximum_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + maximum_amount: String, + start_date: Time + } + + class MaximumInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor maximum_amount: String + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + maximum_amount: String, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsResponse::maximum_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsResponse::maximum_interval + end + + type minimum_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + minimum_amount: String, + start_date: Time + } + + class MinimumInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor minimum_amount: String + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + minimum_amount: String, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsResponse::minimum_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsResponse::minimum_interval + end + + type price_interval = + { + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + end_date: Time?, + filter: String?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval::FixedFeeQuantityTransition]?, + price: Orb::Models::price, + start_date: Time, + usage_customer_ids: ::Array[String]? + } + + class PriceInterval < Orb::BaseModel + attr_accessor id: String + + attr_accessor billing_cycle_day: Integer + + attr_accessor current_billing_period_end_date: Time? + + attr_accessor current_billing_period_start_date: Time? + + attr_accessor end_date: Time? + + attr_accessor filter: String? + + attr_accessor fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval::FixedFeeQuantityTransition]? + + attr_accessor price: Orb::Models::price + + attr_accessor start_date: Time + + attr_accessor usage_customer_ids: ::Array[String]? + + def initialize: + ( + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + end_date: Time?, + filter: String?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval::FixedFeeQuantityTransition]?, + price: Orb::Models::price, + start_date: Time, + usage_customer_ids: ::Array[String]? + ) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsResponse::price_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsResponse::price_interval + + type fixed_fee_quantity_transition = + { effective_date: Time, price_id: String, quantity: Integer } + + class FixedFeeQuantityTransition < Orb::BaseModel + attr_accessor effective_date: Time + + attr_accessor price_id: String + + attr_accessor quantity: Integer + + def initialize: + (effective_date: Time, price_id: String, quantity: Integer) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval::fixed_fee_quantity_transition + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval::fixed_fee_quantity_transition + end + end + + type redeemed_coupon = + { coupon_id: String, end_date: Time?, start_date: Time } + + class RedeemedCoupon < Orb::BaseModel + attr_accessor coupon_id: String + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + (coupon_id: String, end_date: Time?, start_date: Time) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsResponse::redeemed_coupon + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsResponse::redeemed_coupon + end + + type status = :active | :ended | :upcoming + + class Status < Orb::Enum + ACTIVE: :active + ENDED: :ended + UPCOMING: :upcoming + + def self.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsResponse::status] + end + + type trial_info = { end_date: Time? } + + class TrialInfo < Orb::BaseModel + attr_accessor end_date: Time? + + def initialize: + (end_date: Time?) -> void + | ( + ?Orb::Models::SubscriptionPriceIntervalsResponse::trial_info + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionPriceIntervalsResponse::trial_info + end + end + end +end diff --git a/sig/orb/models/subscription_schedule_plan_change_params.rbs b/sig/orb/models/subscription_schedule_plan_change_params.rbs index 7e8b74fb..945360a1 100644 --- a/sig/orb/models/subscription_schedule_plan_change_params.rbs +++ b/sig/orb/models/subscription_schedule_plan_change_params.rbs @@ -8,7 +8,7 @@ module Orb align_billing_with_plan_change_date: bool?, auto_collection: bool?, billing_cycle_alignment: Orb::Models::SubscriptionSchedulePlanChangeParams::billing_cycle_alignment?, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionSchedulePlanChangeParams::BillingCycleAnchorConfiguration?, change_date: Time?, coupon_redemption_code: String?, credits_overage_rate: Float?, @@ -47,7 +47,7 @@ module Orb attr_accessor billing_cycle_alignment: Orb::Models::SubscriptionSchedulePlanChangeParams::billing_cycle_alignment? - attr_accessor billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel? + attr_accessor billing_cycle_anchor_configuration: Orb::Models::SubscriptionSchedulePlanChangeParams::BillingCycleAnchorConfiguration? attr_accessor change_date: Time? @@ -95,7 +95,7 @@ module Orb align_billing_with_plan_change_date: bool?, auto_collection: bool?, billing_cycle_alignment: Orb::Models::SubscriptionSchedulePlanChangeParams::billing_cycle_alignment?, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionSchedulePlanChangeParams::BillingCycleAnchorConfiguration?, change_date: Time?, coupon_redemption_code: String?, credits_overage_rate: Float?, @@ -145,6 +145,26 @@ module Orb def self.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::billing_cycle_alignment] end + + type billing_cycle_anchor_configuration = + { day: Integer, month: Integer?, year: Integer? } + + class BillingCycleAnchorConfiguration < Orb::BaseModel + attr_accessor day: Integer + + attr_accessor month: Integer? + + attr_accessor year: Integer? + + def initialize: + (day: Integer, month: Integer?, year: Integer?) -> void + | ( + ?Orb::Models::SubscriptionSchedulePlanChangeParams::billing_cycle_anchor_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeParams::billing_cycle_anchor_configuration + end end end end diff --git a/sig/orb/models/subscription_schedule_plan_change_response.rbs b/sig/orb/models/subscription_schedule_plan_change_response.rbs new file mode 100644 index 00000000..65b89373 --- /dev/null +++ b/sig/orb/models/subscription_schedule_plan_change_response.rbs @@ -0,0 +1,759 @@ +module Orb + module Models + type subscription_schedule_plan_change_response = + { + id: String, + active_plan_phase_order: Integer?, + adjustment_intervals: ::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval], + auto_collection: bool?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionSchedulePlanChangeResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + customer: Orb::Models::Customer, + default_invoice_memo: String?, + discount_intervals: ::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::discount_interval], + end_date: Time?, + fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::FixedFeeQuantitySchedule], + invoicing_threshold: String?, + maximum_intervals: ::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::MaximumInterval], + metadata: ::Hash[Symbol, String], + minimum_intervals: ::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: ::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval], + redeemed_coupon: Orb::Models::SubscriptionSchedulePlanChangeResponse::RedeemedCoupon?, + start_date: Time, + status: Orb::Models::SubscriptionSchedulePlanChangeResponse::status, + trial_info: Orb::Models::SubscriptionSchedulePlanChangeResponse::TrialInfo + } + + class SubscriptionSchedulePlanChangeResponse < Orb::BaseModel + attr_accessor id: String + + attr_accessor active_plan_phase_order: Integer? + + attr_accessor adjustment_intervals: ::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval] + + attr_accessor auto_collection: bool? + + attr_accessor billing_cycle_anchor_configuration: Orb::Models::SubscriptionSchedulePlanChangeResponse::BillingCycleAnchorConfiguration + + attr_accessor billing_cycle_day: Integer + + attr_accessor created_at: Time + + attr_accessor current_billing_period_end_date: Time? + + attr_accessor current_billing_period_start_date: Time? + + attr_accessor customer: Orb::Models::Customer + + attr_accessor default_invoice_memo: String? + + attr_accessor discount_intervals: ::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::discount_interval] + + attr_accessor end_date: Time? + + attr_accessor fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::FixedFeeQuantitySchedule] + + attr_accessor invoicing_threshold: String? + + attr_accessor maximum_intervals: ::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::MaximumInterval] + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor minimum_intervals: ::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::MinimumInterval] + + attr_accessor net_terms: Integer + + attr_accessor plan: Orb::Models::Plan + + attr_accessor price_intervals: ::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval] + + attr_accessor redeemed_coupon: Orb::Models::SubscriptionSchedulePlanChangeResponse::RedeemedCoupon? + + attr_accessor start_date: Time + + attr_accessor status: Orb::Models::SubscriptionSchedulePlanChangeResponse::status + + attr_accessor trial_info: Orb::Models::SubscriptionSchedulePlanChangeResponse::TrialInfo + + def initialize: + ( + id: String, + active_plan_phase_order: Integer?, + adjustment_intervals: ::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval], + auto_collection: bool?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionSchedulePlanChangeResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + customer: Orb::Models::Customer, + default_invoice_memo: String?, + discount_intervals: ::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::discount_interval], + end_date: Time?, + fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::FixedFeeQuantitySchedule], + invoicing_threshold: String?, + maximum_intervals: ::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::MaximumInterval], + metadata: ::Hash[Symbol, String], + minimum_intervals: ::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: ::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval], + redeemed_coupon: Orb::Models::SubscriptionSchedulePlanChangeResponse::RedeemedCoupon?, + start_date: Time, + status: Orb::Models::SubscriptionSchedulePlanChangeResponse::status, + trial_info: Orb::Models::SubscriptionSchedulePlanChangeResponse::TrialInfo + ) -> void + | ( + ?Orb::Models::subscription_schedule_plan_change_response + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::subscription_schedule_plan_change_response + + type adjustment_interval = + { + id: String, + adjustment: Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::adjustment, + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time + } + + class AdjustmentInterval < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment: Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::adjustment + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + ( + id: String, + adjustment: Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::adjustment, + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionSchedulePlanChangeResponse::adjustment_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeResponse::adjustment_interval + + type adjustment = + Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment + | Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment + | Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment + | Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment + | Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + + class Adjustment < Orb::Union + type plan_phase_usage_discount_adjustment = + { + id: String, + adjustment_type: :usage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float + } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :usage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + attr_accessor usage_discount: Float + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float, + adjustment_type: :usage_discount + ) -> void + | ( + ?Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::plan_phase_usage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::plan_phase_usage_discount_adjustment + end + + type plan_phase_amount_discount_adjustment = + { + id: String, + adjustment_type: :amount_discount, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :amount_discount + + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :amount_discount + ) -> void + | ( + ?Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::plan_phase_amount_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::plan_phase_amount_discount_adjustment + end + + type plan_phase_percentage_discount_adjustment = + { + id: String, + adjustment_type: :percentage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :percentage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor percentage_discount: Float + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :percentage_discount + ) -> void + | ( + ?Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::plan_phase_percentage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::plan_phase_percentage_discount_adjustment + end + + type plan_phase_minimum_adjustment = + { + id: String, + adjustment_type: :minimum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :minimum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor item_id: String + + attr_accessor minimum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :minimum + ) -> void + | ( + ?Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::plan_phase_minimum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::plan_phase_minimum_adjustment + end + + type plan_phase_maximum_adjustment = + { + id: String, + adjustment_type: :maximum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :maximum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor maximum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :maximum + ) -> void + | ( + ?Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment + end + + private def self.variants: -> [[:usage_discount, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + end + end + + type billing_cycle_anchor_configuration = + { day: Integer, month: Integer?, year: Integer? } + + class BillingCycleAnchorConfiguration < Orb::BaseModel + attr_accessor day: Integer + + attr_accessor month: Integer? + + attr_accessor year: Integer? + + def initialize: + (day: Integer, month: Integer?, year: Integer?) -> void + | ( + ?Orb::Models::SubscriptionSchedulePlanChangeResponse::billing_cycle_anchor_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeResponse::billing_cycle_anchor_configuration + end + + type discount_interval = + Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::AmountDiscountInterval + | Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::PercentageDiscountInterval + | Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::UsageDiscountInterval + + class DiscountInterval < Orb::Union + type amount_discount_interval = + { + amount_discount: String, + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :amount, + end_date: Time?, + start_date: Time + } + + class AmountDiscountInterval < Orb::BaseModel + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :amount + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + ( + amount_discount: String, + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time, + discount_type: :amount + ) -> void + | ( + ?Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::amount_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::amount_discount_interval + end + + type percentage_discount_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :percentage, + end_date: Time?, + percentage_discount: Float, + start_date: Time + } + + class PercentageDiscountInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :percentage + + attr_accessor end_date: Time? + + attr_accessor percentage_discount: Float + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + percentage_discount: Float, + start_date: Time, + discount_type: :percentage + ) -> void + | ( + ?Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::percentage_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::percentage_discount_interval + end + + type usage_discount_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :usage, + end_date: Time?, + start_date: Time, + usage_discount: Float + } + + class UsageDiscountInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :usage + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + attr_accessor usage_discount: Float + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time, + usage_discount: Float, + discount_type: :usage + ) -> void + | ( + ?Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::usage_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::usage_discount_interval + end + + private def self.variants: -> [[:amount, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::AmountDiscountInterval], [:percentage, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::PercentageDiscountInterval], [:usage, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::UsageDiscountInterval]] + end + + type fixed_fee_quantity_schedule = + { end_date: Time?, price_id: String, quantity: Float, start_date: Time } + + class FixedFeeQuantitySchedule < Orb::BaseModel + attr_accessor end_date: Time? + + attr_accessor price_id: String + + attr_accessor quantity: Float + + attr_accessor start_date: Time + + def initialize: + ( + end_date: Time?, + price_id: String, + quantity: Float, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionSchedulePlanChangeResponse::fixed_fee_quantity_schedule + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeResponse::fixed_fee_quantity_schedule + end + + type maximum_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + maximum_amount: String, + start_date: Time + } + + class MaximumInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor maximum_amount: String + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + maximum_amount: String, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionSchedulePlanChangeResponse::maximum_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeResponse::maximum_interval + end + + type minimum_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + minimum_amount: String, + start_date: Time + } + + class MinimumInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor minimum_amount: String + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + minimum_amount: String, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionSchedulePlanChangeResponse::minimum_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeResponse::minimum_interval + end + + type price_interval = + { + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + end_date: Time?, + filter: String?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval::FixedFeeQuantityTransition]?, + price: Orb::Models::price, + start_date: Time, + usage_customer_ids: ::Array[String]? + } + + class PriceInterval < Orb::BaseModel + attr_accessor id: String + + attr_accessor billing_cycle_day: Integer + + attr_accessor current_billing_period_end_date: Time? + + attr_accessor current_billing_period_start_date: Time? + + attr_accessor end_date: Time? + + attr_accessor filter: String? + + attr_accessor fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval::FixedFeeQuantityTransition]? + + attr_accessor price: Orb::Models::price + + attr_accessor start_date: Time + + attr_accessor usage_customer_ids: ::Array[String]? + + def initialize: + ( + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + end_date: Time?, + filter: String?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval::FixedFeeQuantityTransition]?, + price: Orb::Models::price, + start_date: Time, + usage_customer_ids: ::Array[String]? + ) -> void + | ( + ?Orb::Models::SubscriptionSchedulePlanChangeResponse::price_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeResponse::price_interval + + type fixed_fee_quantity_transition = + { effective_date: Time, price_id: String, quantity: Integer } + + class FixedFeeQuantityTransition < Orb::BaseModel + attr_accessor effective_date: Time + + attr_accessor price_id: String + + attr_accessor quantity: Integer + + def initialize: + (effective_date: Time, price_id: String, quantity: Integer) -> void + | ( + ?Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval::fixed_fee_quantity_transition + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval::fixed_fee_quantity_transition + end + end + + type redeemed_coupon = + { coupon_id: String, end_date: Time?, start_date: Time } + + class RedeemedCoupon < Orb::BaseModel + attr_accessor coupon_id: String + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + (coupon_id: String, end_date: Time?, start_date: Time) -> void + | ( + ?Orb::Models::SubscriptionSchedulePlanChangeResponse::redeemed_coupon + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeResponse::redeemed_coupon + end + + type status = :active | :ended | :upcoming + + class Status < Orb::Enum + ACTIVE: :active + ENDED: :ended + UPCOMING: :upcoming + + def self.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::status] + end + + type trial_info = { end_date: Time? } + + class TrialInfo < Orb::BaseModel + attr_accessor end_date: Time? + + def initialize: + (end_date: Time?) -> void + | ( + ?Orb::Models::SubscriptionSchedulePlanChangeResponse::trial_info + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeResponse::trial_info + end + end + end +end diff --git a/sig/orb/models/subscription_trial_info_model.rbs b/sig/orb/models/subscription_trial_info_model.rbs deleted file mode 100644 index 6c686a41..00000000 --- a/sig/orb/models/subscription_trial_info_model.rbs +++ /dev/null @@ -1,17 +0,0 @@ -module Orb - module Models - type subscription_trial_info_model = { end_date: Time? } - - class SubscriptionTrialInfoModel < Orb::BaseModel - attr_accessor end_date: Time? - - def initialize: - (end_date: Time?) -> void - | ( - ?Orb::Models::subscription_trial_info_model | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::subscription_trial_info_model - end - end -end diff --git a/sig/orb/models/subscription_trigger_phase_response.rbs b/sig/orb/models/subscription_trigger_phase_response.rbs new file mode 100644 index 00000000..9f68b553 --- /dev/null +++ b/sig/orb/models/subscription_trigger_phase_response.rbs @@ -0,0 +1,759 @@ +module Orb + module Models + type subscription_trigger_phase_response = + { + id: String, + active_plan_phase_order: Integer?, + adjustment_intervals: ::Array[Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval], + auto_collection: bool?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + customer: Orb::Models::Customer, + default_invoice_memo: String?, + discount_intervals: ::Array[Orb::Models::SubscriptionTriggerPhaseResponse::discount_interval], + end_date: Time?, + fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionTriggerPhaseResponse::FixedFeeQuantitySchedule], + invoicing_threshold: String?, + maximum_intervals: ::Array[Orb::Models::SubscriptionTriggerPhaseResponse::MaximumInterval], + metadata: ::Hash[Symbol, String], + minimum_intervals: ::Array[Orb::Models::SubscriptionTriggerPhaseResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: ::Array[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval], + redeemed_coupon: Orb::Models::SubscriptionTriggerPhaseResponse::RedeemedCoupon?, + start_date: Time, + status: Orb::Models::SubscriptionTriggerPhaseResponse::status, + trial_info: Orb::Models::SubscriptionTriggerPhaseResponse::TrialInfo + } + + class SubscriptionTriggerPhaseResponse < Orb::BaseModel + attr_accessor id: String + + attr_accessor active_plan_phase_order: Integer? + + attr_accessor adjustment_intervals: ::Array[Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval] + + attr_accessor auto_collection: bool? + + attr_accessor billing_cycle_anchor_configuration: Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration + + attr_accessor billing_cycle_day: Integer + + attr_accessor created_at: Time + + attr_accessor current_billing_period_end_date: Time? + + attr_accessor current_billing_period_start_date: Time? + + attr_accessor customer: Orb::Models::Customer + + attr_accessor default_invoice_memo: String? + + attr_accessor discount_intervals: ::Array[Orb::Models::SubscriptionTriggerPhaseResponse::discount_interval] + + attr_accessor end_date: Time? + + attr_accessor fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionTriggerPhaseResponse::FixedFeeQuantitySchedule] + + attr_accessor invoicing_threshold: String? + + attr_accessor maximum_intervals: ::Array[Orb::Models::SubscriptionTriggerPhaseResponse::MaximumInterval] + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor minimum_intervals: ::Array[Orb::Models::SubscriptionTriggerPhaseResponse::MinimumInterval] + + attr_accessor net_terms: Integer + + attr_accessor plan: Orb::Models::Plan + + attr_accessor price_intervals: ::Array[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval] + + attr_accessor redeemed_coupon: Orb::Models::SubscriptionTriggerPhaseResponse::RedeemedCoupon? + + attr_accessor start_date: Time + + attr_accessor status: Orb::Models::SubscriptionTriggerPhaseResponse::status + + attr_accessor trial_info: Orb::Models::SubscriptionTriggerPhaseResponse::TrialInfo + + def initialize: + ( + id: String, + active_plan_phase_order: Integer?, + adjustment_intervals: ::Array[Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval], + auto_collection: bool?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + customer: Orb::Models::Customer, + default_invoice_memo: String?, + discount_intervals: ::Array[Orb::Models::SubscriptionTriggerPhaseResponse::discount_interval], + end_date: Time?, + fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionTriggerPhaseResponse::FixedFeeQuantitySchedule], + invoicing_threshold: String?, + maximum_intervals: ::Array[Orb::Models::SubscriptionTriggerPhaseResponse::MaximumInterval], + metadata: ::Hash[Symbol, String], + minimum_intervals: ::Array[Orb::Models::SubscriptionTriggerPhaseResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: ::Array[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval], + redeemed_coupon: Orb::Models::SubscriptionTriggerPhaseResponse::RedeemedCoupon?, + start_date: Time, + status: Orb::Models::SubscriptionTriggerPhaseResponse::status, + trial_info: Orb::Models::SubscriptionTriggerPhaseResponse::TrialInfo + ) -> void + | ( + ?Orb::Models::subscription_trigger_phase_response + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::subscription_trigger_phase_response + + type adjustment_interval = + { + id: String, + adjustment: Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::adjustment, + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time + } + + class AdjustmentInterval < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment: Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::adjustment + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + ( + id: String, + adjustment: Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::adjustment, + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionTriggerPhaseResponse::adjustment_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionTriggerPhaseResponse::adjustment_interval + + type adjustment = + Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment + | Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment + | Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment + | Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment + | Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + + class Adjustment < Orb::Union + type plan_phase_usage_discount_adjustment = + { + id: String, + adjustment_type: :usage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float + } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :usage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + attr_accessor usage_discount: Float + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float, + adjustment_type: :usage_discount + ) -> void + | ( + ?Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::plan_phase_usage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::plan_phase_usage_discount_adjustment + end + + type plan_phase_amount_discount_adjustment = + { + id: String, + adjustment_type: :amount_discount, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :amount_discount + + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :amount_discount + ) -> void + | ( + ?Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::plan_phase_amount_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::plan_phase_amount_discount_adjustment + end + + type plan_phase_percentage_discount_adjustment = + { + id: String, + adjustment_type: :percentage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :percentage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor percentage_discount: Float + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :percentage_discount + ) -> void + | ( + ?Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::plan_phase_percentage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::plan_phase_percentage_discount_adjustment + end + + type plan_phase_minimum_adjustment = + { + id: String, + adjustment_type: :minimum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :minimum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor item_id: String + + attr_accessor minimum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :minimum + ) -> void + | ( + ?Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::plan_phase_minimum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::plan_phase_minimum_adjustment + end + + type plan_phase_maximum_adjustment = + { + id: String, + adjustment_type: :maximum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :maximum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor maximum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :maximum + ) -> void + | ( + ?Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment + end + + private def self.variants: -> [[:usage_discount, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + end + end + + type billing_cycle_anchor_configuration = + { day: Integer, month: Integer?, year: Integer? } + + class BillingCycleAnchorConfiguration < Orb::BaseModel + attr_accessor day: Integer + + attr_accessor month: Integer? + + attr_accessor year: Integer? + + def initialize: + (day: Integer, month: Integer?, year: Integer?) -> void + | ( + ?Orb::Models::SubscriptionTriggerPhaseResponse::billing_cycle_anchor_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionTriggerPhaseResponse::billing_cycle_anchor_configuration + end + + type discount_interval = + Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::AmountDiscountInterval + | Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::PercentageDiscountInterval + | Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::UsageDiscountInterval + + class DiscountInterval < Orb::Union + type amount_discount_interval = + { + amount_discount: String, + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :amount, + end_date: Time?, + start_date: Time + } + + class AmountDiscountInterval < Orb::BaseModel + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :amount + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + ( + amount_discount: String, + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time, + discount_type: :amount + ) -> void + | ( + ?Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::amount_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::amount_discount_interval + end + + type percentage_discount_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :percentage, + end_date: Time?, + percentage_discount: Float, + start_date: Time + } + + class PercentageDiscountInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :percentage + + attr_accessor end_date: Time? + + attr_accessor percentage_discount: Float + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + percentage_discount: Float, + start_date: Time, + discount_type: :percentage + ) -> void + | ( + ?Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::percentage_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::percentage_discount_interval + end + + type usage_discount_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :usage, + end_date: Time?, + start_date: Time, + usage_discount: Float + } + + class UsageDiscountInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :usage + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + attr_accessor usage_discount: Float + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time, + usage_discount: Float, + discount_type: :usage + ) -> void + | ( + ?Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::usage_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::usage_discount_interval + end + + private def self.variants: -> [[:amount, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::AmountDiscountInterval], [:percentage, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::PercentageDiscountInterval], [:usage, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::UsageDiscountInterval]] + end + + type fixed_fee_quantity_schedule = + { end_date: Time?, price_id: String, quantity: Float, start_date: Time } + + class FixedFeeQuantitySchedule < Orb::BaseModel + attr_accessor end_date: Time? + + attr_accessor price_id: String + + attr_accessor quantity: Float + + attr_accessor start_date: Time + + def initialize: + ( + end_date: Time?, + price_id: String, + quantity: Float, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionTriggerPhaseResponse::fixed_fee_quantity_schedule + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionTriggerPhaseResponse::fixed_fee_quantity_schedule + end + + type maximum_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + maximum_amount: String, + start_date: Time + } + + class MaximumInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor maximum_amount: String + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + maximum_amount: String, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionTriggerPhaseResponse::maximum_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionTriggerPhaseResponse::maximum_interval + end + + type minimum_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + minimum_amount: String, + start_date: Time + } + + class MinimumInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor minimum_amount: String + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + minimum_amount: String, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionTriggerPhaseResponse::minimum_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionTriggerPhaseResponse::minimum_interval + end + + type price_interval = + { + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + end_date: Time?, + filter: String?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval::FixedFeeQuantityTransition]?, + price: Orb::Models::price, + start_date: Time, + usage_customer_ids: ::Array[String]? + } + + class PriceInterval < Orb::BaseModel + attr_accessor id: String + + attr_accessor billing_cycle_day: Integer + + attr_accessor current_billing_period_end_date: Time? + + attr_accessor current_billing_period_start_date: Time? + + attr_accessor end_date: Time? + + attr_accessor filter: String? + + attr_accessor fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval::FixedFeeQuantityTransition]? + + attr_accessor price: Orb::Models::price + + attr_accessor start_date: Time + + attr_accessor usage_customer_ids: ::Array[String]? + + def initialize: + ( + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + end_date: Time?, + filter: String?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval::FixedFeeQuantityTransition]?, + price: Orb::Models::price, + start_date: Time, + usage_customer_ids: ::Array[String]? + ) -> void + | ( + ?Orb::Models::SubscriptionTriggerPhaseResponse::price_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionTriggerPhaseResponse::price_interval + + type fixed_fee_quantity_transition = + { effective_date: Time, price_id: String, quantity: Integer } + + class FixedFeeQuantityTransition < Orb::BaseModel + attr_accessor effective_date: Time + + attr_accessor price_id: String + + attr_accessor quantity: Integer + + def initialize: + (effective_date: Time, price_id: String, quantity: Integer) -> void + | ( + ?Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval::fixed_fee_quantity_transition + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval::fixed_fee_quantity_transition + end + end + + type redeemed_coupon = + { coupon_id: String, end_date: Time?, start_date: Time } + + class RedeemedCoupon < Orb::BaseModel + attr_accessor coupon_id: String + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + (coupon_id: String, end_date: Time?, start_date: Time) -> void + | ( + ?Orb::Models::SubscriptionTriggerPhaseResponse::redeemed_coupon + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionTriggerPhaseResponse::redeemed_coupon + end + + type status = :active | :ended | :upcoming + + class Status < Orb::Enum + ACTIVE: :active + ENDED: :ended + UPCOMING: :upcoming + + def self.values: -> ::Array[Orb::Models::SubscriptionTriggerPhaseResponse::status] + end + + type trial_info = { end_date: Time? } + + class TrialInfo < Orb::BaseModel + attr_accessor end_date: Time? + + def initialize: + (end_date: Time?) -> void + | ( + ?Orb::Models::SubscriptionTriggerPhaseResponse::trial_info + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionTriggerPhaseResponse::trial_info + end + end + end +end diff --git a/sig/orb/models/subscription_unschedule_cancellation_response.rbs b/sig/orb/models/subscription_unschedule_cancellation_response.rbs new file mode 100644 index 00000000..400a714a --- /dev/null +++ b/sig/orb/models/subscription_unschedule_cancellation_response.rbs @@ -0,0 +1,759 @@ +module Orb + module Models + type subscription_unschedule_cancellation_response = + { + id: String, + active_plan_phase_order: Integer?, + adjustment_intervals: ::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval], + auto_collection: bool?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUnscheduleCancellationResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + customer: Orb::Models::Customer, + default_invoice_memo: String?, + discount_intervals: ::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::discount_interval], + end_date: Time?, + fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::FixedFeeQuantitySchedule], + invoicing_threshold: String?, + maximum_intervals: ::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::MaximumInterval], + metadata: ::Hash[Symbol, String], + minimum_intervals: ::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: ::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval], + redeemed_coupon: Orb::Models::SubscriptionUnscheduleCancellationResponse::RedeemedCoupon?, + start_date: Time, + status: Orb::Models::SubscriptionUnscheduleCancellationResponse::status, + trial_info: Orb::Models::SubscriptionUnscheduleCancellationResponse::TrialInfo + } + + class SubscriptionUnscheduleCancellationResponse < Orb::BaseModel + attr_accessor id: String + + attr_accessor active_plan_phase_order: Integer? + + attr_accessor adjustment_intervals: ::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval] + + attr_accessor auto_collection: bool? + + attr_accessor billing_cycle_anchor_configuration: Orb::Models::SubscriptionUnscheduleCancellationResponse::BillingCycleAnchorConfiguration + + attr_accessor billing_cycle_day: Integer + + attr_accessor created_at: Time + + attr_accessor current_billing_period_end_date: Time? + + attr_accessor current_billing_period_start_date: Time? + + attr_accessor customer: Orb::Models::Customer + + attr_accessor default_invoice_memo: String? + + attr_accessor discount_intervals: ::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::discount_interval] + + attr_accessor end_date: Time? + + attr_accessor fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::FixedFeeQuantitySchedule] + + attr_accessor invoicing_threshold: String? + + attr_accessor maximum_intervals: ::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::MaximumInterval] + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor minimum_intervals: ::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::MinimumInterval] + + attr_accessor net_terms: Integer + + attr_accessor plan: Orb::Models::Plan + + attr_accessor price_intervals: ::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval] + + attr_accessor redeemed_coupon: Orb::Models::SubscriptionUnscheduleCancellationResponse::RedeemedCoupon? + + attr_accessor start_date: Time + + attr_accessor status: Orb::Models::SubscriptionUnscheduleCancellationResponse::status + + attr_accessor trial_info: Orb::Models::SubscriptionUnscheduleCancellationResponse::TrialInfo + + def initialize: + ( + id: String, + active_plan_phase_order: Integer?, + adjustment_intervals: ::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval], + auto_collection: bool?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUnscheduleCancellationResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + customer: Orb::Models::Customer, + default_invoice_memo: String?, + discount_intervals: ::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::discount_interval], + end_date: Time?, + fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::FixedFeeQuantitySchedule], + invoicing_threshold: String?, + maximum_intervals: ::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::MaximumInterval], + metadata: ::Hash[Symbol, String], + minimum_intervals: ::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: ::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval], + redeemed_coupon: Orb::Models::SubscriptionUnscheduleCancellationResponse::RedeemedCoupon?, + start_date: Time, + status: Orb::Models::SubscriptionUnscheduleCancellationResponse::status, + trial_info: Orb::Models::SubscriptionUnscheduleCancellationResponse::TrialInfo + ) -> void + | ( + ?Orb::Models::subscription_unschedule_cancellation_response + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::subscription_unschedule_cancellation_response + + type adjustment_interval = + { + id: String, + adjustment: Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::adjustment, + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time + } + + class AdjustmentInterval < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment: Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::adjustment + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + ( + id: String, + adjustment: Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::adjustment, + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleCancellationResponse::adjustment_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleCancellationResponse::adjustment_interval + + type adjustment = + Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment + | Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment + | Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment + | Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment + | Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + + class Adjustment < Orb::Union + type plan_phase_usage_discount_adjustment = + { + id: String, + adjustment_type: :usage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float + } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :usage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + attr_accessor usage_discount: Float + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float, + adjustment_type: :usage_discount + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::plan_phase_usage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::plan_phase_usage_discount_adjustment + end + + type plan_phase_amount_discount_adjustment = + { + id: String, + adjustment_type: :amount_discount, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :amount_discount + + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :amount_discount + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::plan_phase_amount_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::plan_phase_amount_discount_adjustment + end + + type plan_phase_percentage_discount_adjustment = + { + id: String, + adjustment_type: :percentage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :percentage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor percentage_discount: Float + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :percentage_discount + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::plan_phase_percentage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::plan_phase_percentage_discount_adjustment + end + + type plan_phase_minimum_adjustment = + { + id: String, + adjustment_type: :minimum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :minimum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor item_id: String + + attr_accessor minimum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :minimum + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::plan_phase_minimum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::plan_phase_minimum_adjustment + end + + type plan_phase_maximum_adjustment = + { + id: String, + adjustment_type: :maximum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :maximum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor maximum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :maximum + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment + end + + private def self.variants: -> [[:usage_discount, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + end + end + + type billing_cycle_anchor_configuration = + { day: Integer, month: Integer?, year: Integer? } + + class BillingCycleAnchorConfiguration < Orb::BaseModel + attr_accessor day: Integer + + attr_accessor month: Integer? + + attr_accessor year: Integer? + + def initialize: + (day: Integer, month: Integer?, year: Integer?) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleCancellationResponse::billing_cycle_anchor_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleCancellationResponse::billing_cycle_anchor_configuration + end + + type discount_interval = + Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::AmountDiscountInterval + | Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::PercentageDiscountInterval + | Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::UsageDiscountInterval + + class DiscountInterval < Orb::Union + type amount_discount_interval = + { + amount_discount: String, + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :amount, + end_date: Time?, + start_date: Time + } + + class AmountDiscountInterval < Orb::BaseModel + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :amount + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + ( + amount_discount: String, + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time, + discount_type: :amount + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::amount_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::amount_discount_interval + end + + type percentage_discount_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :percentage, + end_date: Time?, + percentage_discount: Float, + start_date: Time + } + + class PercentageDiscountInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :percentage + + attr_accessor end_date: Time? + + attr_accessor percentage_discount: Float + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + percentage_discount: Float, + start_date: Time, + discount_type: :percentage + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::percentage_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::percentage_discount_interval + end + + type usage_discount_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :usage, + end_date: Time?, + start_date: Time, + usage_discount: Float + } + + class UsageDiscountInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :usage + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + attr_accessor usage_discount: Float + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time, + usage_discount: Float, + discount_type: :usage + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::usage_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::usage_discount_interval + end + + private def self.variants: -> [[:amount, Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::AmountDiscountInterval], [:percentage, Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::PercentageDiscountInterval], [:usage, Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::UsageDiscountInterval]] + end + + type fixed_fee_quantity_schedule = + { end_date: Time?, price_id: String, quantity: Float, start_date: Time } + + class FixedFeeQuantitySchedule < Orb::BaseModel + attr_accessor end_date: Time? + + attr_accessor price_id: String + + attr_accessor quantity: Float + + attr_accessor start_date: Time + + def initialize: + ( + end_date: Time?, + price_id: String, + quantity: Float, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleCancellationResponse::fixed_fee_quantity_schedule + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleCancellationResponse::fixed_fee_quantity_schedule + end + + type maximum_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + maximum_amount: String, + start_date: Time + } + + class MaximumInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor maximum_amount: String + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + maximum_amount: String, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleCancellationResponse::maximum_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleCancellationResponse::maximum_interval + end + + type minimum_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + minimum_amount: String, + start_date: Time + } + + class MinimumInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor minimum_amount: String + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + minimum_amount: String, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleCancellationResponse::minimum_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleCancellationResponse::minimum_interval + end + + type price_interval = + { + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + end_date: Time?, + filter: String?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval::FixedFeeQuantityTransition]?, + price: Orb::Models::price, + start_date: Time, + usage_customer_ids: ::Array[String]? + } + + class PriceInterval < Orb::BaseModel + attr_accessor id: String + + attr_accessor billing_cycle_day: Integer + + attr_accessor current_billing_period_end_date: Time? + + attr_accessor current_billing_period_start_date: Time? + + attr_accessor end_date: Time? + + attr_accessor filter: String? + + attr_accessor fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval::FixedFeeQuantityTransition]? + + attr_accessor price: Orb::Models::price + + attr_accessor start_date: Time + + attr_accessor usage_customer_ids: ::Array[String]? + + def initialize: + ( + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + end_date: Time?, + filter: String?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval::FixedFeeQuantityTransition]?, + price: Orb::Models::price, + start_date: Time, + usage_customer_ids: ::Array[String]? + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleCancellationResponse::price_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleCancellationResponse::price_interval + + type fixed_fee_quantity_transition = + { effective_date: Time, price_id: String, quantity: Integer } + + class FixedFeeQuantityTransition < Orb::BaseModel + attr_accessor effective_date: Time + + attr_accessor price_id: String + + attr_accessor quantity: Integer + + def initialize: + (effective_date: Time, price_id: String, quantity: Integer) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval::fixed_fee_quantity_transition + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval::fixed_fee_quantity_transition + end + end + + type redeemed_coupon = + { coupon_id: String, end_date: Time?, start_date: Time } + + class RedeemedCoupon < Orb::BaseModel + attr_accessor coupon_id: String + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + (coupon_id: String, end_date: Time?, start_date: Time) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleCancellationResponse::redeemed_coupon + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleCancellationResponse::redeemed_coupon + end + + type status = :active | :ended | :upcoming + + class Status < Orb::Enum + ACTIVE: :active + ENDED: :ended + UPCOMING: :upcoming + + def self.values: -> ::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::status] + end + + type trial_info = { end_date: Time? } + + class TrialInfo < Orb::BaseModel + attr_accessor end_date: Time? + + def initialize: + (end_date: Time?) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleCancellationResponse::trial_info + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleCancellationResponse::trial_info + end + end + end +end diff --git a/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs b/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs new file mode 100644 index 00000000..c501877a --- /dev/null +++ b/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs @@ -0,0 +1,759 @@ +module Orb + module Models + type subscription_unschedule_fixed_fee_quantity_updates_response = + { + id: String, + active_plan_phase_order: Integer?, + adjustment_intervals: ::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval], + auto_collection: bool?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + customer: Orb::Models::Customer, + default_invoice_memo: String?, + discount_intervals: ::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::discount_interval], + end_date: Time?, + fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::FixedFeeQuantitySchedule], + invoicing_threshold: String?, + maximum_intervals: ::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MaximumInterval], + metadata: ::Hash[Symbol, String], + minimum_intervals: ::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: ::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval], + redeemed_coupon: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::RedeemedCoupon?, + start_date: Time, + status: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::status, + trial_info: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::TrialInfo + } + + class SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse < Orb::BaseModel + attr_accessor id: String + + attr_accessor active_plan_phase_order: Integer? + + attr_accessor adjustment_intervals: ::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval] + + attr_accessor auto_collection: bool? + + attr_accessor billing_cycle_anchor_configuration: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::BillingCycleAnchorConfiguration + + attr_accessor billing_cycle_day: Integer + + attr_accessor created_at: Time + + attr_accessor current_billing_period_end_date: Time? + + attr_accessor current_billing_period_start_date: Time? + + attr_accessor customer: Orb::Models::Customer + + attr_accessor default_invoice_memo: String? + + attr_accessor discount_intervals: ::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::discount_interval] + + attr_accessor end_date: Time? + + attr_accessor fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::FixedFeeQuantitySchedule] + + attr_accessor invoicing_threshold: String? + + attr_accessor maximum_intervals: ::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MaximumInterval] + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor minimum_intervals: ::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MinimumInterval] + + attr_accessor net_terms: Integer + + attr_accessor plan: Orb::Models::Plan + + attr_accessor price_intervals: ::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval] + + attr_accessor redeemed_coupon: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::RedeemedCoupon? + + attr_accessor start_date: Time + + attr_accessor status: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::status + + attr_accessor trial_info: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::TrialInfo + + def initialize: + ( + id: String, + active_plan_phase_order: Integer?, + adjustment_intervals: ::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval], + auto_collection: bool?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + customer: Orb::Models::Customer, + default_invoice_memo: String?, + discount_intervals: ::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::discount_interval], + end_date: Time?, + fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::FixedFeeQuantitySchedule], + invoicing_threshold: String?, + maximum_intervals: ::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MaximumInterval], + metadata: ::Hash[Symbol, String], + minimum_intervals: ::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: ::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval], + redeemed_coupon: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::RedeemedCoupon?, + start_date: Time, + status: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::status, + trial_info: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::TrialInfo + ) -> void + | ( + ?Orb::Models::subscription_unschedule_fixed_fee_quantity_updates_response + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::subscription_unschedule_fixed_fee_quantity_updates_response + + type adjustment_interval = + { + id: String, + adjustment: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::adjustment, + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time + } + + class AdjustmentInterval < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::adjustment + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + ( + id: String, + adjustment: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::adjustment, + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::adjustment_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::adjustment_interval + + type adjustment = + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment + | Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment + | Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment + | Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment + | Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + + class Adjustment < Orb::Union + type plan_phase_usage_discount_adjustment = + { + id: String, + adjustment_type: :usage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float + } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :usage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + attr_accessor usage_discount: Float + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float, + adjustment_type: :usage_discount + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::plan_phase_usage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::plan_phase_usage_discount_adjustment + end + + type plan_phase_amount_discount_adjustment = + { + id: String, + adjustment_type: :amount_discount, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :amount_discount + + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :amount_discount + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::plan_phase_amount_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::plan_phase_amount_discount_adjustment + end + + type plan_phase_percentage_discount_adjustment = + { + id: String, + adjustment_type: :percentage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :percentage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor percentage_discount: Float + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :percentage_discount + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::plan_phase_percentage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::plan_phase_percentage_discount_adjustment + end + + type plan_phase_minimum_adjustment = + { + id: String, + adjustment_type: :minimum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :minimum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor item_id: String + + attr_accessor minimum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :minimum + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::plan_phase_minimum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::plan_phase_minimum_adjustment + end + + type plan_phase_maximum_adjustment = + { + id: String, + adjustment_type: :maximum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :maximum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor maximum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :maximum + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment + end + + private def self.variants: -> [[:usage_discount, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + end + end + + type billing_cycle_anchor_configuration = + { day: Integer, month: Integer?, year: Integer? } + + class BillingCycleAnchorConfiguration < Orb::BaseModel + attr_accessor day: Integer + + attr_accessor month: Integer? + + attr_accessor year: Integer? + + def initialize: + (day: Integer, month: Integer?, year: Integer?) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::billing_cycle_anchor_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::billing_cycle_anchor_configuration + end + + type discount_interval = + Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::AmountDiscountInterval + | Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::PercentageDiscountInterval + | Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::UsageDiscountInterval + + class DiscountInterval < Orb::Union + type amount_discount_interval = + { + amount_discount: String, + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :amount, + end_date: Time?, + start_date: Time + } + + class AmountDiscountInterval < Orb::BaseModel + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :amount + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + ( + amount_discount: String, + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time, + discount_type: :amount + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::amount_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::amount_discount_interval + end + + type percentage_discount_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :percentage, + end_date: Time?, + percentage_discount: Float, + start_date: Time + } + + class PercentageDiscountInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :percentage + + attr_accessor end_date: Time? + + attr_accessor percentage_discount: Float + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + percentage_discount: Float, + start_date: Time, + discount_type: :percentage + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::percentage_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::percentage_discount_interval + end + + type usage_discount_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :usage, + end_date: Time?, + start_date: Time, + usage_discount: Float + } + + class UsageDiscountInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :usage + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + attr_accessor usage_discount: Float + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time, + usage_discount: Float, + discount_type: :usage + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::usage_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::usage_discount_interval + end + + private def self.variants: -> [[:amount, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::AmountDiscountInterval], [:percentage, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::PercentageDiscountInterval], [:usage, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::UsageDiscountInterval]] + end + + type fixed_fee_quantity_schedule = + { end_date: Time?, price_id: String, quantity: Float, start_date: Time } + + class FixedFeeQuantitySchedule < Orb::BaseModel + attr_accessor end_date: Time? + + attr_accessor price_id: String + + attr_accessor quantity: Float + + attr_accessor start_date: Time + + def initialize: + ( + end_date: Time?, + price_id: String, + quantity: Float, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::fixed_fee_quantity_schedule + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::fixed_fee_quantity_schedule + end + + type maximum_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + maximum_amount: String, + start_date: Time + } + + class MaximumInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor maximum_amount: String + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + maximum_amount: String, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::maximum_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::maximum_interval + end + + type minimum_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + minimum_amount: String, + start_date: Time + } + + class MinimumInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor minimum_amount: String + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + minimum_amount: String, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::minimum_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::minimum_interval + end + + type price_interval = + { + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + end_date: Time?, + filter: String?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval::FixedFeeQuantityTransition]?, + price: Orb::Models::price, + start_date: Time, + usage_customer_ids: ::Array[String]? + } + + class PriceInterval < Orb::BaseModel + attr_accessor id: String + + attr_accessor billing_cycle_day: Integer + + attr_accessor current_billing_period_end_date: Time? + + attr_accessor current_billing_period_start_date: Time? + + attr_accessor end_date: Time? + + attr_accessor filter: String? + + attr_accessor fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval::FixedFeeQuantityTransition]? + + attr_accessor price: Orb::Models::price + + attr_accessor start_date: Time + + attr_accessor usage_customer_ids: ::Array[String]? + + def initialize: + ( + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + end_date: Time?, + filter: String?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval::FixedFeeQuantityTransition]?, + price: Orb::Models::price, + start_date: Time, + usage_customer_ids: ::Array[String]? + ) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::price_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::price_interval + + type fixed_fee_quantity_transition = + { effective_date: Time, price_id: String, quantity: Integer } + + class FixedFeeQuantityTransition < Orb::BaseModel + attr_accessor effective_date: Time + + attr_accessor price_id: String + + attr_accessor quantity: Integer + + def initialize: + (effective_date: Time, price_id: String, quantity: Integer) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval::fixed_fee_quantity_transition + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval::fixed_fee_quantity_transition + end + end + + type redeemed_coupon = + { coupon_id: String, end_date: Time?, start_date: Time } + + class RedeemedCoupon < Orb::BaseModel + attr_accessor coupon_id: String + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + (coupon_id: String, end_date: Time?, start_date: Time) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::redeemed_coupon + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::redeemed_coupon + end + + type status = :active | :ended | :upcoming + + class Status < Orb::Enum + ACTIVE: :active + ENDED: :ended + UPCOMING: :upcoming + + def self.values: -> ::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::status] + end + + type trial_info = { end_date: Time? } + + class TrialInfo < Orb::BaseModel + attr_accessor end_date: Time? + + def initialize: + (end_date: Time?) -> void + | ( + ?Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::trial_info + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::trial_info + end + end + end +end diff --git a/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs b/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs new file mode 100644 index 00000000..8d3a00be --- /dev/null +++ b/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs @@ -0,0 +1,759 @@ +module Orb + module Models + type subscription_unschedule_pending_plan_changes_response = + { + id: String, + active_plan_phase_order: Integer?, + adjustment_intervals: ::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval], + auto_collection: bool?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + customer: Orb::Models::Customer, + default_invoice_memo: String?, + discount_intervals: ::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::discount_interval], + end_date: Time?, + fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::FixedFeeQuantitySchedule], + invoicing_threshold: String?, + maximum_intervals: ::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::MaximumInterval], + metadata: ::Hash[Symbol, String], + minimum_intervals: ::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: ::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::PriceInterval], + redeemed_coupon: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::RedeemedCoupon?, + start_date: Time, + status: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::status, + trial_info: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::TrialInfo + } + + class SubscriptionUnschedulePendingPlanChangesResponse < Orb::BaseModel + attr_accessor id: String + + attr_accessor active_plan_phase_order: Integer? + + attr_accessor adjustment_intervals: ::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval] + + attr_accessor auto_collection: bool? + + attr_accessor billing_cycle_anchor_configuration: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::BillingCycleAnchorConfiguration + + attr_accessor billing_cycle_day: Integer + + attr_accessor created_at: Time + + attr_accessor current_billing_period_end_date: Time? + + attr_accessor current_billing_period_start_date: Time? + + attr_accessor customer: Orb::Models::Customer + + attr_accessor default_invoice_memo: String? + + attr_accessor discount_intervals: ::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::discount_interval] + + attr_accessor end_date: Time? + + attr_accessor fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::FixedFeeQuantitySchedule] + + attr_accessor invoicing_threshold: String? + + attr_accessor maximum_intervals: ::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::MaximumInterval] + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor minimum_intervals: ::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::MinimumInterval] + + attr_accessor net_terms: Integer + + attr_accessor plan: Orb::Models::Plan + + attr_accessor price_intervals: ::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::PriceInterval] + + attr_accessor redeemed_coupon: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::RedeemedCoupon? + + attr_accessor start_date: Time + + attr_accessor status: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::status + + attr_accessor trial_info: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::TrialInfo + + def initialize: + ( + id: String, + active_plan_phase_order: Integer?, + adjustment_intervals: ::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval], + auto_collection: bool?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + customer: Orb::Models::Customer, + default_invoice_memo: String?, + discount_intervals: ::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::discount_interval], + end_date: Time?, + fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::FixedFeeQuantitySchedule], + invoicing_threshold: String?, + maximum_intervals: ::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::MaximumInterval], + metadata: ::Hash[Symbol, String], + minimum_intervals: ::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: ::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::PriceInterval], + redeemed_coupon: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::RedeemedCoupon?, + start_date: Time, + status: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::status, + trial_info: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::TrialInfo + ) -> void + | ( + ?Orb::Models::subscription_unschedule_pending_plan_changes_response + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::subscription_unschedule_pending_plan_changes_response + + type adjustment_interval = + { + id: String, + adjustment: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::adjustment, + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time + } + + class AdjustmentInterval < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::adjustment + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + ( + id: String, + adjustment: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::adjustment, + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::adjustment_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::adjustment_interval + + type adjustment = + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment + | Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment + | Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment + | Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment + | Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + + class Adjustment < Orb::Union + type plan_phase_usage_discount_adjustment = + { + id: String, + adjustment_type: :usage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float + } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :usage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + attr_accessor usage_discount: Float + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float, + adjustment_type: :usage_discount + ) -> void + | ( + ?Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::plan_phase_usage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::plan_phase_usage_discount_adjustment + end + + type plan_phase_amount_discount_adjustment = + { + id: String, + adjustment_type: :amount_discount, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :amount_discount + + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :amount_discount + ) -> void + | ( + ?Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::plan_phase_amount_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::plan_phase_amount_discount_adjustment + end + + type plan_phase_percentage_discount_adjustment = + { + id: String, + adjustment_type: :percentage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :percentage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor percentage_discount: Float + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :percentage_discount + ) -> void + | ( + ?Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::plan_phase_percentage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::plan_phase_percentage_discount_adjustment + end + + type plan_phase_minimum_adjustment = + { + id: String, + adjustment_type: :minimum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :minimum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor item_id: String + + attr_accessor minimum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :minimum + ) -> void + | ( + ?Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::plan_phase_minimum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::plan_phase_minimum_adjustment + end + + type plan_phase_maximum_adjustment = + { + id: String, + adjustment_type: :maximum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :maximum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor maximum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :maximum + ) -> void + | ( + ?Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment + end + + private def self.variants: -> [[:usage_discount, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + end + end + + type billing_cycle_anchor_configuration = + { day: Integer, month: Integer?, year: Integer? } + + class BillingCycleAnchorConfiguration < Orb::BaseModel + attr_accessor day: Integer + + attr_accessor month: Integer? + + attr_accessor year: Integer? + + def initialize: + (day: Integer, month: Integer?, year: Integer?) -> void + | ( + ?Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::billing_cycle_anchor_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::billing_cycle_anchor_configuration + end + + type discount_interval = + Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::AmountDiscountInterval + | Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::PercentageDiscountInterval + | Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::UsageDiscountInterval + + class DiscountInterval < Orb::Union + type amount_discount_interval = + { + amount_discount: String, + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :amount, + end_date: Time?, + start_date: Time + } + + class AmountDiscountInterval < Orb::BaseModel + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :amount + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + ( + amount_discount: String, + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time, + discount_type: :amount + ) -> void + | ( + ?Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::amount_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::amount_discount_interval + end + + type percentage_discount_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :percentage, + end_date: Time?, + percentage_discount: Float, + start_date: Time + } + + class PercentageDiscountInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :percentage + + attr_accessor end_date: Time? + + attr_accessor percentage_discount: Float + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + percentage_discount: Float, + start_date: Time, + discount_type: :percentage + ) -> void + | ( + ?Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::percentage_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::percentage_discount_interval + end + + type usage_discount_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :usage, + end_date: Time?, + start_date: Time, + usage_discount: Float + } + + class UsageDiscountInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :usage + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + attr_accessor usage_discount: Float + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time, + usage_discount: Float, + discount_type: :usage + ) -> void + | ( + ?Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::usage_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::usage_discount_interval + end + + private def self.variants: -> [[:amount, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::AmountDiscountInterval], [:percentage, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::PercentageDiscountInterval], [:usage, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::UsageDiscountInterval]] + end + + type fixed_fee_quantity_schedule = + { end_date: Time?, price_id: String, quantity: Float, start_date: Time } + + class FixedFeeQuantitySchedule < Orb::BaseModel + attr_accessor end_date: Time? + + attr_accessor price_id: String + + attr_accessor quantity: Float + + attr_accessor start_date: Time + + def initialize: + ( + end_date: Time?, + price_id: String, + quantity: Float, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::fixed_fee_quantity_schedule + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::fixed_fee_quantity_schedule + end + + type maximum_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + maximum_amount: String, + start_date: Time + } + + class MaximumInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor maximum_amount: String + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + maximum_amount: String, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::maximum_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::maximum_interval + end + + type minimum_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + minimum_amount: String, + start_date: Time + } + + class MinimumInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor minimum_amount: String + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + minimum_amount: String, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::minimum_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::minimum_interval + end + + type price_interval = + { + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + end_date: Time?, + filter: String?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::PriceInterval::FixedFeeQuantityTransition]?, + price: Orb::Models::price, + start_date: Time, + usage_customer_ids: ::Array[String]? + } + + class PriceInterval < Orb::BaseModel + attr_accessor id: String + + attr_accessor billing_cycle_day: Integer + + attr_accessor current_billing_period_end_date: Time? + + attr_accessor current_billing_period_start_date: Time? + + attr_accessor end_date: Time? + + attr_accessor filter: String? + + attr_accessor fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::PriceInterval::FixedFeeQuantityTransition]? + + attr_accessor price: Orb::Models::price + + attr_accessor start_date: Time + + attr_accessor usage_customer_ids: ::Array[String]? + + def initialize: + ( + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + end_date: Time?, + filter: String?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::PriceInterval::FixedFeeQuantityTransition]?, + price: Orb::Models::price, + start_date: Time, + usage_customer_ids: ::Array[String]? + ) -> void + | ( + ?Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::price_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::price_interval + + type fixed_fee_quantity_transition = + { effective_date: Time, price_id: String, quantity: Integer } + + class FixedFeeQuantityTransition < Orb::BaseModel + attr_accessor effective_date: Time + + attr_accessor price_id: String + + attr_accessor quantity: Integer + + def initialize: + (effective_date: Time, price_id: String, quantity: Integer) -> void + | ( + ?Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::PriceInterval::fixed_fee_quantity_transition + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::PriceInterval::fixed_fee_quantity_transition + end + end + + type redeemed_coupon = + { coupon_id: String, end_date: Time?, start_date: Time } + + class RedeemedCoupon < Orb::BaseModel + attr_accessor coupon_id: String + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + (coupon_id: String, end_date: Time?, start_date: Time) -> void + | ( + ?Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::redeemed_coupon + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::redeemed_coupon + end + + type status = :active | :ended | :upcoming + + class Status < Orb::Enum + ACTIVE: :active + ENDED: :ended + UPCOMING: :upcoming + + def self.values: -> ::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::status] + end + + type trial_info = { end_date: Time? } + + class TrialInfo < Orb::BaseModel + attr_accessor end_date: Time? + + def initialize: + (end_date: Time?) -> void + | ( + ?Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::trial_info + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::trial_info + end + end + end +end diff --git a/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs b/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs new file mode 100644 index 00000000..e12ba521 --- /dev/null +++ b/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs @@ -0,0 +1,759 @@ +module Orb + module Models + type subscription_update_fixed_fee_quantity_response = + { + id: String, + active_plan_phase_order: Integer?, + adjustment_intervals: ::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval], + auto_collection: bool?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + customer: Orb::Models::Customer, + default_invoice_memo: String?, + discount_intervals: ::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::discount_interval], + end_date: Time?, + fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::FixedFeeQuantitySchedule], + invoicing_threshold: String?, + maximum_intervals: ::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::MaximumInterval], + metadata: ::Hash[Symbol, String], + minimum_intervals: ::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: ::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::PriceInterval], + redeemed_coupon: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::RedeemedCoupon?, + start_date: Time, + status: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::status, + trial_info: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::TrialInfo + } + + class SubscriptionUpdateFixedFeeQuantityResponse < Orb::BaseModel + attr_accessor id: String + + attr_accessor active_plan_phase_order: Integer? + + attr_accessor adjustment_intervals: ::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval] + + attr_accessor auto_collection: bool? + + attr_accessor billing_cycle_anchor_configuration: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::BillingCycleAnchorConfiguration + + attr_accessor billing_cycle_day: Integer + + attr_accessor created_at: Time + + attr_accessor current_billing_period_end_date: Time? + + attr_accessor current_billing_period_start_date: Time? + + attr_accessor customer: Orb::Models::Customer + + attr_accessor default_invoice_memo: String? + + attr_accessor discount_intervals: ::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::discount_interval] + + attr_accessor end_date: Time? + + attr_accessor fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::FixedFeeQuantitySchedule] + + attr_accessor invoicing_threshold: String? + + attr_accessor maximum_intervals: ::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::MaximumInterval] + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor minimum_intervals: ::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::MinimumInterval] + + attr_accessor net_terms: Integer + + attr_accessor plan: Orb::Models::Plan + + attr_accessor price_intervals: ::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::PriceInterval] + + attr_accessor redeemed_coupon: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::RedeemedCoupon? + + attr_accessor start_date: Time + + attr_accessor status: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::status + + attr_accessor trial_info: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::TrialInfo + + def initialize: + ( + id: String, + active_plan_phase_order: Integer?, + adjustment_intervals: ::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval], + auto_collection: bool?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + customer: Orb::Models::Customer, + default_invoice_memo: String?, + discount_intervals: ::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::discount_interval], + end_date: Time?, + fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::FixedFeeQuantitySchedule], + invoicing_threshold: String?, + maximum_intervals: ::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::MaximumInterval], + metadata: ::Hash[Symbol, String], + minimum_intervals: ::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: ::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::PriceInterval], + redeemed_coupon: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::RedeemedCoupon?, + start_date: Time, + status: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::status, + trial_info: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::TrialInfo + ) -> void + | ( + ?Orb::Models::subscription_update_fixed_fee_quantity_response + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::subscription_update_fixed_fee_quantity_response + + type adjustment_interval = + { + id: String, + adjustment: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::adjustment, + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time + } + + class AdjustmentInterval < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::adjustment + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + ( + id: String, + adjustment: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::adjustment, + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::adjustment_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::adjustment_interval + + type adjustment = + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment + | Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment + | Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment + | Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment + | Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + + class Adjustment < Orb::Union + type plan_phase_usage_discount_adjustment = + { + id: String, + adjustment_type: :usage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float + } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :usage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + attr_accessor usage_discount: Float + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float, + adjustment_type: :usage_discount + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::plan_phase_usage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::plan_phase_usage_discount_adjustment + end + + type plan_phase_amount_discount_adjustment = + { + id: String, + adjustment_type: :amount_discount, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :amount_discount + + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :amount_discount + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::plan_phase_amount_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::plan_phase_amount_discount_adjustment + end + + type plan_phase_percentage_discount_adjustment = + { + id: String, + adjustment_type: :percentage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :percentage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor percentage_discount: Float + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :percentage_discount + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::plan_phase_percentage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::plan_phase_percentage_discount_adjustment + end + + type plan_phase_minimum_adjustment = + { + id: String, + adjustment_type: :minimum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :minimum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor item_id: String + + attr_accessor minimum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :minimum + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::plan_phase_minimum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::plan_phase_minimum_adjustment + end + + type plan_phase_maximum_adjustment = + { + id: String, + adjustment_type: :maximum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :maximum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor maximum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :maximum + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment + end + + private def self.variants: -> [[:usage_discount, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + end + end + + type billing_cycle_anchor_configuration = + { day: Integer, month: Integer?, year: Integer? } + + class BillingCycleAnchorConfiguration < Orb::BaseModel + attr_accessor day: Integer + + attr_accessor month: Integer? + + attr_accessor year: Integer? + + def initialize: + (day: Integer, month: Integer?, year: Integer?) -> void + | ( + ?Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::billing_cycle_anchor_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::billing_cycle_anchor_configuration + end + + type discount_interval = + Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::AmountDiscountInterval + | Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::PercentageDiscountInterval + | Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::UsageDiscountInterval + + class DiscountInterval < Orb::Union + type amount_discount_interval = + { + amount_discount: String, + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :amount, + end_date: Time?, + start_date: Time + } + + class AmountDiscountInterval < Orb::BaseModel + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :amount + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + ( + amount_discount: String, + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time, + discount_type: :amount + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::amount_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::amount_discount_interval + end + + type percentage_discount_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :percentage, + end_date: Time?, + percentage_discount: Float, + start_date: Time + } + + class PercentageDiscountInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :percentage + + attr_accessor end_date: Time? + + attr_accessor percentage_discount: Float + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + percentage_discount: Float, + start_date: Time, + discount_type: :percentage + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::percentage_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::percentage_discount_interval + end + + type usage_discount_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :usage, + end_date: Time?, + start_date: Time, + usage_discount: Float + } + + class UsageDiscountInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :usage + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + attr_accessor usage_discount: Float + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time, + usage_discount: Float, + discount_type: :usage + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::usage_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::usage_discount_interval + end + + private def self.variants: -> [[:amount, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::AmountDiscountInterval], [:percentage, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::PercentageDiscountInterval], [:usage, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::UsageDiscountInterval]] + end + + type fixed_fee_quantity_schedule = + { end_date: Time?, price_id: String, quantity: Float, start_date: Time } + + class FixedFeeQuantitySchedule < Orb::BaseModel + attr_accessor end_date: Time? + + attr_accessor price_id: String + + attr_accessor quantity: Float + + attr_accessor start_date: Time + + def initialize: + ( + end_date: Time?, + price_id: String, + quantity: Float, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::fixed_fee_quantity_schedule + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::fixed_fee_quantity_schedule + end + + type maximum_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + maximum_amount: String, + start_date: Time + } + + class MaximumInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor maximum_amount: String + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + maximum_amount: String, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::maximum_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::maximum_interval + end + + type minimum_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + minimum_amount: String, + start_date: Time + } + + class MinimumInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor minimum_amount: String + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + minimum_amount: String, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::minimum_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::minimum_interval + end + + type price_interval = + { + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + end_date: Time?, + filter: String?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::PriceInterval::FixedFeeQuantityTransition]?, + price: Orb::Models::price, + start_date: Time, + usage_customer_ids: ::Array[String]? + } + + class PriceInterval < Orb::BaseModel + attr_accessor id: String + + attr_accessor billing_cycle_day: Integer + + attr_accessor current_billing_period_end_date: Time? + + attr_accessor current_billing_period_start_date: Time? + + attr_accessor end_date: Time? + + attr_accessor filter: String? + + attr_accessor fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::PriceInterval::FixedFeeQuantityTransition]? + + attr_accessor price: Orb::Models::price + + attr_accessor start_date: Time + + attr_accessor usage_customer_ids: ::Array[String]? + + def initialize: + ( + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + end_date: Time?, + filter: String?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::PriceInterval::FixedFeeQuantityTransition]?, + price: Orb::Models::price, + start_date: Time, + usage_customer_ids: ::Array[String]? + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::price_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::price_interval + + type fixed_fee_quantity_transition = + { effective_date: Time, price_id: String, quantity: Integer } + + class FixedFeeQuantityTransition < Orb::BaseModel + attr_accessor effective_date: Time + + attr_accessor price_id: String + + attr_accessor quantity: Integer + + def initialize: + (effective_date: Time, price_id: String, quantity: Integer) -> void + | ( + ?Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::PriceInterval::fixed_fee_quantity_transition + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::PriceInterval::fixed_fee_quantity_transition + end + end + + type redeemed_coupon = + { coupon_id: String, end_date: Time?, start_date: Time } + + class RedeemedCoupon < Orb::BaseModel + attr_accessor coupon_id: String + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + (coupon_id: String, end_date: Time?, start_date: Time) -> void + | ( + ?Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::redeemed_coupon + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::redeemed_coupon + end + + type status = :active | :ended | :upcoming + + class Status < Orb::Enum + ACTIVE: :active + ENDED: :ended + UPCOMING: :upcoming + + def self.values: -> ::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::status] + end + + type trial_info = { end_date: Time? } + + class TrialInfo < Orb::BaseModel + attr_accessor end_date: Time? + + def initialize: + (end_date: Time?) -> void + | ( + ?Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::trial_info + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::trial_info + end + end + end +end diff --git a/sig/orb/models/subscription_update_trial_response.rbs b/sig/orb/models/subscription_update_trial_response.rbs new file mode 100644 index 00000000..8dc7bc15 --- /dev/null +++ b/sig/orb/models/subscription_update_trial_response.rbs @@ -0,0 +1,758 @@ +module Orb + module Models + type subscription_update_trial_response = + { + id: String, + active_plan_phase_order: Integer?, + adjustment_intervals: ::Array[Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval], + auto_collection: bool?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + customer: Orb::Models::Customer, + default_invoice_memo: String?, + discount_intervals: ::Array[Orb::Models::SubscriptionUpdateTrialResponse::discount_interval], + end_date: Time?, + fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionUpdateTrialResponse::FixedFeeQuantitySchedule], + invoicing_threshold: String?, + maximum_intervals: ::Array[Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval], + metadata: ::Hash[Symbol, String], + minimum_intervals: ::Array[Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: ::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval], + redeemed_coupon: Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon?, + start_date: Time, + status: Orb::Models::SubscriptionUpdateTrialResponse::status, + trial_info: Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo + } + + class SubscriptionUpdateTrialResponse < Orb::BaseModel + attr_accessor id: String + + attr_accessor active_plan_phase_order: Integer? + + attr_accessor adjustment_intervals: ::Array[Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval] + + attr_accessor auto_collection: bool? + + attr_accessor billing_cycle_anchor_configuration: Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration + + attr_accessor billing_cycle_day: Integer + + attr_accessor created_at: Time + + attr_accessor current_billing_period_end_date: Time? + + attr_accessor current_billing_period_start_date: Time? + + attr_accessor customer: Orb::Models::Customer + + attr_accessor default_invoice_memo: String? + + attr_accessor discount_intervals: ::Array[Orb::Models::SubscriptionUpdateTrialResponse::discount_interval] + + attr_accessor end_date: Time? + + attr_accessor fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionUpdateTrialResponse::FixedFeeQuantitySchedule] + + attr_accessor invoicing_threshold: String? + + attr_accessor maximum_intervals: ::Array[Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval] + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor minimum_intervals: ::Array[Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval] + + attr_accessor net_terms: Integer + + attr_accessor plan: Orb::Models::Plan + + attr_accessor price_intervals: ::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval] + + attr_accessor redeemed_coupon: Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon? + + attr_accessor start_date: Time + + attr_accessor status: Orb::Models::SubscriptionUpdateTrialResponse::status + + attr_accessor trial_info: Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo + + def initialize: + ( + id: String, + active_plan_phase_order: Integer?, + adjustment_intervals: ::Array[Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval], + auto_collection: bool?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration, + billing_cycle_day: Integer, + created_at: Time, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + customer: Orb::Models::Customer, + default_invoice_memo: String?, + discount_intervals: ::Array[Orb::Models::SubscriptionUpdateTrialResponse::discount_interval], + end_date: Time?, + fixed_fee_quantity_schedule: ::Array[Orb::Models::SubscriptionUpdateTrialResponse::FixedFeeQuantitySchedule], + invoicing_threshold: String?, + maximum_intervals: ::Array[Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval], + metadata: ::Hash[Symbol, String], + minimum_intervals: ::Array[Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval], + net_terms: Integer, + plan: Orb::Models::Plan, + price_intervals: ::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval], + redeemed_coupon: Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon?, + start_date: Time, + status: Orb::Models::SubscriptionUpdateTrialResponse::status, + trial_info: Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo + ) -> void + | ( + ?Orb::Models::subscription_update_trial_response | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::subscription_update_trial_response + + type adjustment_interval = + { + id: String, + adjustment: Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::adjustment, + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time + } + + class AdjustmentInterval < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment: Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::adjustment + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + ( + id: String, + adjustment: Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::adjustment, + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateTrialResponse::adjustment_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateTrialResponse::adjustment_interval + + type adjustment = + Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment + | Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment + | Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment + | Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment + | Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment + + class Adjustment < Orb::Union + type plan_phase_usage_discount_adjustment = + { + id: String, + adjustment_type: :usage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float + } + + class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :usage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + attr_accessor usage_discount: Float + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + usage_discount: Float, + adjustment_type: :usage_discount + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::plan_phase_usage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::plan_phase_usage_discount_adjustment + end + + type plan_phase_amount_discount_adjustment = + { + id: String, + adjustment_type: :amount_discount, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :amount_discount + + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + amount_discount: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :amount_discount + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::plan_phase_amount_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::plan_phase_amount_discount_adjustment + end + + type plan_phase_percentage_discount_adjustment = + { + id: String, + adjustment_type: :percentage_discount, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :percentage_discount + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor percentage_discount: Float + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + percentage_discount: Float, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :percentage_discount + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::plan_phase_percentage_discount_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::plan_phase_percentage_discount_adjustment + end + + type plan_phase_minimum_adjustment = + { + id: String, + adjustment_type: :minimum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMinimumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :minimum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor item_id: String + + attr_accessor minimum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + item_id: String, + minimum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :minimum + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::plan_phase_minimum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::plan_phase_minimum_adjustment + end + + type plan_phase_maximum_adjustment = + { + id: String, + adjustment_type: :maximum, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String? + } + + class PlanPhaseMaximumAdjustment < Orb::BaseModel + attr_accessor id: String + + attr_accessor adjustment_type: :maximum + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor is_invoice_level: bool + + attr_accessor maximum_amount: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor reason: String? + + def initialize: + ( + id: String, + applies_to_price_ids: ::Array[String], + is_invoice_level: bool, + maximum_amount: String, + plan_phase_order: Integer?, + reason: String?, + adjustment_type: :maximum + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment + end + + private def self.variants: -> [[:usage_discount, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + end + end + + type billing_cycle_anchor_configuration = + { day: Integer, month: Integer?, year: Integer? } + + class BillingCycleAnchorConfiguration < Orb::BaseModel + attr_accessor day: Integer + + attr_accessor month: Integer? + + attr_accessor year: Integer? + + def initialize: + (day: Integer, month: Integer?, year: Integer?) -> void + | ( + ?Orb::Models::SubscriptionUpdateTrialResponse::billing_cycle_anchor_configuration + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateTrialResponse::billing_cycle_anchor_configuration + end + + type discount_interval = + Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::AmountDiscountInterval + | Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::PercentageDiscountInterval + | Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::UsageDiscountInterval + + class DiscountInterval < Orb::Union + type amount_discount_interval = + { + amount_discount: String, + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :amount, + end_date: Time?, + start_date: Time + } + + class AmountDiscountInterval < Orb::BaseModel + attr_accessor amount_discount: String + + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :amount + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + ( + amount_discount: String, + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time, + discount_type: :amount + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::amount_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::amount_discount_interval + end + + type percentage_discount_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :percentage, + end_date: Time?, + percentage_discount: Float, + start_date: Time + } + + class PercentageDiscountInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :percentage + + attr_accessor end_date: Time? + + attr_accessor percentage_discount: Float + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + percentage_discount: Float, + start_date: Time, + discount_type: :percentage + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::percentage_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::percentage_discount_interval + end + + type usage_discount_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + discount_type: :usage, + end_date: Time?, + start_date: Time, + usage_discount: Float + } + + class UsageDiscountInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor discount_type: :usage + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + attr_accessor usage_discount: Float + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + start_date: Time, + usage_discount: Float, + discount_type: :usage + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::usage_discount_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::usage_discount_interval + end + + private def self.variants: -> [[:amount, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::AmountDiscountInterval], [:percentage, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::PercentageDiscountInterval], [:usage, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::UsageDiscountInterval]] + end + + type fixed_fee_quantity_schedule = + { end_date: Time?, price_id: String, quantity: Float, start_date: Time } + + class FixedFeeQuantitySchedule < Orb::BaseModel + attr_accessor end_date: Time? + + attr_accessor price_id: String + + attr_accessor quantity: Float + + attr_accessor start_date: Time + + def initialize: + ( + end_date: Time?, + price_id: String, + quantity: Float, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateTrialResponse::fixed_fee_quantity_schedule + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateTrialResponse::fixed_fee_quantity_schedule + end + + type maximum_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + maximum_amount: String, + start_date: Time + } + + class MaximumInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor maximum_amount: String + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + maximum_amount: String, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateTrialResponse::maximum_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateTrialResponse::maximum_interval + end + + type minimum_interval = + { + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + minimum_amount: String, + start_date: Time + } + + class MinimumInterval < Orb::BaseModel + attr_accessor applies_to_price_ids: ::Array[String] + + attr_accessor applies_to_price_interval_ids: ::Array[String] + + attr_accessor end_date: Time? + + attr_accessor minimum_amount: String + + attr_accessor start_date: Time + + def initialize: + ( + applies_to_price_ids: ::Array[String], + applies_to_price_interval_ids: ::Array[String], + end_date: Time?, + minimum_amount: String, + start_date: Time + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateTrialResponse::minimum_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateTrialResponse::minimum_interval + end + + type price_interval = + { + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + end_date: Time?, + filter: String?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition]?, + price: Orb::Models::price, + start_date: Time, + usage_customer_ids: ::Array[String]? + } + + class PriceInterval < Orb::BaseModel + attr_accessor id: String + + attr_accessor billing_cycle_day: Integer + + attr_accessor current_billing_period_end_date: Time? + + attr_accessor current_billing_period_start_date: Time? + + attr_accessor end_date: Time? + + attr_accessor filter: String? + + attr_accessor fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition]? + + attr_accessor price: Orb::Models::price + + attr_accessor start_date: Time + + attr_accessor usage_customer_ids: ::Array[String]? + + def initialize: + ( + id: String, + billing_cycle_day: Integer, + current_billing_period_end_date: Time?, + current_billing_period_start_date: Time?, + end_date: Time?, + filter: String?, + fixed_fee_quantity_transitions: ::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition]?, + price: Orb::Models::price, + start_date: Time, + usage_customer_ids: ::Array[String]? + ) -> void + | ( + ?Orb::Models::SubscriptionUpdateTrialResponse::price_interval + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateTrialResponse::price_interval + + type fixed_fee_quantity_transition = + { effective_date: Time, price_id: String, quantity: Integer } + + class FixedFeeQuantityTransition < Orb::BaseModel + attr_accessor effective_date: Time + + attr_accessor price_id: String + + attr_accessor quantity: Integer + + def initialize: + (effective_date: Time, price_id: String, quantity: Integer) -> void + | ( + ?Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::fixed_fee_quantity_transition + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::fixed_fee_quantity_transition + end + end + + type redeemed_coupon = + { coupon_id: String, end_date: Time?, start_date: Time } + + class RedeemedCoupon < Orb::BaseModel + attr_accessor coupon_id: String + + attr_accessor end_date: Time? + + attr_accessor start_date: Time + + def initialize: + (coupon_id: String, end_date: Time?, start_date: Time) -> void + | ( + ?Orb::Models::SubscriptionUpdateTrialResponse::redeemed_coupon + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateTrialResponse::redeemed_coupon + end + + type status = :active | :ended | :upcoming + + class Status < Orb::Enum + ACTIVE: :active + ENDED: :ended + UPCOMING: :upcoming + + def self.values: -> ::Array[Orb::Models::SubscriptionUpdateTrialResponse::status] + end + + type trial_info = { end_date: Time? } + + class TrialInfo < Orb::BaseModel + attr_accessor end_date: Time? + + def initialize: + (end_date: Time?) -> void + | ( + ?Orb::Models::SubscriptionUpdateTrialResponse::trial_info + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUpdateTrialResponse::trial_info + end + end + end +end diff --git a/sig/orb/models/subscription_usage.rbs b/sig/orb/models/subscription_usage.rbs index 7bfb1d23..26031eba 100644 --- a/sig/orb/models/subscription_usage.rbs +++ b/sig/orb/models/subscription_usage.rbs @@ -26,22 +26,22 @@ module Orb type data = { - billable_metric: Orb::Models::BillableMetricSimpleModel, - usage: ::Array[Orb::Models::UsageModel], + billable_metric: Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::BillableMetric, + usage: ::Array[Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::Usage], view_mode: Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::view_mode } class Data < Orb::BaseModel - attr_accessor billable_metric: Orb::Models::BillableMetricSimpleModel + attr_accessor billable_metric: Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::BillableMetric - attr_accessor usage: ::Array[Orb::Models::UsageModel] + attr_accessor usage: ::Array[Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::Usage] attr_accessor view_mode: Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::view_mode def initialize: ( - billable_metric: Orb::Models::BillableMetricSimpleModel, - usage: ::Array[Orb::Models::UsageModel], + billable_metric: Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::BillableMetric, + usage: ::Array[Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::Usage], view_mode: Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::view_mode ) -> void | ( @@ -51,6 +51,47 @@ module Orb def to_hash: -> Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::data + type billable_metric = { id: String, name: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::billable_metric + end + + type usage = + { quantity: Float, timeframe_end: Time, timeframe_start: Time } + + class Usage < Orb::BaseModel + attr_accessor quantity: Float + + attr_accessor timeframe_end: Time + + attr_accessor timeframe_start: Time + + def initialize: + ( + quantity: Float, + timeframe_end: Time, + timeframe_start: Time + ) -> void + | ( + ?Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::usage + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::usage + end + type view_mode = :periodic | :cumulative class ViewMode < Orb::Enum @@ -87,26 +128,26 @@ module Orb type data = { - billable_metric: Orb::Models::BillableMetricSimpleModel, + billable_metric: Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::BillableMetric, metric_group: Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::MetricGroup, - usage: ::Array[Orb::Models::UsageModel], + usage: ::Array[Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::Usage], view_mode: Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::view_mode } class Data < Orb::BaseModel - attr_accessor billable_metric: Orb::Models::BillableMetricSimpleModel + attr_accessor billable_metric: Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::BillableMetric attr_accessor metric_group: Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::MetricGroup - attr_accessor usage: ::Array[Orb::Models::UsageModel] + attr_accessor usage: ::Array[Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::Usage] attr_accessor view_mode: Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::view_mode def initialize: ( - billable_metric: Orb::Models::BillableMetricSimpleModel, + billable_metric: Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::BillableMetric, metric_group: Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::MetricGroup, - usage: ::Array[Orb::Models::UsageModel], + usage: ::Array[Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::Usage], view_mode: Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::view_mode ) -> void | ( @@ -116,6 +157,23 @@ module Orb def to_hash: -> Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::data + type billable_metric = { id: String, name: String } + + class BillableMetric < Orb::BaseModel + attr_accessor id: String + + attr_accessor name: String + + def initialize: + (id: String, name: String) -> void + | ( + ?Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::billable_metric + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::billable_metric + end + type metric_group = { property_key: String, property_value: String } class MetricGroup < Orb::BaseModel @@ -133,6 +191,30 @@ module Orb def to_hash: -> Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::metric_group end + type usage = + { quantity: Float, timeframe_end: Time, timeframe_start: Time } + + class Usage < Orb::BaseModel + attr_accessor quantity: Float + + attr_accessor timeframe_end: Time + + attr_accessor timeframe_start: Time + + def initialize: + ( + quantity: Float, + timeframe_end: Time, + timeframe_start: Time + ) -> void + | ( + ?Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::usage + | Orb::BaseModel data + ) -> void + + def to_hash: -> Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::usage + end + type view_mode = :periodic | :cumulative class ViewMode < Orb::Enum diff --git a/sig/orb/models/subscriptions.rbs b/sig/orb/models/subscriptions.rbs index 57ceea20..63b552cd 100644 --- a/sig/orb/models/subscriptions.rbs +++ b/sig/orb/models/subscriptions.rbs @@ -2,18 +2,18 @@ module Orb module Models type subscriptions_api = { - data: ::Array[Orb::Models::SubscriptionModel], + data: ::Array[Orb::Models::Subscription], pagination_metadata: Orb::Models::PaginationMetadata } class SubscriptionsAPI < Orb::BaseModel - attr_accessor data: ::Array[Orb::Models::SubscriptionModel] + attr_accessor data: ::Array[Orb::Models::Subscription] attr_accessor pagination_metadata: Orb::Models::PaginationMetadata def initialize: ( - data: ::Array[Orb::Models::SubscriptionModel], + data: ::Array[Orb::Models::Subscription], pagination_metadata: Orb::Models::PaginationMetadata ) -> void | (?Orb::Models::subscriptions_api | Orb::BaseModel data) -> void diff --git a/sig/orb/models/subscriptions_model.rbs b/sig/orb/models/subscriptions_model.rbs deleted file mode 100644 index 06713bd9..00000000 --- a/sig/orb/models/subscriptions_model.rbs +++ /dev/null @@ -1,24 +0,0 @@ -module Orb - module Models - type subscriptions_model = - { - data: ::Array[Orb::Models::SubscriptionModel], - pagination_metadata: Orb::Models::PaginationMetadata - } - - class SubscriptionsModel < Orb::BaseModel - attr_accessor data: ::Array[Orb::Models::SubscriptionModel] - - attr_accessor pagination_metadata: Orb::Models::PaginationMetadata - - def initialize: - ( - data: ::Array[Orb::Models::SubscriptionModel], - pagination_metadata: Orb::Models::PaginationMetadata - ) -> void - | (?Orb::Models::subscriptions_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::subscriptions_model - end - end -end diff --git a/sig/orb/models/tax_amount_model.rbs b/sig/orb/models/tax_amount_model.rbs deleted file mode 100644 index 59c54db6..00000000 --- a/sig/orb/models/tax_amount_model.rbs +++ /dev/null @@ -1,28 +0,0 @@ -module Orb - module Models - type tax_amount_model = - { - amount: String, - tax_rate_description: String, - tax_rate_percentage: String? - } - - class TaxAmountModel < Orb::BaseModel - attr_accessor amount: String - - attr_accessor tax_rate_description: String - - attr_accessor tax_rate_percentage: String? - - def initialize: - ( - amount: String, - tax_rate_description: String, - tax_rate_percentage: String? - ) -> void - | (?Orb::Models::tax_amount_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::tax_amount_model - end - end -end diff --git a/sig/orb/models/threshold_model.rbs b/sig/orb/models/threshold_model.rbs deleted file mode 100644 index 4b1ff686..00000000 --- a/sig/orb/models/threshold_model.rbs +++ /dev/null @@ -1,15 +0,0 @@ -module Orb - module Models - type threshold_model = { value: Float } - - class ThresholdModel < Orb::BaseModel - attr_accessor value: Float - - def initialize: - (value: Float) -> void - | (?Orb::Models::threshold_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::threshold_model - end - end -end diff --git a/sig/orb/models/tiered_bps_config_model.rbs b/sig/orb/models/tiered_bps_config_model.rbs deleted file mode 100644 index ecdfb32f..00000000 --- a/sig/orb/models/tiered_bps_config_model.rbs +++ /dev/null @@ -1,47 +0,0 @@ -module Orb - module Models - type tiered_bps_config_model = - { tiers: ::Array[Orb::Models::TieredBpsConfigModel::Tier] } - - class TieredBpsConfigModel < Orb::BaseModel - attr_accessor tiers: ::Array[Orb::Models::TieredBpsConfigModel::Tier] - - def initialize: - (tiers: ::Array[Orb::Models::TieredBpsConfigModel::Tier]) -> void - | (?Orb::Models::tiered_bps_config_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::tiered_bps_config_model - - type tier = - { - bps: Float, - minimum_amount: String, - maximum_amount: String?, - per_unit_maximum: String? - } - - class Tier < Orb::BaseModel - attr_accessor bps: Float - - attr_accessor minimum_amount: String - - attr_accessor maximum_amount: String? - - attr_accessor per_unit_maximum: String? - - def initialize: - ( - bps: Float, - minimum_amount: String, - maximum_amount: String?, - per_unit_maximum: String? - ) -> void - | ( - ?Orb::Models::TieredBpsConfigModel::tier | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::TieredBpsConfigModel::tier - end - end - end -end diff --git a/sig/orb/models/tiered_config_model.rbs b/sig/orb/models/tiered_config_model.rbs deleted file mode 100644 index e6c68bce..00000000 --- a/sig/orb/models/tiered_config_model.rbs +++ /dev/null @@ -1,34 +0,0 @@ -module Orb - module Models - type tiered_config_model = - { tiers: ::Array[Orb::Models::TieredConfigModel::Tier] } - - class TieredConfigModel < Orb::BaseModel - attr_accessor tiers: ::Array[Orb::Models::TieredConfigModel::Tier] - - def initialize: - (tiers: ::Array[Orb::Models::TieredConfigModel::Tier]) -> void - | (?Orb::Models::tiered_config_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::tiered_config_model - - type tier = { first_unit: Float, unit_amount: String, last_unit: Float? } - - class Tier < Orb::BaseModel - attr_accessor first_unit: Float - - attr_accessor unit_amount: String - - attr_accessor last_unit: Float? - - def initialize: - (first_unit: Float, unit_amount: String, last_unit: Float?) -> void - | ( - ?Orb::Models::TieredConfigModel::tier | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::TieredConfigModel::tier - end - end - end -end diff --git a/sig/orb/models/top_up_model.rbs b/sig/orb/models/top_up_model.rbs deleted file mode 100644 index 8ede8817..00000000 --- a/sig/orb/models/top_up_model.rbs +++ /dev/null @@ -1,90 +0,0 @@ -module Orb - module Models - type top_up_model = - { - id: String, - amount: String, - currency: String, - invoice_settings: Orb::Models::TopUpModel::InvoiceSettings, - per_unit_cost_basis: String, - threshold: String, - expires_after: Integer?, - expires_after_unit: Orb::Models::TopUpModel::expires_after_unit? - } - - class TopUpModel < Orb::BaseModel - attr_accessor id: String - - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor invoice_settings: Orb::Models::TopUpModel::InvoiceSettings - - attr_accessor per_unit_cost_basis: String - - attr_accessor threshold: String - - attr_accessor expires_after: Integer? - - attr_accessor expires_after_unit: Orb::Models::TopUpModel::expires_after_unit? - - def initialize: - ( - id: String, - amount: String, - currency: String, - invoice_settings: Orb::Models::TopUpModel::InvoiceSettings, - per_unit_cost_basis: String, - threshold: String, - expires_after: Integer?, - expires_after_unit: Orb::Models::TopUpModel::expires_after_unit? - ) -> void - | (?Orb::Models::top_up_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::top_up_model - - type invoice_settings = - { - auto_collection: bool, - net_terms: Integer, - memo: String?, - require_successful_payment: bool - } - - class InvoiceSettings < Orb::BaseModel - attr_accessor auto_collection: bool - - attr_accessor net_terms: Integer - - attr_accessor memo: String? - - attr_reader require_successful_payment: bool? - - def require_successful_payment=: (bool) -> bool - - def initialize: - ( - auto_collection: bool, - net_terms: Integer, - memo: String?, - require_successful_payment: bool - ) -> void - | ( - ?Orb::Models::TopUpModel::invoice_settings | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::TopUpModel::invoice_settings - end - - type expires_after_unit = :day | :month - - class ExpiresAfterUnit < Orb::Enum - DAY: :day - MONTH: :month - - def self.values: -> ::Array[Orb::Models::TopUpModel::expires_after_unit] - end - end - end -end diff --git a/sig/orb/models/top_ups_model.rbs b/sig/orb/models/top_ups_model.rbs deleted file mode 100644 index e789e7e4..00000000 --- a/sig/orb/models/top_ups_model.rbs +++ /dev/null @@ -1,24 +0,0 @@ -module Orb - module Models - type top_ups_model = - { - data: ::Array[Orb::Models::TopUpModel], - pagination_metadata: Orb::Models::PaginationMetadata - } - - class TopUpsModel < Orb::BaseModel - attr_accessor data: ::Array[Orb::Models::TopUpModel] - - attr_accessor pagination_metadata: Orb::Models::PaginationMetadata - - def initialize: - ( - data: ::Array[Orb::Models::TopUpModel], - pagination_metadata: Orb::Models::PaginationMetadata - ) -> void - | (?Orb::Models::top_ups_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::top_ups_model - end - end -end diff --git a/sig/orb/models/trial_discount_model.rbs b/sig/orb/models/trial_discount_model.rbs deleted file mode 100644 index ab0bd653..00000000 --- a/sig/orb/models/trial_discount_model.rbs +++ /dev/null @@ -1,44 +0,0 @@ -module Orb - module Models - type trial_discount_model = - { - applies_to_price_ids: ::Array[String], - discount_type: Orb::Models::TrialDiscountModel::discount_type, - reason: String?, - trial_amount_discount: String?, - trial_percentage_discount: Float? - } - - class TrialDiscountModel < Orb::BaseModel - attr_accessor applies_to_price_ids: ::Array[String] - - attr_accessor discount_type: Orb::Models::TrialDiscountModel::discount_type - - attr_accessor reason: String? - - attr_accessor trial_amount_discount: String? - - attr_accessor trial_percentage_discount: Float? - - def initialize: - ( - applies_to_price_ids: ::Array[String], - discount_type: Orb::Models::TrialDiscountModel::discount_type, - reason: String?, - trial_amount_discount: String?, - trial_percentage_discount: Float? - ) -> void - | (?Orb::Models::trial_discount_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::trial_discount_model - - type discount_type = :trial - - class DiscountType < Orb::Enum - TRIAL: :trial - - def self.values: -> ::Array[Orb::Models::TrialDiscountModel::discount_type] - end - end - end -end diff --git a/sig/orb/models/unit_config_model.rbs b/sig/orb/models/unit_config_model.rbs deleted file mode 100644 index 69edfc17..00000000 --- a/sig/orb/models/unit_config_model.rbs +++ /dev/null @@ -1,15 +0,0 @@ -module Orb - module Models - type unit_config_model = { unit_amount: String } - - class UnitConfigModel < Orb::BaseModel - attr_accessor unit_amount: String - - def initialize: - (unit_amount: String) -> void - | (?Orb::Models::unit_config_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::unit_config_model - end - end -end diff --git a/sig/orb/models/usage_discount_interval_model.rbs b/sig/orb/models/usage_discount_interval_model.rbs deleted file mode 100644 index 41488894..00000000 --- a/sig/orb/models/usage_discount_interval_model.rbs +++ /dev/null @@ -1,50 +0,0 @@ -module Orb - module Models - type usage_discount_interval_model = - { - applies_to_price_ids: ::Array[String], - applies_to_price_interval_ids: ::Array[String], - discount_type: Orb::Models::UsageDiscountIntervalModel::discount_type, - end_date: Time?, - start_date: Time, - usage_discount: Float - } - - class UsageDiscountIntervalModel < Orb::BaseModel - attr_accessor applies_to_price_ids: ::Array[String] - - attr_accessor applies_to_price_interval_ids: ::Array[String] - - attr_accessor discount_type: Orb::Models::UsageDiscountIntervalModel::discount_type - - attr_accessor end_date: Time? - - attr_accessor start_date: Time - - attr_accessor usage_discount: Float - - def initialize: - ( - applies_to_price_ids: ::Array[String], - applies_to_price_interval_ids: ::Array[String], - discount_type: Orb::Models::UsageDiscountIntervalModel::discount_type, - end_date: Time?, - start_date: Time, - usage_discount: Float - ) -> void - | ( - ?Orb::Models::usage_discount_interval_model | Orb::BaseModel data - ) -> void - - def to_hash: -> Orb::Models::usage_discount_interval_model - - type discount_type = :usage - - class DiscountType < Orb::Enum - USAGE: :usage - - def self.values: -> ::Array[Orb::Models::UsageDiscountIntervalModel::discount_type] - end - end - end -end diff --git a/sig/orb/models/usage_model.rbs b/sig/orb/models/usage_model.rbs deleted file mode 100644 index 45c5a7b8..00000000 --- a/sig/orb/models/usage_model.rbs +++ /dev/null @@ -1,20 +0,0 @@ -module Orb - module Models - type usage_model = - { quantity: Float, timeframe_end: Time, timeframe_start: Time } - - class UsageModel < Orb::BaseModel - attr_accessor quantity: Float - - attr_accessor timeframe_end: Time - - attr_accessor timeframe_start: Time - - def initialize: - (quantity: Float, timeframe_end: Time, timeframe_start: Time) -> void - | (?Orb::Models::usage_model | Orb::BaseModel data) -> void - - def to_hash: -> Orb::Models::usage_model - end - end -end diff --git a/sig/orb/resources/alerts.rbs b/sig/orb/resources/alerts.rbs index 5e4eba2c..25a2e734 100644 --- a/sig/orb/resources/alerts.rbs +++ b/sig/orb/resources/alerts.rbs @@ -5,27 +5,27 @@ module Orb ( String alert_id, ?Orb::Models::AlertRetrieveParams | ::Hash[Symbol, top] params - ) -> Orb::Models::AlertModel + ) -> Orb::Models::Alert | ( String alert_id, request_options: Orb::request_opts - ) -> Orb::Models::AlertModel + ) -> Orb::Models::Alert def update: ( String alert_configuration_id, Orb::Models::AlertUpdateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::AlertModel + ) -> Orb::Models::Alert | ( String alert_configuration_id, - thresholds: ::Array[Orb::Models::ThresholdModel], + thresholds: ::Array[Orb::Models::AlertUpdateParams::Threshold], request_options: Orb::request_opts - ) -> Orb::Models::AlertModel + ) -> Orb::Models::Alert def list: ( ?Orb::Models::AlertListParams | ::Hash[Symbol, top] params - ) -> Orb::Page[Orb::Models::AlertModel] + ) -> Orb::Page[Orb::Models::Alert] | ( created_at_gt: Time?, created_at_gte: Time?, @@ -37,70 +37,70 @@ module Orb limit: Integer, subscription_id: String?, request_options: Orb::request_opts - ) -> Orb::Page[Orb::Models::AlertModel] + ) -> Orb::Page[Orb::Models::Alert] def create_for_customer: ( String customer_id, Orb::Models::AlertCreateForCustomerParams | ::Hash[Symbol, top] params - ) -> Orb::Models::AlertModel + ) -> Orb::Models::Alert | ( String customer_id, currency: String, type: Orb::Models::CreateCustomerAlertRequest::type_, - thresholds: ::Array[Orb::Models::ThresholdModel]?, + thresholds: ::Array[Orb::Models::CreateCustomerAlertRequest::Threshold]?, request_options: Orb::request_opts - ) -> Orb::Models::AlertModel + ) -> Orb::Models::Alert def create_for_external_customer: ( String external_customer_id, Orb::Models::AlertCreateForExternalCustomerParams | ::Hash[Symbol, top] params - ) -> Orb::Models::AlertModel + ) -> Orb::Models::Alert | ( String external_customer_id, currency: String, type: Orb::Models::CreateCustomerAlertRequest::type_, - thresholds: ::Array[Orb::Models::ThresholdModel]?, + thresholds: ::Array[Orb::Models::CreateCustomerAlertRequest::Threshold]?, request_options: Orb::request_opts - ) -> Orb::Models::AlertModel + ) -> Orb::Models::Alert def create_for_subscription: ( String subscription_id, Orb::Models::AlertCreateForSubscriptionParams | ::Hash[Symbol, top] params - ) -> Orb::Models::AlertModel + ) -> Orb::Models::Alert | ( String subscription_id, - thresholds: ::Array[Orb::Models::ThresholdModel], + thresholds: ::Array[Orb::Models::AlertCreateForSubscriptionParams::Threshold], type: Orb::Models::AlertCreateForSubscriptionParams::type_, metric_id: String?, request_options: Orb::request_opts - ) -> Orb::Models::AlertModel + ) -> Orb::Models::Alert def disable: ( String alert_configuration_id, ?Orb::Models::AlertDisableParams | ::Hash[Symbol, top] params - ) -> Orb::Models::AlertModel + ) -> Orb::Models::Alert | ( String alert_configuration_id, subscription_id: String?, request_options: Orb::request_opts - ) -> Orb::Models::AlertModel + ) -> Orb::Models::Alert def enable: ( String alert_configuration_id, ?Orb::Models::AlertEnableParams | ::Hash[Symbol, top] params - ) -> Orb::Models::AlertModel + ) -> Orb::Models::Alert | ( String alert_configuration_id, subscription_id: String?, request_options: Orb::request_opts - ) -> Orb::Models::AlertModel + ) -> Orb::Models::Alert def initialize: (client: Orb::Client) -> void end diff --git a/sig/orb/resources/coupons.rbs b/sig/orb/resources/coupons.rbs index 39745fe8..d6448027 100644 --- a/sig/orb/resources/coupons.rbs +++ b/sig/orb/resources/coupons.rbs @@ -6,46 +6,46 @@ module Orb def create: ( Orb::Models::CouponCreateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::CouponModel + ) -> Orb::Models::Coupon | ( discount: Orb::Models::CouponCreateParams::discount, redemption_code: String, duration_in_months: Integer?, max_redemptions: Integer?, request_options: Orb::request_opts - ) -> Orb::Models::CouponModel + ) -> Orb::Models::Coupon def list: ( ?Orb::Models::CouponListParams | ::Hash[Symbol, top] params - ) -> Orb::Page[Orb::Models::CouponModel] + ) -> Orb::Page[Orb::Models::Coupon] | ( cursor: String?, limit: Integer, redemption_code: String?, show_archived: bool?, request_options: Orb::request_opts - ) -> Orb::Page[Orb::Models::CouponModel] + ) -> Orb::Page[Orb::Models::Coupon] def archive: ( String coupon_id, ?Orb::Models::CouponArchiveParams | ::Hash[Symbol, top] params - ) -> Orb::Models::CouponModel + ) -> Orb::Models::Coupon | ( String coupon_id, request_options: Orb::request_opts - ) -> Orb::Models::CouponModel + ) -> Orb::Models::Coupon def fetch: ( String coupon_id, ?Orb::Models::CouponFetchParams | ::Hash[Symbol, top] params - ) -> Orb::Models::CouponModel + ) -> Orb::Models::Coupon | ( String coupon_id, request_options: Orb::request_opts - ) -> Orb::Models::CouponModel + ) -> Orb::Models::Coupon def initialize: (client: Orb::Client) -> void end diff --git a/sig/orb/resources/coupons/subscriptions.rbs b/sig/orb/resources/coupons/subscriptions.rbs index 3a42640a..8cbb341f 100644 --- a/sig/orb/resources/coupons/subscriptions.rbs +++ b/sig/orb/resources/coupons/subscriptions.rbs @@ -7,13 +7,13 @@ module Orb String coupon_id, ?Orb::Models::Coupons::SubscriptionListParams | ::Hash[Symbol, top] params - ) -> Orb::Page[Orb::Models::SubscriptionModel] + ) -> Orb::Page[Orb::Models::Subscription] | ( String coupon_id, cursor: String?, limit: Integer, request_options: Orb::request_opts - ) -> Orb::Page[Orb::Models::SubscriptionModel] + ) -> Orb::Page[Orb::Models::Subscription] def initialize: (client: Orb::Client) -> void end diff --git a/sig/orb/resources/credit_notes.rbs b/sig/orb/resources/credit_notes.rbs index 3ef45448..6d858614 100644 --- a/sig/orb/resources/credit_notes.rbs +++ b/sig/orb/resources/credit_notes.rbs @@ -4,33 +4,33 @@ module Orb def create: ( Orb::Models::CreditNoteCreateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::CreditNoteModel + ) -> Orb::Models::CreditNote | ( line_items: ::Array[Orb::Models::CreditNoteCreateParams::LineItem], memo: String?, reason: Orb::Models::CreditNoteCreateParams::reason?, request_options: Orb::request_opts - ) -> Orb::Models::CreditNoteModel + ) -> Orb::Models::CreditNote def list: ( ?Orb::Models::CreditNoteListParams | ::Hash[Symbol, top] params - ) -> Orb::Page[Orb::Models::CreditNoteModel] + ) -> Orb::Page[Orb::Models::CreditNote] | ( cursor: String?, limit: Integer, request_options: Orb::request_opts - ) -> Orb::Page[Orb::Models::CreditNoteModel] + ) -> Orb::Page[Orb::Models::CreditNote] def fetch: ( String credit_note_id, ?Orb::Models::CreditNoteFetchParams | ::Hash[Symbol, top] params - ) -> Orb::Models::CreditNoteModel + ) -> Orb::Models::CreditNote | ( String credit_note_id, request_options: Orb::request_opts - ) -> Orb::Models::CreditNoteModel + ) -> Orb::Models::CreditNote def initialize: (client: Orb::Client) -> void end diff --git a/sig/orb/resources/customers.rbs b/sig/orb/resources/customers.rbs index a6832534..29b716c5 100644 --- a/sig/orb/resources/customers.rbs +++ b/sig/orb/resources/customers.rbs @@ -10,60 +10,60 @@ module Orb def create: ( Orb::Models::CustomerCreateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::CustomerModel + ) -> Orb::Models::Customer | ( email: String, name: String, - accounting_sync_configuration: Orb::Models::NewAccountingSyncConfigurationModel?, + accounting_sync_configuration: Orb::Models::CustomerCreateParams::AccountingSyncConfiguration?, additional_emails: ::Array[String]?, auto_collection: bool?, - billing_address: Orb::Models::AddressInputModel?, + billing_address: Orb::Models::CustomerCreateParams::BillingAddress?, currency: String?, email_delivery: bool?, external_customer_id: String?, - hierarchy: Orb::Models::CustomerHierarchyConfigModel?, + hierarchy: Orb::Models::CustomerCreateParams::Hierarchy?, metadata: ::Hash[Symbol, String?]?, payment_provider: Orb::Models::CustomerCreateParams::payment_provider?, payment_provider_id: String?, - reporting_configuration: Orb::Models::NewReportingConfigurationModel?, - shipping_address: Orb::Models::AddressInputModel?, - tax_configuration: Orb::Models::new_tax_configuration_model?, - tax_id: Orb::Models::CustomerTaxIDModel?, + reporting_configuration: Orb::Models::CustomerCreateParams::ReportingConfiguration?, + shipping_address: Orb::Models::CustomerCreateParams::ShippingAddress?, + tax_configuration: Orb::Models::CustomerCreateParams::tax_configuration?, + tax_id: Orb::Models::CustomerCreateParams::TaxID?, timezone: String?, request_options: Orb::request_opts - ) -> Orb::Models::CustomerModel + ) -> Orb::Models::Customer def update: ( String customer_id, ?Orb::Models::CustomerUpdateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::CustomerModel + ) -> Orb::Models::Customer | ( String customer_id, - accounting_sync_configuration: Orb::Models::NewAccountingSyncConfigurationModel?, + accounting_sync_configuration: Orb::Models::CustomerUpdateParams::AccountingSyncConfiguration?, additional_emails: ::Array[String]?, auto_collection: bool?, - billing_address: Orb::Models::AddressInputModel?, + billing_address: Orb::Models::CustomerUpdateParams::BillingAddress?, currency: String?, email: String?, email_delivery: bool?, external_customer_id: String?, - hierarchy: Orb::Models::CustomerHierarchyConfigModel?, + hierarchy: Orb::Models::CustomerUpdateParams::Hierarchy?, metadata: ::Hash[Symbol, String?]?, name: String?, - payment_provider: Orb::Models::EditCustomerModel::payment_provider?, + payment_provider: Orb::Models::CustomerUpdateParams::payment_provider?, payment_provider_id: String?, - reporting_configuration: Orb::Models::NewReportingConfigurationModel?, - shipping_address: Orb::Models::AddressInputModel?, - tax_configuration: Orb::Models::new_tax_configuration_model?, - tax_id: Orb::Models::CustomerTaxIDModel?, + reporting_configuration: Orb::Models::CustomerUpdateParams::ReportingConfiguration?, + shipping_address: Orb::Models::CustomerUpdateParams::ShippingAddress?, + tax_configuration: Orb::Models::CustomerUpdateParams::tax_configuration?, + tax_id: Orb::Models::CustomerUpdateParams::TaxID?, request_options: Orb::request_opts - ) -> Orb::Models::CustomerModel + ) -> Orb::Models::Customer def list: ( ?Orb::Models::CustomerListParams | ::Hash[Symbol, top] params - ) -> Orb::Page[Orb::Models::CustomerModel] + ) -> Orb::Page[Orb::Models::Customer] | ( created_at_gt: Time?, created_at_gte: Time?, @@ -72,7 +72,7 @@ module Orb cursor: String?, limit: Integer, request_options: Orb::request_opts - ) -> Orb::Page[Orb::Models::CustomerModel] + ) -> Orb::Page[Orb::Models::Customer] def delete: ( @@ -85,22 +85,22 @@ module Orb ( String customer_id, ?Orb::Models::CustomerFetchParams | ::Hash[Symbol, top] params - ) -> Orb::Models::CustomerModel + ) -> Orb::Models::Customer | ( String customer_id, request_options: Orb::request_opts - ) -> Orb::Models::CustomerModel + ) -> Orb::Models::Customer def fetch_by_external_id: ( String external_customer_id, ?Orb::Models::CustomerFetchByExternalIDParams | ::Hash[Symbol, top] params - ) -> Orb::Models::CustomerModel + ) -> Orb::Models::Customer | ( String external_customer_id, request_options: Orb::request_opts - ) -> Orb::Models::CustomerModel + ) -> Orb::Models::Customer def sync_payment_methods_from_gateway: ( @@ -126,28 +126,28 @@ module Orb String id, ?Orb::Models::CustomerUpdateByExternalIDParams | ::Hash[Symbol, top] params - ) -> Orb::Models::CustomerModel + ) -> Orb::Models::Customer | ( String id, - accounting_sync_configuration: Orb::Models::NewAccountingSyncConfigurationModel?, + accounting_sync_configuration: Orb::Models::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration?, additional_emails: ::Array[String]?, auto_collection: bool?, - billing_address: Orb::Models::AddressInputModel?, + billing_address: Orb::Models::CustomerUpdateByExternalIDParams::BillingAddress?, currency: String?, email: String?, email_delivery: bool?, external_customer_id: String?, - hierarchy: Orb::Models::CustomerHierarchyConfigModel?, + hierarchy: Orb::Models::CustomerUpdateByExternalIDParams::Hierarchy?, metadata: ::Hash[Symbol, String?]?, name: String?, - payment_provider: Orb::Models::EditCustomerModel::payment_provider?, + payment_provider: Orb::Models::CustomerUpdateByExternalIDParams::payment_provider?, payment_provider_id: String?, - reporting_configuration: Orb::Models::NewReportingConfigurationModel?, - shipping_address: Orb::Models::AddressInputModel?, - tax_configuration: Orb::Models::new_tax_configuration_model?, - tax_id: Orb::Models::CustomerTaxIDModel?, + reporting_configuration: Orb::Models::CustomerUpdateByExternalIDParams::ReportingConfiguration?, + shipping_address: Orb::Models::CustomerUpdateByExternalIDParams::ShippingAddress?, + tax_configuration: Orb::Models::CustomerUpdateByExternalIDParams::tax_configuration?, + tax_id: Orb::Models::CustomerUpdateByExternalIDParams::TaxID?, request_options: Orb::request_opts - ) -> Orb::Models::CustomerModel + ) -> Orb::Models::Customer def initialize: (client: Orb::Client) -> void end diff --git a/sig/orb/resources/customers/balance_transactions.rbs b/sig/orb/resources/customers/balance_transactions.rbs index 2ff81f53..85137425 100644 --- a/sig/orb/resources/customers/balance_transactions.rbs +++ b/sig/orb/resources/customers/balance_transactions.rbs @@ -7,21 +7,21 @@ module Orb String customer_id, Orb::Models::Customers::BalanceTransactionCreateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::CustomerBalanceTransactionModel + ) -> Orb::Models::Customers::BalanceTransactionCreateResponse | ( String customer_id, amount: String, type: Orb::Models::Customers::BalanceTransactionCreateParams::type_, description: String?, request_options: Orb::request_opts - ) -> Orb::Models::CustomerBalanceTransactionModel + ) -> Orb::Models::Customers::BalanceTransactionCreateResponse def list: ( String customer_id, ?Orb::Models::Customers::BalanceTransactionListParams | ::Hash[Symbol, top] params - ) -> Orb::Page[Orb::Models::CustomerBalanceTransactionModel] + ) -> Orb::Page[Orb::Models::Customers::BalanceTransactionListResponse] | ( String customer_id, cursor: String?, @@ -31,7 +31,7 @@ module Orb operation_time_lt: Time?, operation_time_lte: Time?, request_options: Orb::request_opts - ) -> Orb::Page[Orb::Models::CustomerBalanceTransactionModel] + ) -> Orb::Page[Orb::Models::Customers::BalanceTransactionListResponse] def initialize: (client: Orb::Client) -> void end diff --git a/sig/orb/resources/customers/costs.rbs b/sig/orb/resources/customers/costs.rbs index f50dda92..4242762a 100644 --- a/sig/orb/resources/customers/costs.rbs +++ b/sig/orb/resources/customers/costs.rbs @@ -6,7 +6,7 @@ module Orb ( String customer_id, ?Orb::Models::Customers::CostListParams | ::Hash[Symbol, top] params - ) -> Orb::Models::CustomerCostsModel + ) -> Orb::Models::Customers::CostListResponse | ( String customer_id, currency: String?, @@ -14,14 +14,14 @@ module Orb timeframe_start: Time?, view_mode: Orb::Models::Customers::CostListParams::view_mode?, request_options: Orb::request_opts - ) -> Orb::Models::CustomerCostsModel + ) -> Orb::Models::Customers::CostListResponse def list_by_external_id: ( String external_customer_id, ?Orb::Models::Customers::CostListByExternalIDParams | ::Hash[Symbol, top] params - ) -> Orb::Models::CustomerCostsModel + ) -> Orb::Models::Customers::CostListByExternalIDResponse | ( String external_customer_id, currency: String?, @@ -29,7 +29,7 @@ module Orb timeframe_start: Time?, view_mode: Orb::Models::Customers::CostListByExternalIDParams::view_mode?, request_options: Orb::request_opts - ) -> Orb::Models::CustomerCostsModel + ) -> Orb::Models::Customers::CostListByExternalIDResponse def initialize: (client: Orb::Client) -> void end diff --git a/sig/orb/resources/customers/credits.rbs b/sig/orb/resources/customers/credits.rbs index aecab1a1..db420ffd 100644 --- a/sig/orb/resources/customers/credits.rbs +++ b/sig/orb/resources/customers/credits.rbs @@ -11,7 +11,7 @@ module Orb String customer_id, ?Orb::Models::Customers::CreditListParams | ::Hash[Symbol, top] params - ) -> Orb::Page[Orb::Models::CustomerCreditBalancesModel::Data] + ) -> Orb::Page[Orb::Models::Customers::CreditListResponse] | ( String customer_id, currency: String?, @@ -19,14 +19,14 @@ module Orb include_all_blocks: bool, limit: Integer, request_options: Orb::request_opts - ) -> Orb::Page[Orb::Models::CustomerCreditBalancesModel::Data] + ) -> Orb::Page[Orb::Models::Customers::CreditListResponse] def list_by_external_id: ( String external_customer_id, ?Orb::Models::Customers::CreditListByExternalIDParams | ::Hash[Symbol, top] params - ) -> Orb::Page[Orb::Models::CustomerCreditBalancesModel::Data] + ) -> Orb::Page[Orb::Models::Customers::CreditListByExternalIDResponse] | ( String external_customer_id, currency: String?, @@ -34,7 +34,7 @@ module Orb include_all_blocks: bool, limit: Integer, request_options: Orb::request_opts - ) -> Orb::Page[Orb::Models::CustomerCreditBalancesModel::Data] + ) -> Orb::Page[Orb::Models::Customers::CreditListByExternalIDResponse] def initialize: (client: Orb::Client) -> void end diff --git a/sig/orb/resources/customers/credits/ledger.rbs b/sig/orb/resources/customers/credits/ledger.rbs index 82b5959d..5a8497af 100644 --- a/sig/orb/resources/customers/credits/ledger.rbs +++ b/sig/orb/resources/customers/credits/ledger.rbs @@ -8,7 +8,7 @@ module Orb String customer_id, ?Orb::Models::Customers::Credits::LedgerListParams | ::Hash[Symbol, top] params - ) -> Orb::Page[Orb::Models::credit_ledger_entry_model] + ) -> Orb::Page[Orb::Models::Customers::Credits::ledger_list_response] | ( String customer_id, created_at_gt: Time?, @@ -22,38 +22,38 @@ module Orb limit: Integer, minimum_amount: String?, request_options: Orb::request_opts - ) -> Orb::Page[Orb::Models::credit_ledger_entry_model] + ) -> Orb::Page[Orb::Models::Customers::Credits::ledger_list_response] def create_entry: ( String customer_id, Orb::Models::Customers::Credits::LedgerCreateEntryParams | ::Hash[Symbol, top] params - ) -> Orb::Models::credit_ledger_entry_model + ) -> Orb::Models::Customers::Credits::ledger_create_entry_response | ( String customer_id, add_credit_ledger_entry_request: Orb::Models::AddCreditLedgerEntryRequest, request_options: Orb::request_opts - ) -> Orb::Models::credit_ledger_entry_model + ) -> Orb::Models::Customers::Credits::ledger_create_entry_response def create_entry_by_external_id: ( String external_customer_id, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams | ::Hash[Symbol, top] params - ) -> Orb::Models::credit_ledger_entry_model + ) -> Orb::Models::Customers::Credits::ledger_create_entry_by_external_id_response | ( String external_customer_id, add_credit_ledger_entry_request: Orb::Models::AddCreditLedgerEntryRequest, request_options: Orb::request_opts - ) -> Orb::Models::credit_ledger_entry_model + ) -> Orb::Models::Customers::Credits::ledger_create_entry_by_external_id_response def list_by_external_id: ( String external_customer_id, ?Orb::Models::Customers::Credits::LedgerListByExternalIDParams | ::Hash[Symbol, top] params - ) -> Orb::Page[Orb::Models::credit_ledger_entry_model] + ) -> Orb::Page[Orb::Models::Customers::Credits::ledger_list_by_external_id_response] | ( String external_customer_id, created_at_gt: Time?, @@ -67,7 +67,7 @@ module Orb limit: Integer, minimum_amount: String?, request_options: Orb::request_opts - ) -> Orb::Page[Orb::Models::credit_ledger_entry_model] + ) -> Orb::Page[Orb::Models::Customers::Credits::ledger_list_by_external_id_response] def initialize: (client: Orb::Client) -> void end diff --git a/sig/orb/resources/customers/credits/top_ups.rbs b/sig/orb/resources/customers/credits/top_ups.rbs index 52a1eaaa..184d4650 100644 --- a/sig/orb/resources/customers/credits/top_ups.rbs +++ b/sig/orb/resources/customers/credits/top_ups.rbs @@ -8,7 +8,7 @@ module Orb String customer_id, Orb::Models::Customers::Credits::TopUpCreateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::TopUpModel + ) -> Orb::Models::Customers::Credits::TopUpCreateResponse | ( String customer_id, amount: String, @@ -20,20 +20,20 @@ module Orb expires_after: Integer?, expires_after_unit: Orb::Models::Customers::Credits::AddCreditTopUpRequest::expires_after_unit?, request_options: Orb::request_opts - ) -> Orb::Models::TopUpModel + ) -> Orb::Models::Customers::Credits::TopUpCreateResponse def list: ( String customer_id, ?Orb::Models::Customers::Credits::TopUpListParams | ::Hash[Symbol, top] params - ) -> Orb::Page[Orb::Models::TopUpModel] + ) -> Orb::Page[Orb::Models::Customers::Credits::TopUpListResponse] | ( String customer_id, cursor: String?, limit: Integer, request_options: Orb::request_opts - ) -> Orb::Page[Orb::Models::TopUpModel] + ) -> Orb::Page[Orb::Models::Customers::Credits::TopUpListResponse] def delete: ( @@ -52,7 +52,7 @@ module Orb String external_customer_id, Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams | ::Hash[Symbol, top] params - ) -> Orb::Models::TopUpModel + ) -> Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse | ( String external_customer_id, amount: String, @@ -64,7 +64,7 @@ module Orb expires_after: Integer?, expires_after_unit: Orb::Models::Customers::Credits::AddCreditTopUpRequest::expires_after_unit?, request_options: Orb::request_opts - ) -> Orb::Models::TopUpModel + ) -> Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse def delete_by_external_id: ( @@ -83,13 +83,13 @@ module Orb String external_customer_id, ?Orb::Models::Customers::Credits::TopUpListByExternalIDParams | ::Hash[Symbol, top] params - ) -> Orb::Page[Orb::Models::TopUpModel] + ) -> Orb::Page[Orb::Models::Customers::Credits::TopUpListByExternalIDResponse] | ( String external_customer_id, cursor: String?, limit: Integer, request_options: Orb::request_opts - ) -> Orb::Page[Orb::Models::TopUpModel] + ) -> Orb::Page[Orb::Models::Customers::Credits::TopUpListByExternalIDResponse] def initialize: (client: Orb::Client) -> void end diff --git a/sig/orb/resources/dimensional_price_groups.rbs b/sig/orb/resources/dimensional_price_groups.rbs index faf02a4e..f797dda3 100644 --- a/sig/orb/resources/dimensional_price_groups.rbs +++ b/sig/orb/resources/dimensional_price_groups.rbs @@ -7,7 +7,7 @@ module Orb ( Orb::Models::DimensionalPriceGroupCreateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::DimensionalPriceGroupModel + ) -> Orb::Models::DimensionalPriceGroup | ( billable_metric_id: String, dimensions: ::Array[String], @@ -15,29 +15,29 @@ module Orb external_dimensional_price_group_id: String?, metadata: ::Hash[Symbol, String?]?, request_options: Orb::request_opts - ) -> Orb::Models::DimensionalPriceGroupModel + ) -> Orb::Models::DimensionalPriceGroup def retrieve: ( String dimensional_price_group_id, ?Orb::Models::DimensionalPriceGroupRetrieveParams | ::Hash[Symbol, top] params - ) -> Orb::Models::DimensionalPriceGroupModel + ) -> Orb::Models::DimensionalPriceGroup | ( String dimensional_price_group_id, request_options: Orb::request_opts - ) -> Orb::Models::DimensionalPriceGroupModel + ) -> Orb::Models::DimensionalPriceGroup def list: ( ?Orb::Models::DimensionalPriceGroupListParams | ::Hash[Symbol, top] params - ) -> Orb::Page[Orb::Models::DimensionalPriceGroupModel] + ) -> Orb::Page[Orb::Models::DimensionalPriceGroup] | ( cursor: String?, limit: Integer, request_options: Orb::request_opts - ) -> Orb::Page[Orb::Models::DimensionalPriceGroupModel] + ) -> Orb::Page[Orb::Models::DimensionalPriceGroup] def initialize: (client: Orb::Client) -> void end diff --git a/sig/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbs b/sig/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbs index 571ba2ce..3fc65c2d 100644 --- a/sig/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbs +++ b/sig/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbs @@ -7,11 +7,11 @@ module Orb String external_dimensional_price_group_id, ?Orb::Models::DimensionalPriceGroups::ExternalDimensionalPriceGroupIDRetrieveParams | ::Hash[Symbol, top] params - ) -> Orb::Models::DimensionalPriceGroupModel + ) -> Orb::Models::DimensionalPriceGroup | ( String external_dimensional_price_group_id, request_options: Orb::request_opts - ) -> Orb::Models::DimensionalPriceGroupModel + ) -> Orb::Models::DimensionalPriceGroup def initialize: (client: Orb::Client) -> void end diff --git a/sig/orb/resources/events/backfills.rbs b/sig/orb/resources/events/backfills.rbs index 574c139b..f6981101 100644 --- a/sig/orb/resources/events/backfills.rbs +++ b/sig/orb/resources/events/backfills.rbs @@ -6,7 +6,7 @@ module Orb ( Orb::Models::Events::BackfillCreateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::BackfillModel + ) -> Orb::Models::Events::BackfillCreateResponse | ( timeframe_end: Time, timeframe_start: Time, @@ -16,51 +16,51 @@ module Orb external_customer_id: String?, replace_existing_events: bool, request_options: Orb::request_opts - ) -> Orb::Models::BackfillModel + ) -> Orb::Models::Events::BackfillCreateResponse def list: ( ?Orb::Models::Events::BackfillListParams | ::Hash[Symbol, top] params - ) -> Orb::Page[Orb::Models::BackfillModel] + ) -> Orb::Page[Orb::Models::Events::BackfillListResponse] | ( cursor: String?, limit: Integer, request_options: Orb::request_opts - ) -> Orb::Page[Orb::Models::BackfillModel] + ) -> Orb::Page[Orb::Models::Events::BackfillListResponse] def close: ( String backfill_id, ?Orb::Models::Events::BackfillCloseParams | ::Hash[Symbol, top] params - ) -> Orb::Models::BackfillModel + ) -> Orb::Models::Events::BackfillCloseResponse | ( String backfill_id, request_options: Orb::request_opts - ) -> Orb::Models::BackfillModel + ) -> Orb::Models::Events::BackfillCloseResponse def fetch: ( String backfill_id, ?Orb::Models::Events::BackfillFetchParams | ::Hash[Symbol, top] params - ) -> Orb::Models::BackfillModel + ) -> Orb::Models::Events::BackfillFetchResponse | ( String backfill_id, request_options: Orb::request_opts - ) -> Orb::Models::BackfillModel + ) -> Orb::Models::Events::BackfillFetchResponse def revert: ( String backfill_id, ?Orb::Models::Events::BackfillRevertParams | ::Hash[Symbol, top] params - ) -> Orb::Models::BackfillModel + ) -> Orb::Models::Events::BackfillRevertResponse | ( String backfill_id, request_options: Orb::request_opts - ) -> Orb::Models::BackfillModel + ) -> Orb::Models::Events::BackfillRevertResponse def initialize: (client: Orb::Client) -> void end diff --git a/sig/orb/resources/invoice_line_items.rbs b/sig/orb/resources/invoice_line_items.rbs index 45e37d1f..eb30a766 100644 --- a/sig/orb/resources/invoice_line_items.rbs +++ b/sig/orb/resources/invoice_line_items.rbs @@ -4,7 +4,7 @@ module Orb def create: ( Orb::Models::InvoiceLineItemCreateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::InvoiceLineItemModel + ) -> Orb::Models::InvoiceLineItemCreateResponse | ( amount: String, end_date: Date, @@ -13,7 +13,7 @@ module Orb quantity: Float, start_date: Date, request_options: Orb::request_opts - ) -> Orb::Models::InvoiceLineItemModel + ) -> Orb::Models::InvoiceLineItemCreateResponse def initialize: (client: Orb::Client) -> void end diff --git a/sig/orb/resources/invoices.rbs b/sig/orb/resources/invoices.rbs index 5bbf9184..8bb2b29a 100644 --- a/sig/orb/resources/invoices.rbs +++ b/sig/orb/resources/invoices.rbs @@ -4,7 +4,7 @@ module Orb def create: ( Orb::Models::InvoiceCreateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::InvoiceModel + ) -> Orb::Models::Invoice | ( currency: String, invoice_date: Time, @@ -17,23 +17,23 @@ module Orb metadata: ::Hash[Symbol, String?]?, will_auto_issue: bool, request_options: Orb::request_opts - ) -> Orb::Models::InvoiceModel + ) -> Orb::Models::Invoice def update: ( String invoice_id, ?Orb::Models::InvoiceUpdateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::InvoiceModel + ) -> Orb::Models::Invoice | ( String invoice_id, metadata: ::Hash[Symbol, String?]?, request_options: Orb::request_opts - ) -> Orb::Models::InvoiceModel + ) -> Orb::Models::Invoice def list: ( ?Orb::Models::InvoiceListParams | ::Hash[Symbol, top] params - ) -> Orb::Page[Orb::Models::InvoiceModel] + ) -> Orb::Page[Orb::Models::Invoice] | ( amount: String?, amount_gt: String?, @@ -55,17 +55,17 @@ module Orb status: ::Array[Orb::Models::InvoiceListParams::status]?, subscription_id: String?, request_options: Orb::request_opts - ) -> Orb::Page[Orb::Models::InvoiceModel] + ) -> Orb::Page[Orb::Models::Invoice] def fetch: ( String invoice_id, ?Orb::Models::InvoiceFetchParams | ::Hash[Symbol, top] params - ) -> Orb::Models::InvoiceModel + ) -> Orb::Models::Invoice | ( String invoice_id, request_options: Orb::request_opts - ) -> Orb::Models::InvoiceModel + ) -> Orb::Models::Invoice def fetch_upcoming: ( @@ -80,45 +80,45 @@ module Orb ( String invoice_id, ?Orb::Models::InvoiceIssueParams | ::Hash[Symbol, top] params - ) -> Orb::Models::InvoiceModel + ) -> Orb::Models::Invoice | ( String invoice_id, synchronous: bool, request_options: Orb::request_opts - ) -> Orb::Models::InvoiceModel + ) -> Orb::Models::Invoice def mark_paid: ( String invoice_id, Orb::Models::InvoiceMarkPaidParams | ::Hash[Symbol, top] params - ) -> Orb::Models::InvoiceModel + ) -> Orb::Models::Invoice | ( String invoice_id, payment_received_date: Date, external_id: String?, notes: String?, request_options: Orb::request_opts - ) -> Orb::Models::InvoiceModel + ) -> Orb::Models::Invoice def pay: ( String invoice_id, ?Orb::Models::InvoicePayParams | ::Hash[Symbol, top] params - ) -> Orb::Models::InvoiceModel + ) -> Orb::Models::Invoice | ( String invoice_id, request_options: Orb::request_opts - ) -> Orb::Models::InvoiceModel + ) -> Orb::Models::Invoice def `void`: ( String invoice_id, ?Orb::Models::InvoiceVoidParams | ::Hash[Symbol, top] params - ) -> Orb::Models::InvoiceModel + ) -> Orb::Models::Invoice | ( String invoice_id, request_options: Orb::request_opts - ) -> Orb::Models::InvoiceModel + ) -> Orb::Models::Invoice def initialize: (client: Orb::Client) -> void end diff --git a/sig/orb/resources/items.rbs b/sig/orb/resources/items.rbs index 377d2a11..9639ee71 100644 --- a/sig/orb/resources/items.rbs +++ b/sig/orb/resources/items.rbs @@ -4,43 +4,43 @@ module Orb def create: ( Orb::Models::ItemCreateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::ItemModel + ) -> Orb::Models::Item | ( name: String, request_options: Orb::request_opts - ) -> Orb::Models::ItemModel + ) -> Orb::Models::Item def update: ( String item_id, ?Orb::Models::ItemUpdateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::ItemModel + ) -> Orb::Models::Item | ( String item_id, - external_connections: ::Array[Orb::Models::ItemExternalConnectionModel]?, + external_connections: ::Array[Orb::Models::ItemUpdateParams::ExternalConnection]?, name: String?, request_options: Orb::request_opts - ) -> Orb::Models::ItemModel + ) -> Orb::Models::Item def list: ( ?Orb::Models::ItemListParams | ::Hash[Symbol, top] params - ) -> Orb::Page[Orb::Models::ItemModel] + ) -> Orb::Page[Orb::Models::Item] | ( cursor: String?, limit: Integer, request_options: Orb::request_opts - ) -> Orb::Page[Orb::Models::ItemModel] + ) -> Orb::Page[Orb::Models::Item] def fetch: ( String item_id, ?Orb::Models::ItemFetchParams | ::Hash[Symbol, top] params - ) -> Orb::Models::ItemModel + ) -> Orb::Models::Item | ( String item_id, request_options: Orb::request_opts - ) -> Orb::Models::ItemModel + ) -> Orb::Models::Item def initialize: (client: Orb::Client) -> void end diff --git a/sig/orb/resources/metrics.rbs b/sig/orb/resources/metrics.rbs index a696cf47..2054c10d 100644 --- a/sig/orb/resources/metrics.rbs +++ b/sig/orb/resources/metrics.rbs @@ -4,7 +4,7 @@ module Orb def create: ( Orb::Models::MetricCreateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::BillableMetricModel + ) -> Orb::Models::BillableMetric | ( description: String?, item_id: String, @@ -12,23 +12,23 @@ module Orb sql: String, metadata: ::Hash[Symbol, String?]?, request_options: Orb::request_opts - ) -> Orb::Models::BillableMetricModel + ) -> Orb::Models::BillableMetric def update: ( String metric_id, ?Orb::Models::MetricUpdateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::BillableMetricModel + ) -> Orb::Models::BillableMetric | ( String metric_id, metadata: ::Hash[Symbol, String?]?, request_options: Orb::request_opts - ) -> Orb::Models::BillableMetricModel + ) -> Orb::Models::BillableMetric def list: ( ?Orb::Models::MetricListParams | ::Hash[Symbol, top] params - ) -> Orb::Page[Orb::Models::BillableMetricModel] + ) -> Orb::Page[Orb::Models::BillableMetric] | ( created_at_gt: Time?, created_at_gte: Time?, @@ -37,17 +37,17 @@ module Orb cursor: String?, limit: Integer, request_options: Orb::request_opts - ) -> Orb::Page[Orb::Models::BillableMetricModel] + ) -> Orb::Page[Orb::Models::BillableMetric] def fetch: ( String metric_id, ?Orb::Models::MetricFetchParams | ::Hash[Symbol, top] params - ) -> Orb::Models::BillableMetricModel + ) -> Orb::Models::BillableMetric | ( String metric_id, request_options: Orb::request_opts - ) -> Orb::Models::BillableMetricModel + ) -> Orb::Models::BillableMetric def initialize: (client: Orb::Client) -> void end diff --git a/sig/orb/resources/plans.rbs b/sig/orb/resources/plans.rbs index 8bca189a..c694f1f9 100644 --- a/sig/orb/resources/plans.rbs +++ b/sig/orb/resources/plans.rbs @@ -6,7 +6,7 @@ module Orb def create: ( Orb::Models::PlanCreateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::PlanModel + ) -> Orb::Models::Plan | ( currency: String, name: String, @@ -17,24 +17,24 @@ module Orb net_terms: Integer?, status: Orb::Models::PlanCreateParams::status, request_options: Orb::request_opts - ) -> Orb::Models::PlanModel + ) -> Orb::Models::Plan def update: ( String plan_id, ?Orb::Models::PlanUpdateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::PlanModel + ) -> Orb::Models::Plan | ( String plan_id, external_plan_id: String?, metadata: ::Hash[Symbol, String?]?, request_options: Orb::request_opts - ) -> Orb::Models::PlanModel + ) -> Orb::Models::Plan def list: ( ?Orb::Models::PlanListParams | ::Hash[Symbol, top] params - ) -> Orb::Page[Orb::Models::PlanModel] + ) -> Orb::Page[Orb::Models::Plan] | ( created_at_gt: Time?, created_at_gte: Time?, @@ -44,17 +44,17 @@ module Orb limit: Integer, status: Orb::Models::PlanListParams::status, request_options: Orb::request_opts - ) -> Orb::Page[Orb::Models::PlanModel] + ) -> Orb::Page[Orb::Models::Plan] def fetch: ( String plan_id, ?Orb::Models::PlanFetchParams | ::Hash[Symbol, top] params - ) -> Orb::Models::PlanModel + ) -> Orb::Models::Plan | ( String plan_id, request_options: Orb::request_opts - ) -> Orb::Models::PlanModel + ) -> Orb::Models::Plan def initialize: (client: Orb::Client) -> void end diff --git a/sig/orb/resources/plans/external_plan_id.rbs b/sig/orb/resources/plans/external_plan_id.rbs index ae9c8ff0..c292afc1 100644 --- a/sig/orb/resources/plans/external_plan_id.rbs +++ b/sig/orb/resources/plans/external_plan_id.rbs @@ -7,24 +7,24 @@ module Orb String other_external_plan_id, ?Orb::Models::Plans::ExternalPlanIDUpdateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::PlanModel + ) -> Orb::Models::Plan | ( String other_external_plan_id, external_plan_id: String?, metadata: ::Hash[Symbol, String?]?, request_options: Orb::request_opts - ) -> Orb::Models::PlanModel + ) -> Orb::Models::Plan def fetch: ( String external_plan_id, ?Orb::Models::Plans::ExternalPlanIDFetchParams | ::Hash[Symbol, top] params - ) -> Orb::Models::PlanModel + ) -> Orb::Models::Plan | ( String external_plan_id, request_options: Orb::request_opts - ) -> Orb::Models::PlanModel + ) -> Orb::Models::Plan def initialize: (client: Orb::Client) -> void end diff --git a/sig/orb/resources/prices.rbs b/sig/orb/resources/prices.rbs index 2b7a68e1..0ef3b212 100644 --- a/sig/orb/resources/prices.rbs +++ b/sig/orb/resources/prices.rbs @@ -6,32 +6,73 @@ module Orb def create: ( Orb::Models::PriceCreateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::price_model + ) -> Orb::Models::price | ( - new_floating_price_model: Orb::Models::NewFloatingPriceModel, + cadence: Orb::Models::PriceCreateParams::cadence, + currency: String, + item_id: String, + model_type: Orb::Models::PriceCreateParams::model_type, + name: String, + unit_config: Orb::Models::PriceCreateParams::UnitConfig, + package_config: Orb::Models::PriceCreateParams::PackageConfig, + matrix_config: Orb::Models::PriceCreateParams::MatrixConfig, + matrix_with_allocation_config: Orb::Models::PriceCreateParams::MatrixWithAllocationConfig, + tiered_config: Orb::Models::PriceCreateParams::TieredConfig, + tiered_bps_config: Orb::Models::PriceCreateParams::TieredBpsConfig, + bps_config: Orb::Models::PriceCreateParams::BpsConfig, + bulk_bps_config: Orb::Models::PriceCreateParams::BulkBpsConfig, + bulk_config: Orb::Models::PriceCreateParams::BulkConfig, + threshold_total_amount_config: ::Hash[Symbol, top], + tiered_package_config: ::Hash[Symbol, top], + grouped_tiered_config: ::Hash[Symbol, top], + max_group_tiered_package_config: ::Hash[Symbol, top], + tiered_with_minimum_config: ::Hash[Symbol, top], + package_with_allocation_config: ::Hash[Symbol, top], + tiered_package_with_minimum_config: ::Hash[Symbol, top], + unit_with_percent_config: ::Hash[Symbol, top], + tiered_with_proration_config: ::Hash[Symbol, top], + unit_with_proration_config: ::Hash[Symbol, top], + grouped_allocation_config: ::Hash[Symbol, top], + grouped_with_prorated_minimum_config: ::Hash[Symbol, top], + grouped_with_metered_minimum_config: ::Hash[Symbol, top], + matrix_with_display_name_config: ::Hash[Symbol, top], + bulk_with_proration_config: ::Hash[Symbol, top], + grouped_tiered_package_config: ::Hash[Symbol, top], + scalable_matrix_with_unit_pricing_config: ::Hash[Symbol, top], + scalable_matrix_with_tiered_pricing_config: ::Hash[Symbol, top], + cumulative_grouped_bulk_config: ::Hash[Symbol, top], + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::Models::PriceCreateParams::BillingCycleConfiguration?, + conversion_rate: Float?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::Models::PriceCreateParams::InvoicingCycleConfiguration?, + metadata: ::Hash[Symbol, String?]?, request_options: Orb::request_opts - ) -> Orb::Models::price_model + ) -> Orb::Models::price def update: ( String price_id, ?Orb::Models::PriceUpdateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::price_model + ) -> Orb::Models::price | ( String price_id, metadata: ::Hash[Symbol, String?]?, request_options: Orb::request_opts - ) -> Orb::Models::price_model + ) -> Orb::Models::price def list: ( ?Orb::Models::PriceListParams | ::Hash[Symbol, top] params - ) -> Orb::Page[Orb::Models::price_model] + ) -> Orb::Page[Orb::Models::price] | ( cursor: String?, limit: Integer, request_options: Orb::request_opts - ) -> Orb::Page[Orb::Models::price_model] + ) -> Orb::Page[Orb::Models::price] def evaluate: ( @@ -53,11 +94,11 @@ module Orb ( String price_id, ?Orb::Models::PriceFetchParams | ::Hash[Symbol, top] params - ) -> Orb::Models::price_model + ) -> Orb::Models::price | ( String price_id, request_options: Orb::request_opts - ) -> Orb::Models::price_model + ) -> Orb::Models::price def initialize: (client: Orb::Client) -> void end diff --git a/sig/orb/resources/prices/external_price_id.rbs b/sig/orb/resources/prices/external_price_id.rbs index 9d876aa4..d09e564e 100644 --- a/sig/orb/resources/prices/external_price_id.rbs +++ b/sig/orb/resources/prices/external_price_id.rbs @@ -7,23 +7,23 @@ module Orb String external_price_id, ?Orb::Models::Prices::ExternalPriceIDUpdateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::price_model + ) -> Orb::Models::price | ( String external_price_id, metadata: ::Hash[Symbol, String?]?, request_options: Orb::request_opts - ) -> Orb::Models::price_model + ) -> Orb::Models::price def fetch: ( String external_price_id, ?Orb::Models::Prices::ExternalPriceIDFetchParams | ::Hash[Symbol, top] params - ) -> Orb::Models::price_model + ) -> Orb::Models::price | ( String external_price_id, request_options: Orb::request_opts - ) -> Orb::Models::price_model + ) -> Orb::Models::price def initialize: (client: Orb::Client) -> void end diff --git a/sig/orb/resources/subscriptions.rbs b/sig/orb/resources/subscriptions.rbs index 6f2ec9ae..8dff59e9 100644 --- a/sig/orb/resources/subscriptions.rbs +++ b/sig/orb/resources/subscriptions.rbs @@ -4,14 +4,14 @@ module Orb def create: ( ?Orb::Models::SubscriptionCreateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::MutatedSubscriptionModel + ) -> Orb::Models::SubscriptionCreateResponse | ( add_adjustments: ::Array[Orb::Models::AddSubscriptionAdjustmentParams]?, add_prices: ::Array[Orb::Models::AddSubscriptionPriceParams]?, align_billing_with_subscription_start_date: bool, auto_collection: bool?, aws_region: String?, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionCreateParams::BillingCycleAnchorConfiguration?, coupon_redemption_code: String?, credits_overage_rate: Float?, customer_id: String?, @@ -38,13 +38,13 @@ module Orb trial_duration_days: Integer?, usage_customer_ids: ::Array[String]?, request_options: Orb::request_opts - ) -> Orb::Models::MutatedSubscriptionModel + ) -> Orb::Models::SubscriptionCreateResponse def update: ( String subscription_id, ?Orb::Models::SubscriptionUpdateParams | ::Hash[Symbol, top] params - ) -> Orb::Models::SubscriptionModel + ) -> Orb::Models::Subscription | ( String subscription_id, auto_collection: bool?, @@ -53,12 +53,12 @@ module Orb metadata: ::Hash[Symbol, String?]?, net_terms: Integer?, request_options: Orb::request_opts - ) -> Orb::Models::SubscriptionModel + ) -> Orb::Models::Subscription def list: ( ?Orb::Models::SubscriptionListParams | ::Hash[Symbol, top] params - ) -> Orb::Page[Orb::Models::SubscriptionModel] + ) -> Orb::Page[Orb::Models::Subscription] | ( created_at_gt: Time?, created_at_gte: Time?, @@ -70,30 +70,30 @@ module Orb limit: Integer, status: Orb::Models::SubscriptionListParams::status?, request_options: Orb::request_opts - ) -> Orb::Page[Orb::Models::SubscriptionModel] + ) -> Orb::Page[Orb::Models::Subscription] def cancel: ( String subscription_id, Orb::Models::SubscriptionCancelParams | ::Hash[Symbol, top] params - ) -> Orb::Models::MutatedSubscriptionModel + ) -> Orb::Models::SubscriptionCancelResponse | ( String subscription_id, cancel_option: Orb::Models::SubscriptionCancelParams::cancel_option, allow_invoice_credit_or_void: bool?, cancellation_date: Time?, request_options: Orb::request_opts - ) -> Orb::Models::MutatedSubscriptionModel + ) -> Orb::Models::SubscriptionCancelResponse def fetch: ( String subscription_id, ?Orb::Models::SubscriptionFetchParams | ::Hash[Symbol, top] params - ) -> Orb::Models::SubscriptionModel + ) -> Orb::Models::Subscription | ( String subscription_id, request_options: Orb::request_opts - ) -> Orb::Models::SubscriptionModel + ) -> Orb::Models::Subscription def fetch_costs: ( @@ -153,7 +153,7 @@ module Orb String subscription_id, ?Orb::Models::SubscriptionPriceIntervalsParams | ::Hash[Symbol, top] params - ) -> Orb::Models::MutatedSubscriptionModel + ) -> Orb::Models::SubscriptionPriceIntervalsResponse | ( String subscription_id, add: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add], @@ -162,14 +162,14 @@ module Orb edit: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Edit], edit_adjustments: ::Array[Orb::Models::SubscriptionPriceIntervalsParams::EditAdjustment], request_options: Orb::request_opts - ) -> Orb::Models::MutatedSubscriptionModel + ) -> Orb::Models::SubscriptionPriceIntervalsResponse def schedule_plan_change: ( String subscription_id, Orb::Models::SubscriptionSchedulePlanChangeParams | ::Hash[Symbol, top] params - ) -> Orb::Models::MutatedSubscriptionModel + ) -> Orb::Models::SubscriptionSchedulePlanChangeResponse | ( String subscription_id, change_option: Orb::Models::SubscriptionSchedulePlanChangeParams::change_option, @@ -178,7 +178,7 @@ module Orb align_billing_with_plan_change_date: bool?, auto_collection: bool?, billing_cycle_alignment: Orb::Models::SubscriptionSchedulePlanChangeParams::billing_cycle_alignment?, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel?, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionSchedulePlanChangeParams::BillingCycleAnchorConfiguration?, change_date: Time?, coupon_redemption_code: String?, credits_overage_rate: Float?, @@ -199,61 +199,61 @@ module Orb trial_duration_days: Integer?, usage_customer_ids: ::Array[String]?, request_options: Orb::request_opts - ) -> Orb::Models::MutatedSubscriptionModel + ) -> Orb::Models::SubscriptionSchedulePlanChangeResponse def trigger_phase: ( String subscription_id, ?Orb::Models::SubscriptionTriggerPhaseParams | ::Hash[Symbol, top] params - ) -> Orb::Models::MutatedSubscriptionModel + ) -> Orb::Models::SubscriptionTriggerPhaseResponse | ( String subscription_id, allow_invoice_credit_or_void: bool?, effective_date: Date?, request_options: Orb::request_opts - ) -> Orb::Models::MutatedSubscriptionModel + ) -> Orb::Models::SubscriptionTriggerPhaseResponse def unschedule_cancellation: ( String subscription_id, ?Orb::Models::SubscriptionUnscheduleCancellationParams | ::Hash[Symbol, top] params - ) -> Orb::Models::MutatedSubscriptionModel + ) -> Orb::Models::SubscriptionUnscheduleCancellationResponse | ( String subscription_id, request_options: Orb::request_opts - ) -> Orb::Models::MutatedSubscriptionModel + ) -> Orb::Models::SubscriptionUnscheduleCancellationResponse def unschedule_fixed_fee_quantity_updates: ( String subscription_id, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesParams | ::Hash[Symbol, top] params - ) -> Orb::Models::MutatedSubscriptionModel + ) -> Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse | ( String subscription_id, price_id: String, request_options: Orb::request_opts - ) -> Orb::Models::MutatedSubscriptionModel + ) -> Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse def unschedule_pending_plan_changes: ( String subscription_id, ?Orb::Models::SubscriptionUnschedulePendingPlanChangesParams | ::Hash[Symbol, top] params - ) -> Orb::Models::MutatedSubscriptionModel + ) -> Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse | ( String subscription_id, request_options: Orb::request_opts - ) -> Orb::Models::MutatedSubscriptionModel + ) -> Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse def update_fixed_fee_quantity: ( String subscription_id, Orb::Models::SubscriptionUpdateFixedFeeQuantityParams | ::Hash[Symbol, top] params - ) -> Orb::Models::MutatedSubscriptionModel + ) -> Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse | ( String subscription_id, price_id: String, @@ -262,20 +262,20 @@ module Orb change_option: Orb::Models::SubscriptionUpdateFixedFeeQuantityParams::change_option, effective_date: Date?, request_options: Orb::request_opts - ) -> Orb::Models::MutatedSubscriptionModel + ) -> Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse def update_trial: ( String subscription_id, Orb::Models::SubscriptionUpdateTrialParams | ::Hash[Symbol, top] params - ) -> Orb::Models::MutatedSubscriptionModel + ) -> Orb::Models::SubscriptionUpdateTrialResponse | ( String subscription_id, trial_end_date: Orb::Models::SubscriptionUpdateTrialParams::trial_end_date, shift: bool, request_options: Orb::request_opts - ) -> Orb::Models::MutatedSubscriptionModel + ) -> Orb::Models::SubscriptionUpdateTrialResponse def initialize: (client: Orb::Client) -> void end diff --git a/test/orb/resources/alerts_test.rb b/test/orb/resources/alerts_test.rb index 3c5baee4..acb95bf4 100644 --- a/test/orb/resources/alerts_test.rb +++ b/test/orb/resources/alerts_test.rb @@ -7,7 +7,7 @@ def test_retrieve response = @orb.alerts.retrieve("alert_id") assert_pattern do - response => Orb::Models::AlertModel + response => Orb::Models::Alert end assert_pattern do @@ -15,13 +15,13 @@ def test_retrieve id: String, created_at: Time, currency: String | nil, - customer: Orb::Models::CustomerMinifiedModel | nil, + customer: Orb::Models::Alert::Customer | nil, enabled: Orb::BooleanModel, - metric: Orb::Models::AlertModel::Metric | nil, - plan: Orb::Models::AlertModel::Plan | nil, - subscription: Orb::Models::SubscriptionMinifiedModel | nil, - thresholds: ^(Orb::ArrayOf[Orb::Models::ThresholdModel]) | nil, - type: Orb::Models::AlertModel::Type + metric: Orb::Models::Alert::Metric | nil, + plan: Orb::Models::Alert::Plan | nil, + subscription: Orb::Models::Alert::Subscription | nil, + thresholds: ^(Orb::ArrayOf[Orb::Models::Alert::Threshold]) | nil, + type: Orb::Models::Alert::Type } end end @@ -30,7 +30,7 @@ def test_update_required_params response = @orb.alerts.update("alert_configuration_id", thresholds: [{value: 0}]) assert_pattern do - response => Orb::Models::AlertModel + response => Orb::Models::Alert end assert_pattern do @@ -38,13 +38,13 @@ def test_update_required_params id: String, created_at: Time, currency: String | nil, - customer: Orb::Models::CustomerMinifiedModel | nil, + customer: Orb::Models::Alert::Customer | nil, enabled: Orb::BooleanModel, - metric: Orb::Models::AlertModel::Metric | nil, - plan: Orb::Models::AlertModel::Plan | nil, - subscription: Orb::Models::SubscriptionMinifiedModel | nil, - thresholds: ^(Orb::ArrayOf[Orb::Models::ThresholdModel]) | nil, - type: Orb::Models::AlertModel::Type + metric: Orb::Models::Alert::Metric | nil, + plan: Orb::Models::Alert::Plan | nil, + subscription: Orb::Models::Alert::Subscription | nil, + thresholds: ^(Orb::ArrayOf[Orb::Models::Alert::Threshold]) | nil, + type: Orb::Models::Alert::Type } end end @@ -65,7 +65,7 @@ def test_list row = response.to_enum.first assert_pattern do - row => Orb::Models::AlertModel + row => Orb::Models::Alert end assert_pattern do @@ -73,13 +73,13 @@ def test_list id: String, created_at: Time, currency: String | nil, - customer: Orb::Models::CustomerMinifiedModel | nil, + customer: Orb::Models::Alert::Customer | nil, enabled: Orb::BooleanModel, - metric: Orb::Models::AlertModel::Metric | nil, - plan: Orb::Models::AlertModel::Plan | nil, - subscription: Orb::Models::SubscriptionMinifiedModel | nil, - thresholds: ^(Orb::ArrayOf[Orb::Models::ThresholdModel]) | nil, - type: Orb::Models::AlertModel::Type + metric: Orb::Models::Alert::Metric | nil, + plan: Orb::Models::Alert::Plan | nil, + subscription: Orb::Models::Alert::Subscription | nil, + thresholds: ^(Orb::ArrayOf[Orb::Models::Alert::Threshold]) | nil, + type: Orb::Models::Alert::Type } end end @@ -88,7 +88,7 @@ def test_create_for_customer_required_params response = @orb.alerts.create_for_customer("customer_id", currency: "currency", type: :usage_exceeded) assert_pattern do - response => Orb::Models::AlertModel + response => Orb::Models::Alert end assert_pattern do @@ -96,13 +96,13 @@ def test_create_for_customer_required_params id: String, created_at: Time, currency: String | nil, - customer: Orb::Models::CustomerMinifiedModel | nil, + customer: Orb::Models::Alert::Customer | nil, enabled: Orb::BooleanModel, - metric: Orb::Models::AlertModel::Metric | nil, - plan: Orb::Models::AlertModel::Plan | nil, - subscription: Orb::Models::SubscriptionMinifiedModel | nil, - thresholds: ^(Orb::ArrayOf[Orb::Models::ThresholdModel]) | nil, - type: Orb::Models::AlertModel::Type + metric: Orb::Models::Alert::Metric | nil, + plan: Orb::Models::Alert::Plan | nil, + subscription: Orb::Models::Alert::Subscription | nil, + thresholds: ^(Orb::ArrayOf[Orb::Models::Alert::Threshold]) | nil, + type: Orb::Models::Alert::Type } end end @@ -115,7 +115,7 @@ def test_create_for_external_customer_required_params ) assert_pattern do - response => Orb::Models::AlertModel + response => Orb::Models::Alert end assert_pattern do @@ -123,13 +123,13 @@ def test_create_for_external_customer_required_params id: String, created_at: Time, currency: String | nil, - customer: Orb::Models::CustomerMinifiedModel | nil, + customer: Orb::Models::Alert::Customer | nil, enabled: Orb::BooleanModel, - metric: Orb::Models::AlertModel::Metric | nil, - plan: Orb::Models::AlertModel::Plan | nil, - subscription: Orb::Models::SubscriptionMinifiedModel | nil, - thresholds: ^(Orb::ArrayOf[Orb::Models::ThresholdModel]) | nil, - type: Orb::Models::AlertModel::Type + metric: Orb::Models::Alert::Metric | nil, + plan: Orb::Models::Alert::Plan | nil, + subscription: Orb::Models::Alert::Subscription | nil, + thresholds: ^(Orb::ArrayOf[Orb::Models::Alert::Threshold]) | nil, + type: Orb::Models::Alert::Type } end end @@ -142,7 +142,7 @@ def test_create_for_subscription_required_params ) assert_pattern do - response => Orb::Models::AlertModel + response => Orb::Models::Alert end assert_pattern do @@ -150,13 +150,13 @@ def test_create_for_subscription_required_params id: String, created_at: Time, currency: String | nil, - customer: Orb::Models::CustomerMinifiedModel | nil, + customer: Orb::Models::Alert::Customer | nil, enabled: Orb::BooleanModel, - metric: Orb::Models::AlertModel::Metric | nil, - plan: Orb::Models::AlertModel::Plan | nil, - subscription: Orb::Models::SubscriptionMinifiedModel | nil, - thresholds: ^(Orb::ArrayOf[Orb::Models::ThresholdModel]) | nil, - type: Orb::Models::AlertModel::Type + metric: Orb::Models::Alert::Metric | nil, + plan: Orb::Models::Alert::Plan | nil, + subscription: Orb::Models::Alert::Subscription | nil, + thresholds: ^(Orb::ArrayOf[Orb::Models::Alert::Threshold]) | nil, + type: Orb::Models::Alert::Type } end end @@ -165,7 +165,7 @@ def test_disable response = @orb.alerts.disable("alert_configuration_id") assert_pattern do - response => Orb::Models::AlertModel + response => Orb::Models::Alert end assert_pattern do @@ -173,13 +173,13 @@ def test_disable id: String, created_at: Time, currency: String | nil, - customer: Orb::Models::CustomerMinifiedModel | nil, + customer: Orb::Models::Alert::Customer | nil, enabled: Orb::BooleanModel, - metric: Orb::Models::AlertModel::Metric | nil, - plan: Orb::Models::AlertModel::Plan | nil, - subscription: Orb::Models::SubscriptionMinifiedModel | nil, - thresholds: ^(Orb::ArrayOf[Orb::Models::ThresholdModel]) | nil, - type: Orb::Models::AlertModel::Type + metric: Orb::Models::Alert::Metric | nil, + plan: Orb::Models::Alert::Plan | nil, + subscription: Orb::Models::Alert::Subscription | nil, + thresholds: ^(Orb::ArrayOf[Orb::Models::Alert::Threshold]) | nil, + type: Orb::Models::Alert::Type } end end @@ -188,7 +188,7 @@ def test_enable response = @orb.alerts.enable("alert_configuration_id") assert_pattern do - response => Orb::Models::AlertModel + response => Orb::Models::Alert end assert_pattern do @@ -196,13 +196,13 @@ def test_enable id: String, created_at: Time, currency: String | nil, - customer: Orb::Models::CustomerMinifiedModel | nil, + customer: Orb::Models::Alert::Customer | nil, enabled: Orb::BooleanModel, - metric: Orb::Models::AlertModel::Metric | nil, - plan: Orb::Models::AlertModel::Plan | nil, - subscription: Orb::Models::SubscriptionMinifiedModel | nil, - thresholds: ^(Orb::ArrayOf[Orb::Models::ThresholdModel]) | nil, - type: Orb::Models::AlertModel::Type + metric: Orb::Models::Alert::Metric | nil, + plan: Orb::Models::Alert::Plan | nil, + subscription: Orb::Models::Alert::Subscription | nil, + thresholds: ^(Orb::ArrayOf[Orb::Models::Alert::Threshold]) | nil, + type: Orb::Models::Alert::Type } end end diff --git a/test/orb/resources/coupons/subscriptions_test.rb b/test/orb/resources/coupons/subscriptions_test.rb index 47b16258..34580bb3 100644 --- a/test/orb/resources/coupons/subscriptions_test.rb +++ b/test/orb/resources/coupons/subscriptions_test.rb @@ -17,36 +17,36 @@ def test_list row = response.to_enum.first assert_pattern do - row => Orb::Models::SubscriptionModel + row => Orb::Models::Subscription end assert_pattern do row => { id: String, active_plan_phase_order: Integer | nil, - adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::AdjustmentIntervalModel]), + adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::Subscription::AdjustmentInterval]), auto_collection: Orb::BooleanModel | nil, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, + billing_cycle_anchor_configuration: Orb::Models::Subscription::BillingCycleAnchorConfiguration, billing_cycle_day: Integer, created_at: Time, current_billing_period_end_date: Time | nil, current_billing_period_start_date: Time | nil, - customer: Orb::Models::CustomerModel, + customer: Orb::Models::Customer, default_invoice_memo: String | nil, - discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::SubscriptionModel::DiscountInterval]), + discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::Subscription::DiscountInterval]), end_date: Time | nil, - fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::FixedFeeQuantityScheduleEntryModel]), + fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::Subscription::FixedFeeQuantitySchedule]), invoicing_threshold: String | nil, - maximum_intervals: ^(Orb::ArrayOf[Orb::Models::MaximumIntervalModel]), + maximum_intervals: ^(Orb::ArrayOf[Orb::Models::Subscription::MaximumInterval]), metadata: ^(Orb::HashOf[String]), - minimum_intervals: ^(Orb::ArrayOf[Orb::Models::MinimumIntervalModel]), + minimum_intervals: ^(Orb::ArrayOf[Orb::Models::Subscription::MinimumInterval]), net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: ^(Orb::ArrayOf[Orb::Models::PriceIntervalModel]), - redeemed_coupon: Orb::Models::CouponRedemptionModel | nil, + plan: Orb::Models::Plan, + price_intervals: ^(Orb::ArrayOf[Orb::Models::Subscription::PriceInterval]), + redeemed_coupon: Orb::Models::Subscription::RedeemedCoupon | nil, start_date: Time, - status: Orb::Models::SubscriptionModel::Status, - trial_info: Orb::Models::SubscriptionTrialInfoModel + status: Orb::Models::Subscription::Status, + trial_info: Orb::Models::Subscription::TrialInfo } end end diff --git a/test/orb/resources/coupons_test.rb b/test/orb/resources/coupons_test.rb index bf5d47b2..38b54330 100644 --- a/test/orb/resources/coupons_test.rb +++ b/test/orb/resources/coupons_test.rb @@ -10,14 +10,14 @@ def test_create_required_params ) assert_pattern do - response => Orb::Models::CouponModel + response => Orb::Models::Coupon end assert_pattern do response => { id: String, archived_at: Time | nil, - discount: Orb::Models::CouponModel::Discount, + discount: Orb::Models::Coupon::Discount, duration_in_months: Integer | nil, max_redemptions: Integer | nil, redemption_code: String, @@ -40,14 +40,14 @@ def test_list row = response.to_enum.first assert_pattern do - row => Orb::Models::CouponModel + row => Orb::Models::Coupon end assert_pattern do row => { id: String, archived_at: Time | nil, - discount: Orb::Models::CouponModel::Discount, + discount: Orb::Models::Coupon::Discount, duration_in_months: Integer | nil, max_redemptions: Integer | nil, redemption_code: String, @@ -60,14 +60,14 @@ def test_archive response = @orb.coupons.archive("coupon_id") assert_pattern do - response => Orb::Models::CouponModel + response => Orb::Models::Coupon end assert_pattern do response => { id: String, archived_at: Time | nil, - discount: Orb::Models::CouponModel::Discount, + discount: Orb::Models::Coupon::Discount, duration_in_months: Integer | nil, max_redemptions: Integer | nil, redemption_code: String, @@ -80,14 +80,14 @@ def test_fetch response = @orb.coupons.fetch("coupon_id") assert_pattern do - response => Orb::Models::CouponModel + response => Orb::Models::Coupon end assert_pattern do response => { id: String, archived_at: Time | nil, - discount: Orb::Models::CouponModel::Discount, + discount: Orb::Models::Coupon::Discount, duration_in_months: Integer | nil, max_redemptions: Integer | nil, redemption_code: String, diff --git a/test/orb/resources/credit_notes_test.rb b/test/orb/resources/credit_notes_test.rb index 9a0293a8..9bb496c3 100644 --- a/test/orb/resources/credit_notes_test.rb +++ b/test/orb/resources/credit_notes_test.rb @@ -14,7 +14,7 @@ def test_create_required_params ) assert_pattern do - response => Orb::Models::CreditNoteModel + response => Orb::Models::CreditNote end assert_pattern do @@ -23,18 +23,18 @@ def test_create_required_params created_at: Time, credit_note_number: String, credit_note_pdf: String | nil, - customer: Orb::Models::CustomerMinifiedModel, + customer: Orb::Models::CreditNote::Customer, invoice_id: String, - line_items: ^(Orb::ArrayOf[Orb::Models::CreditNoteModel::LineItem]), - maximum_amount_adjustment: Orb::Models::CreditNoteDiscountModel | nil, + line_items: ^(Orb::ArrayOf[Orb::Models::CreditNote::LineItem]), + maximum_amount_adjustment: Orb::Models::CreditNote::MaximumAmountAdjustment | nil, memo: String | nil, minimum_amount_refunded: String | nil, - reason: Orb::Models::CreditNoteModel::Reason | nil, + reason: Orb::Models::CreditNote::Reason | nil, subtotal: String, total: String, - type: Orb::Models::CreditNoteModel::Type, + type: Orb::Models::CreditNote::Type, voided_at: Time | nil, - discounts: ^(Orb::ArrayOf[Orb::Models::CreditNoteDiscountModel]) | nil + discounts: ^(Orb::ArrayOf[Orb::Models::CreditNote::Discount]) | nil } end end @@ -53,7 +53,7 @@ def test_list row = response.to_enum.first assert_pattern do - row => Orb::Models::CreditNoteModel + row => Orb::Models::CreditNote end assert_pattern do @@ -62,18 +62,18 @@ def test_list created_at: Time, credit_note_number: String, credit_note_pdf: String | nil, - customer: Orb::Models::CustomerMinifiedModel, + customer: Orb::Models::CreditNote::Customer, invoice_id: String, - line_items: ^(Orb::ArrayOf[Orb::Models::CreditNoteModel::LineItem]), - maximum_amount_adjustment: Orb::Models::CreditNoteDiscountModel | nil, + line_items: ^(Orb::ArrayOf[Orb::Models::CreditNote::LineItem]), + maximum_amount_adjustment: Orb::Models::CreditNote::MaximumAmountAdjustment | nil, memo: String | nil, minimum_amount_refunded: String | nil, - reason: Orb::Models::CreditNoteModel::Reason | nil, + reason: Orb::Models::CreditNote::Reason | nil, subtotal: String, total: String, - type: Orb::Models::CreditNoteModel::Type, + type: Orb::Models::CreditNote::Type, voided_at: Time | nil, - discounts: ^(Orb::ArrayOf[Orb::Models::CreditNoteDiscountModel]) | nil + discounts: ^(Orb::ArrayOf[Orb::Models::CreditNote::Discount]) | nil } end end @@ -82,7 +82,7 @@ def test_fetch response = @orb.credit_notes.fetch("credit_note_id") assert_pattern do - response => Orb::Models::CreditNoteModel + response => Orb::Models::CreditNote end assert_pattern do @@ -91,18 +91,18 @@ def test_fetch created_at: Time, credit_note_number: String, credit_note_pdf: String | nil, - customer: Orb::Models::CustomerMinifiedModel, + customer: Orb::Models::CreditNote::Customer, invoice_id: String, - line_items: ^(Orb::ArrayOf[Orb::Models::CreditNoteModel::LineItem]), - maximum_amount_adjustment: Orb::Models::CreditNoteDiscountModel | nil, + line_items: ^(Orb::ArrayOf[Orb::Models::CreditNote::LineItem]), + maximum_amount_adjustment: Orb::Models::CreditNote::MaximumAmountAdjustment | nil, memo: String | nil, minimum_amount_refunded: String | nil, - reason: Orb::Models::CreditNoteModel::Reason | nil, + reason: Orb::Models::CreditNote::Reason | nil, subtotal: String, total: String, - type: Orb::Models::CreditNoteModel::Type, + type: Orb::Models::CreditNote::Type, voided_at: Time | nil, - discounts: ^(Orb::ArrayOf[Orb::Models::CreditNoteDiscountModel]) | nil + discounts: ^(Orb::ArrayOf[Orb::Models::CreditNote::Discount]) | nil } end end diff --git a/test/orb/resources/customers/balance_transactions_test.rb b/test/orb/resources/customers/balance_transactions_test.rb index a4bb1a75..41220b71 100644 --- a/test/orb/resources/customers/balance_transactions_test.rb +++ b/test/orb/resources/customers/balance_transactions_test.rb @@ -7,21 +7,21 @@ def test_create_required_params response = @orb.customers.balance_transactions.create("customer_id", amount: "amount", type: :increment) assert_pattern do - response => Orb::Models::CustomerBalanceTransactionModel + response => Orb::Models::Customers::BalanceTransactionCreateResponse end assert_pattern do response => { id: String, - action: Orb::Models::CustomerBalanceTransactionModel::Action, + action: Orb::Models::Customers::BalanceTransactionCreateResponse::Action, amount: String, created_at: Time, - credit_note: Orb::Models::CustomerBalanceTransactionModel::CreditNote | nil, + credit_note: Orb::Models::Customers::BalanceTransactionCreateResponse::CreditNote | nil, description: String | nil, ending_balance: String, - invoice: Orb::Models::CustomerBalanceTransactionModel::Invoice | nil, + invoice: Orb::Models::Customers::BalanceTransactionCreateResponse::Invoice | nil, starting_balance: String, - type: Orb::Models::CustomerBalanceTransactionModel::Type + type: Orb::Models::Customers::BalanceTransactionCreateResponse::Type } end end @@ -40,21 +40,21 @@ def test_list row = response.to_enum.first assert_pattern do - row => Orb::Models::CustomerBalanceTransactionModel + row => Orb::Models::Customers::BalanceTransactionListResponse end assert_pattern do row => { id: String, - action: Orb::Models::CustomerBalanceTransactionModel::Action, + action: Orb::Models::Customers::BalanceTransactionListResponse::Action, amount: String, created_at: Time, - credit_note: Orb::Models::CustomerBalanceTransactionModel::CreditNote | nil, + credit_note: Orb::Models::Customers::BalanceTransactionListResponse::CreditNote | nil, description: String | nil, ending_balance: String, - invoice: Orb::Models::CustomerBalanceTransactionModel::Invoice | nil, + invoice: Orb::Models::Customers::BalanceTransactionListResponse::Invoice | nil, starting_balance: String, - type: Orb::Models::CustomerBalanceTransactionModel::Type + type: Orb::Models::Customers::BalanceTransactionListResponse::Type } end end diff --git a/test/orb/resources/customers/costs_test.rb b/test/orb/resources/customers/costs_test.rb index 5ad7dc1b..d0a141f7 100644 --- a/test/orb/resources/customers/costs_test.rb +++ b/test/orb/resources/customers/costs_test.rb @@ -7,12 +7,12 @@ def test_list response = @orb.customers.costs.list("customer_id") assert_pattern do - response => Orb::Models::CustomerCostsModel + response => Orb::Models::Customers::CostListResponse end assert_pattern do response => { - data: ^(Orb::ArrayOf[Orb::Models::AggregatedCostModel]) + data: ^(Orb::ArrayOf[Orb::Models::Customers::CostListResponse::Data]) } end end @@ -21,12 +21,12 @@ def test_list_by_external_id response = @orb.customers.costs.list_by_external_id("external_customer_id") assert_pattern do - response => Orb::Models::CustomerCostsModel + response => Orb::Models::Customers::CostListByExternalIDResponse end assert_pattern do response => { - data: ^(Orb::ArrayOf[Orb::Models::AggregatedCostModel]) + data: ^(Orb::ArrayOf[Orb::Models::Customers::CostListByExternalIDResponse::Data]) } end end diff --git a/test/orb/resources/customers/credits/ledger_test.rb b/test/orb/resources/customers/credits/ledger_test.rb index 0f189318..99e407d4 100644 --- a/test/orb/resources/customers/credits/ledger_test.rb +++ b/test/orb/resources/customers/credits/ledger_test.rb @@ -17,7 +17,7 @@ def test_list row = response.to_enum.first assert_pattern do - row => Orb::Models::CreditLedgerEntryModel + row => Orb::Models::Customers::Credits::LedgerListResponse end end @@ -30,7 +30,7 @@ def test_create_entry_required_params ) assert_pattern do - response => Orb::Models::CreditLedgerEntryModel + response => Orb::Models::Customers::Credits::LedgerCreateEntryResponse end end @@ -43,7 +43,7 @@ def test_create_entry_by_external_id_required_params ) assert_pattern do - response => Orb::Models::CreditLedgerEntryModel + response => Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse end end @@ -61,7 +61,7 @@ def test_list_by_external_id row = response.to_enum.first assert_pattern do - row => Orb::Models::CreditLedgerEntryModel + row => Orb::Models::Customers::Credits::LedgerListByExternalIDResponse end end end diff --git a/test/orb/resources/customers/credits/top_ups_test.rb b/test/orb/resources/customers/credits/top_ups_test.rb index dcebb26f..40ee33fd 100644 --- a/test/orb/resources/customers/credits/top_ups_test.rb +++ b/test/orb/resources/customers/credits/top_ups_test.rb @@ -14,7 +14,7 @@ def test_create_required_params ) assert_pattern do - response => Orb::Models::TopUpModel + response => Orb::Models::Customers::Credits::TopUpCreateResponse end assert_pattern do @@ -22,11 +22,11 @@ def test_create_required_params id: String, amount: String, currency: String, - invoice_settings: Orb::Models::TopUpModel::InvoiceSettings, + invoice_settings: Orb::Models::Customers::Credits::TopUpCreateResponse::InvoiceSettings, per_unit_cost_basis: String, threshold: String, expires_after: Integer | nil, - expires_after_unit: Orb::Models::TopUpModel::ExpiresAfterUnit | nil + expires_after_unit: Orb::Models::Customers::Credits::TopUpCreateResponse::ExpiresAfterUnit | nil } end end @@ -45,7 +45,7 @@ def test_list row = response.to_enum.first assert_pattern do - row => Orb::Models::TopUpModel + row => Orb::Models::Customers::Credits::TopUpListResponse end assert_pattern do @@ -53,11 +53,11 @@ def test_list id: String, amount: String, currency: String, - invoice_settings: Orb::Models::TopUpModel::InvoiceSettings, + invoice_settings: Orb::Models::Customers::Credits::TopUpListResponse::InvoiceSettings, per_unit_cost_basis: String, threshold: String, expires_after: Integer | nil, - expires_after_unit: Orb::Models::TopUpModel::ExpiresAfterUnit | nil + expires_after_unit: Orb::Models::Customers::Credits::TopUpListResponse::ExpiresAfterUnit | nil } end end @@ -81,7 +81,7 @@ def test_create_by_external_id_required_params ) assert_pattern do - response => Orb::Models::TopUpModel + response => Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse end assert_pattern do @@ -89,11 +89,11 @@ def test_create_by_external_id_required_params id: String, amount: String, currency: String, - invoice_settings: Orb::Models::TopUpModel::InvoiceSettings, + invoice_settings: Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::InvoiceSettings, per_unit_cost_basis: String, threshold: String, expires_after: Integer | nil, - expires_after_unit: Orb::Models::TopUpModel::ExpiresAfterUnit | nil + expires_after_unit: Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::ExpiresAfterUnit | nil } end end @@ -123,7 +123,7 @@ def test_list_by_external_id row = response.to_enum.first assert_pattern do - row => Orb::Models::TopUpModel + row => Orb::Models::Customers::Credits::TopUpListByExternalIDResponse end assert_pattern do @@ -131,11 +131,11 @@ def test_list_by_external_id id: String, amount: String, currency: String, - invoice_settings: Orb::Models::TopUpModel::InvoiceSettings, + invoice_settings: Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::InvoiceSettings, per_unit_cost_basis: String, threshold: String, expires_after: Integer | nil, - expires_after_unit: Orb::Models::TopUpModel::ExpiresAfterUnit | nil + expires_after_unit: Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::ExpiresAfterUnit | nil } end end diff --git a/test/orb/resources/customers/credits_test.rb b/test/orb/resources/customers/credits_test.rb index 776bfc45..2d7b5e58 100644 --- a/test/orb/resources/customers/credits_test.rb +++ b/test/orb/resources/customers/credits_test.rb @@ -17,7 +17,7 @@ def test_list row = response.to_enum.first assert_pattern do - row => Orb::Models::CustomerCreditBalancesModel::Data + row => Orb::Models::Customers::CreditListResponse end assert_pattern do @@ -28,7 +28,7 @@ def test_list expiry_date: Time | nil, maximum_initial_balance: Float | nil, per_unit_cost_basis: String | nil, - status: Orb::Models::CustomerCreditBalancesModel::Data::Status + status: Orb::Models::Customers::CreditListResponse::Status } end end @@ -47,7 +47,7 @@ def test_list_by_external_id row = response.to_enum.first assert_pattern do - row => Orb::Models::CustomerCreditBalancesModel::Data + row => Orb::Models::Customers::CreditListByExternalIDResponse end assert_pattern do @@ -58,7 +58,7 @@ def test_list_by_external_id expiry_date: Time | nil, maximum_initial_balance: Float | nil, per_unit_cost_basis: String | nil, - status: Orb::Models::CustomerCreditBalancesModel::Data::Status + status: Orb::Models::Customers::CreditListByExternalIDResponse::Status } end end diff --git a/test/orb/resources/customers_test.rb b/test/orb/resources/customers_test.rb index 3c56af7d..31dc5b0c 100644 --- a/test/orb/resources/customers_test.rb +++ b/test/orb/resources/customers_test.rb @@ -7,7 +7,7 @@ def test_create_required_params response = @orb.customers.create(email: "dev@stainless.com", name: "x") assert_pattern do - response => Orb::Models::CustomerModel + response => Orb::Models::Customer end assert_pattern do @@ -16,24 +16,24 @@ def test_create_required_params additional_emails: ^(Orb::ArrayOf[String]), auto_collection: Orb::BooleanModel, balance: String, - billing_address: Orb::Models::AddressModel | nil, + billing_address: Orb::Models::Customer::BillingAddress | nil, created_at: Time, currency: String | nil, email: String, email_delivery: Orb::BooleanModel, exempt_from_automated_tax: Orb::BooleanModel | nil, external_customer_id: String | nil, - hierarchy: Orb::Models::CustomerModel::Hierarchy, + hierarchy: Orb::Models::Customer::Hierarchy, metadata: ^(Orb::HashOf[String]), name: String, - payment_provider: Orb::Models::CustomerModel::PaymentProvider | nil, + payment_provider: Orb::Models::Customer::PaymentProvider | nil, payment_provider_id: String | nil, portal_url: String | nil, - shipping_address: Orb::Models::AddressModel | nil, - tax_id: Orb::Models::CustomerTaxIDModel | nil, + shipping_address: Orb::Models::Customer::ShippingAddress | nil, + tax_id: Orb::Models::Customer::TaxID | nil, timezone: String, - accounting_sync_configuration: Orb::Models::CustomerModel::AccountingSyncConfiguration | nil, - reporting_configuration: Orb::Models::CustomerModel::ReportingConfiguration | nil + accounting_sync_configuration: Orb::Models::Customer::AccountingSyncConfiguration | nil, + reporting_configuration: Orb::Models::Customer::ReportingConfiguration | nil } end end @@ -42,7 +42,7 @@ def test_update response = @orb.customers.update("customer_id") assert_pattern do - response => Orb::Models::CustomerModel + response => Orb::Models::Customer end assert_pattern do @@ -51,24 +51,24 @@ def test_update additional_emails: ^(Orb::ArrayOf[String]), auto_collection: Orb::BooleanModel, balance: String, - billing_address: Orb::Models::AddressModel | nil, + billing_address: Orb::Models::Customer::BillingAddress | nil, created_at: Time, currency: String | nil, email: String, email_delivery: Orb::BooleanModel, exempt_from_automated_tax: Orb::BooleanModel | nil, external_customer_id: String | nil, - hierarchy: Orb::Models::CustomerModel::Hierarchy, + hierarchy: Orb::Models::Customer::Hierarchy, metadata: ^(Orb::HashOf[String]), name: String, - payment_provider: Orb::Models::CustomerModel::PaymentProvider | nil, + payment_provider: Orb::Models::Customer::PaymentProvider | nil, payment_provider_id: String | nil, portal_url: String | nil, - shipping_address: Orb::Models::AddressModel | nil, - tax_id: Orb::Models::CustomerTaxIDModel | nil, + shipping_address: Orb::Models::Customer::ShippingAddress | nil, + tax_id: Orb::Models::Customer::TaxID | nil, timezone: String, - accounting_sync_configuration: Orb::Models::CustomerModel::AccountingSyncConfiguration | nil, - reporting_configuration: Orb::Models::CustomerModel::ReportingConfiguration | nil + accounting_sync_configuration: Orb::Models::Customer::AccountingSyncConfiguration | nil, + reporting_configuration: Orb::Models::Customer::ReportingConfiguration | nil } end end @@ -87,7 +87,7 @@ def test_list row = response.to_enum.first assert_pattern do - row => Orb::Models::CustomerModel + row => Orb::Models::Customer end assert_pattern do @@ -96,24 +96,24 @@ def test_list additional_emails: ^(Orb::ArrayOf[String]), auto_collection: Orb::BooleanModel, balance: String, - billing_address: Orb::Models::AddressModel | nil, + billing_address: Orb::Models::Customer::BillingAddress | nil, created_at: Time, currency: String | nil, email: String, email_delivery: Orb::BooleanModel, exempt_from_automated_tax: Orb::BooleanModel | nil, external_customer_id: String | nil, - hierarchy: Orb::Models::CustomerModel::Hierarchy, + hierarchy: Orb::Models::Customer::Hierarchy, metadata: ^(Orb::HashOf[String]), name: String, - payment_provider: Orb::Models::CustomerModel::PaymentProvider | nil, + payment_provider: Orb::Models::Customer::PaymentProvider | nil, payment_provider_id: String | nil, portal_url: String | nil, - shipping_address: Orb::Models::AddressModel | nil, - tax_id: Orb::Models::CustomerTaxIDModel | nil, + shipping_address: Orb::Models::Customer::ShippingAddress | nil, + tax_id: Orb::Models::Customer::TaxID | nil, timezone: String, - accounting_sync_configuration: Orb::Models::CustomerModel::AccountingSyncConfiguration | nil, - reporting_configuration: Orb::Models::CustomerModel::ReportingConfiguration | nil + accounting_sync_configuration: Orb::Models::Customer::AccountingSyncConfiguration | nil, + reporting_configuration: Orb::Models::Customer::ReportingConfiguration | nil } end end @@ -130,7 +130,7 @@ def test_fetch response = @orb.customers.fetch("customer_id") assert_pattern do - response => Orb::Models::CustomerModel + response => Orb::Models::Customer end assert_pattern do @@ -139,24 +139,24 @@ def test_fetch additional_emails: ^(Orb::ArrayOf[String]), auto_collection: Orb::BooleanModel, balance: String, - billing_address: Orb::Models::AddressModel | nil, + billing_address: Orb::Models::Customer::BillingAddress | nil, created_at: Time, currency: String | nil, email: String, email_delivery: Orb::BooleanModel, exempt_from_automated_tax: Orb::BooleanModel | nil, external_customer_id: String | nil, - hierarchy: Orb::Models::CustomerModel::Hierarchy, + hierarchy: Orb::Models::Customer::Hierarchy, metadata: ^(Orb::HashOf[String]), name: String, - payment_provider: Orb::Models::CustomerModel::PaymentProvider | nil, + payment_provider: Orb::Models::Customer::PaymentProvider | nil, payment_provider_id: String | nil, portal_url: String | nil, - shipping_address: Orb::Models::AddressModel | nil, - tax_id: Orb::Models::CustomerTaxIDModel | nil, + shipping_address: Orb::Models::Customer::ShippingAddress | nil, + tax_id: Orb::Models::Customer::TaxID | nil, timezone: String, - accounting_sync_configuration: Orb::Models::CustomerModel::AccountingSyncConfiguration | nil, - reporting_configuration: Orb::Models::CustomerModel::ReportingConfiguration | nil + accounting_sync_configuration: Orb::Models::Customer::AccountingSyncConfiguration | nil, + reporting_configuration: Orb::Models::Customer::ReportingConfiguration | nil } end end @@ -165,7 +165,7 @@ def test_fetch_by_external_id response = @orb.customers.fetch_by_external_id("external_customer_id") assert_pattern do - response => Orb::Models::CustomerModel + response => Orb::Models::Customer end assert_pattern do @@ -174,24 +174,24 @@ def test_fetch_by_external_id additional_emails: ^(Orb::ArrayOf[String]), auto_collection: Orb::BooleanModel, balance: String, - billing_address: Orb::Models::AddressModel | nil, + billing_address: Orb::Models::Customer::BillingAddress | nil, created_at: Time, currency: String | nil, email: String, email_delivery: Orb::BooleanModel, exempt_from_automated_tax: Orb::BooleanModel | nil, external_customer_id: String | nil, - hierarchy: Orb::Models::CustomerModel::Hierarchy, + hierarchy: Orb::Models::Customer::Hierarchy, metadata: ^(Orb::HashOf[String]), name: String, - payment_provider: Orb::Models::CustomerModel::PaymentProvider | nil, + payment_provider: Orb::Models::Customer::PaymentProvider | nil, payment_provider_id: String | nil, portal_url: String | nil, - shipping_address: Orb::Models::AddressModel | nil, - tax_id: Orb::Models::CustomerTaxIDModel | nil, + shipping_address: Orb::Models::Customer::ShippingAddress | nil, + tax_id: Orb::Models::Customer::TaxID | nil, timezone: String, - accounting_sync_configuration: Orb::Models::CustomerModel::AccountingSyncConfiguration | nil, - reporting_configuration: Orb::Models::CustomerModel::ReportingConfiguration | nil + accounting_sync_configuration: Orb::Models::Customer::AccountingSyncConfiguration | nil, + reporting_configuration: Orb::Models::Customer::ReportingConfiguration | nil } end end @@ -216,7 +216,7 @@ def test_update_by_external_id response = @orb.customers.update_by_external_id("external_customer_id") assert_pattern do - response => Orb::Models::CustomerModel + response => Orb::Models::Customer end assert_pattern do @@ -225,24 +225,24 @@ def test_update_by_external_id additional_emails: ^(Orb::ArrayOf[String]), auto_collection: Orb::BooleanModel, balance: String, - billing_address: Orb::Models::AddressModel | nil, + billing_address: Orb::Models::Customer::BillingAddress | nil, created_at: Time, currency: String | nil, email: String, email_delivery: Orb::BooleanModel, exempt_from_automated_tax: Orb::BooleanModel | nil, external_customer_id: String | nil, - hierarchy: Orb::Models::CustomerModel::Hierarchy, + hierarchy: Orb::Models::Customer::Hierarchy, metadata: ^(Orb::HashOf[String]), name: String, - payment_provider: Orb::Models::CustomerModel::PaymentProvider | nil, + payment_provider: Orb::Models::Customer::PaymentProvider | nil, payment_provider_id: String | nil, portal_url: String | nil, - shipping_address: Orb::Models::AddressModel | nil, - tax_id: Orb::Models::CustomerTaxIDModel | nil, + shipping_address: Orb::Models::Customer::ShippingAddress | nil, + tax_id: Orb::Models::Customer::TaxID | nil, timezone: String, - accounting_sync_configuration: Orb::Models::CustomerModel::AccountingSyncConfiguration | nil, - reporting_configuration: Orb::Models::CustomerModel::ReportingConfiguration | nil + accounting_sync_configuration: Orb::Models::Customer::AccountingSyncConfiguration | nil, + reporting_configuration: Orb::Models::Customer::ReportingConfiguration | nil } end end diff --git a/test/orb/resources/dimensional_price_groups/external_dimensional_price_group_id_test.rb b/test/orb/resources/dimensional_price_groups/external_dimensional_price_group_id_test.rb index a79d4fe6..60fb156a 100644 --- a/test/orb/resources/dimensional_price_groups/external_dimensional_price_group_id_test.rb +++ b/test/orb/resources/dimensional_price_groups/external_dimensional_price_group_id_test.rb @@ -9,7 +9,7 @@ def test_retrieve ) assert_pattern do - response => Orb::Models::DimensionalPriceGroupModel + response => Orb::Models::DimensionalPriceGroup end assert_pattern do diff --git a/test/orb/resources/dimensional_price_groups_test.rb b/test/orb/resources/dimensional_price_groups_test.rb index 9690acb8..36f4e569 100644 --- a/test/orb/resources/dimensional_price_groups_test.rb +++ b/test/orb/resources/dimensional_price_groups_test.rb @@ -11,7 +11,7 @@ def test_create_required_params ) assert_pattern do - response => Orb::Models::DimensionalPriceGroupModel + response => Orb::Models::DimensionalPriceGroup end assert_pattern do @@ -30,7 +30,7 @@ def test_retrieve response = @orb.dimensional_price_groups.retrieve("dimensional_price_group_id") assert_pattern do - response => Orb::Models::DimensionalPriceGroupModel + response => Orb::Models::DimensionalPriceGroup end assert_pattern do @@ -59,7 +59,7 @@ def test_list row = response.to_enum.first assert_pattern do - row => Orb::Models::DimensionalPriceGroupModel + row => Orb::Models::DimensionalPriceGroup end assert_pattern do diff --git a/test/orb/resources/events/backfills_test.rb b/test/orb/resources/events/backfills_test.rb index 6ce8bdb3..f4f37dbb 100644 --- a/test/orb/resources/events/backfills_test.rb +++ b/test/orb/resources/events/backfills_test.rb @@ -10,7 +10,7 @@ def test_create_required_params ) assert_pattern do - response => Orb::Models::BackfillModel + response => Orb::Models::Events::BackfillCreateResponse end assert_pattern do @@ -22,7 +22,7 @@ def test_create_required_params events_ingested: Integer, replace_existing_events: Orb::BooleanModel, reverted_at: Time | nil, - status: Orb::Models::BackfillModel::Status, + status: Orb::Models::Events::BackfillCreateResponse::Status, timeframe_end: Time, timeframe_start: Time, deprecation_filter: String | nil @@ -44,7 +44,7 @@ def test_list row = response.to_enum.first assert_pattern do - row => Orb::Models::BackfillModel + row => Orb::Models::Events::BackfillListResponse end assert_pattern do @@ -56,7 +56,7 @@ def test_list events_ingested: Integer, replace_existing_events: Orb::BooleanModel, reverted_at: Time | nil, - status: Orb::Models::BackfillModel::Status, + status: Orb::Models::Events::BackfillListResponse::Status, timeframe_end: Time, timeframe_start: Time, deprecation_filter: String | nil @@ -68,7 +68,7 @@ def test_close response = @orb.events.backfills.close("backfill_id") assert_pattern do - response => Orb::Models::BackfillModel + response => Orb::Models::Events::BackfillCloseResponse end assert_pattern do @@ -80,7 +80,7 @@ def test_close events_ingested: Integer, replace_existing_events: Orb::BooleanModel, reverted_at: Time | nil, - status: Orb::Models::BackfillModel::Status, + status: Orb::Models::Events::BackfillCloseResponse::Status, timeframe_end: Time, timeframe_start: Time, deprecation_filter: String | nil @@ -92,7 +92,7 @@ def test_fetch response = @orb.events.backfills.fetch("backfill_id") assert_pattern do - response => Orb::Models::BackfillModel + response => Orb::Models::Events::BackfillFetchResponse end assert_pattern do @@ -104,7 +104,7 @@ def test_fetch events_ingested: Integer, replace_existing_events: Orb::BooleanModel, reverted_at: Time | nil, - status: Orb::Models::BackfillModel::Status, + status: Orb::Models::Events::BackfillFetchResponse::Status, timeframe_end: Time, timeframe_start: Time, deprecation_filter: String | nil @@ -116,7 +116,7 @@ def test_revert response = @orb.events.backfills.revert("backfill_id") assert_pattern do - response => Orb::Models::BackfillModel + response => Orb::Models::Events::BackfillRevertResponse end assert_pattern do @@ -128,7 +128,7 @@ def test_revert events_ingested: Integer, replace_existing_events: Orb::BooleanModel, reverted_at: Time | nil, - status: Orb::Models::BackfillModel::Status, + status: Orb::Models::Events::BackfillRevertResponse::Status, timeframe_end: Time, timeframe_start: Time, deprecation_filter: String | nil diff --git a/test/orb/resources/invoice_line_items_test.rb b/test/orb/resources/invoice_line_items_test.rb index 41a80b84..6664a17f 100644 --- a/test/orb/resources/invoice_line_items_test.rb +++ b/test/orb/resources/invoice_line_items_test.rb @@ -14,32 +14,32 @@ def test_create_required_params ) assert_pattern do - response => Orb::Models::InvoiceLineItemModel + response => Orb::Models::InvoiceLineItemCreateResponse end assert_pattern do response => { id: String, adjusted_subtotal: String, - adjustments: ^(Orb::ArrayOf[union: Orb::Models::InvoiceLineItemModel::Adjustment]), + adjustments: ^(Orb::ArrayOf[union: Orb::Models::InvoiceLineItemCreateResponse::Adjustment]), amount: String, credits_applied: String, discount: Orb::Models::Discount | nil, end_date: Time, filter: String | nil, grouping: String | nil, - maximum: Orb::Models::MaximumModel | nil, + maximum: Orb::Models::InvoiceLineItemCreateResponse::Maximum | nil, maximum_amount: String | nil, - minimum: Orb::Models::MinimumModel | nil, + minimum: Orb::Models::InvoiceLineItemCreateResponse::Minimum | nil, minimum_amount: String | nil, name: String, partially_invoiced_amount: String, - price: Orb::Models::PriceModel | nil, + price: Orb::Models::Price | nil, quantity: Float, start_date: Time, - sub_line_items: ^(Orb::ArrayOf[union: Orb::Models::InvoiceLineItemModel::SubLineItem]), + sub_line_items: ^(Orb::ArrayOf[union: Orb::Models::InvoiceLineItemCreateResponse::SubLineItem]), subtotal: String, - tax_amounts: ^(Orb::ArrayOf[Orb::Models::TaxAmountModel]), + tax_amounts: ^(Orb::ArrayOf[Orb::Models::InvoiceLineItemCreateResponse::TaxAmount]), usage_customer_ids: ^(Orb::ArrayOf[String]) | nil } end diff --git a/test/orb/resources/invoices_test.rb b/test/orb/resources/invoices_test.rb index 376b57da..c9b8c6b4 100644 --- a/test/orb/resources/invoices_test.rb +++ b/test/orb/resources/invoices_test.rb @@ -22,21 +22,21 @@ def test_create_required_params ) assert_pattern do - response => Orb::Models::InvoiceModel + response => Orb::Models::Invoice end assert_pattern do response => { id: String, amount_due: String, - auto_collection: Orb::Models::AutoCollectionModel, - billing_address: Orb::Models::AddressModel | nil, + auto_collection: Orb::Models::Invoice::AutoCollection, + billing_address: Orb::Models::Invoice::BillingAddress | nil, created_at: Time, - credit_notes: ^(Orb::ArrayOf[Orb::Models::CreditNoteSummaryModel]), + credit_notes: ^(Orb::ArrayOf[Orb::Models::Invoice::CreditNote]), currency: String, - customer: Orb::Models::CustomerMinifiedModel, - customer_balance_transactions: ^(Orb::ArrayOf[Orb::Models::CustomerBalanceTransactionModel]), - customer_tax_id: Orb::Models::CustomerTaxIDModel | nil, + customer: Orb::Models::Invoice::Customer, + customer_balance_transactions: ^(Orb::ArrayOf[Orb::Models::Invoice::CustomerBalanceTransaction]), + customer_tax_id: Orb::Models::Invoice::CustomerTaxID | nil, discount: Orb::Unknown, discounts: ^(Orb::ArrayOf[union: Orb::Models::InvoiceLevelDiscount]), due_date: Time | nil, @@ -45,24 +45,24 @@ def test_create_required_params invoice_date: Time, invoice_number: String, invoice_pdf: String | nil, - invoice_source: Orb::Models::InvoiceModel::InvoiceSource, + invoice_source: Orb::Models::Invoice::InvoiceSource, issue_failed_at: Time | nil, issued_at: Time | nil, - line_items: ^(Orb::ArrayOf[Orb::Models::InvoiceLineItemModel]), - maximum: Orb::Models::MaximumModel | nil, + line_items: ^(Orb::ArrayOf[Orb::Models::Invoice::LineItem]), + maximum: Orb::Models::Invoice::Maximum | nil, maximum_amount: String | nil, memo: String | nil, metadata: ^(Orb::HashOf[String]), - minimum: Orb::Models::MinimumModel | nil, + minimum: Orb::Models::Invoice::Minimum | nil, minimum_amount: String | nil, paid_at: Time | nil, - payment_attempts: ^(Orb::ArrayOf[Orb::Models::PaymentAttemptModel]), + payment_attempts: ^(Orb::ArrayOf[Orb::Models::Invoice::PaymentAttempt]), payment_failed_at: Time | nil, payment_started_at: Time | nil, scheduled_issue_at: Time | nil, - shipping_address: Orb::Models::AddressModel | nil, - status: Orb::Models::InvoiceModel::Status, - subscription: Orb::Models::SubscriptionMinifiedModel | nil, + shipping_address: Orb::Models::Invoice::ShippingAddress | nil, + status: Orb::Models::Invoice::Status, + subscription: Orb::Models::Invoice::Subscription | nil, subtotal: String, sync_failed_at: Time | nil, total: String, @@ -76,21 +76,21 @@ def test_update response = @orb.invoices.update("invoice_id") assert_pattern do - response => Orb::Models::InvoiceModel + response => Orb::Models::Invoice end assert_pattern do response => { id: String, amount_due: String, - auto_collection: Orb::Models::AutoCollectionModel, - billing_address: Orb::Models::AddressModel | nil, + auto_collection: Orb::Models::Invoice::AutoCollection, + billing_address: Orb::Models::Invoice::BillingAddress | nil, created_at: Time, - credit_notes: ^(Orb::ArrayOf[Orb::Models::CreditNoteSummaryModel]), + credit_notes: ^(Orb::ArrayOf[Orb::Models::Invoice::CreditNote]), currency: String, - customer: Orb::Models::CustomerMinifiedModel, - customer_balance_transactions: ^(Orb::ArrayOf[Orb::Models::CustomerBalanceTransactionModel]), - customer_tax_id: Orb::Models::CustomerTaxIDModel | nil, + customer: Orb::Models::Invoice::Customer, + customer_balance_transactions: ^(Orb::ArrayOf[Orb::Models::Invoice::CustomerBalanceTransaction]), + customer_tax_id: Orb::Models::Invoice::CustomerTaxID | nil, discount: Orb::Unknown, discounts: ^(Orb::ArrayOf[union: Orb::Models::InvoiceLevelDiscount]), due_date: Time | nil, @@ -99,24 +99,24 @@ def test_update invoice_date: Time, invoice_number: String, invoice_pdf: String | nil, - invoice_source: Orb::Models::InvoiceModel::InvoiceSource, + invoice_source: Orb::Models::Invoice::InvoiceSource, issue_failed_at: Time | nil, issued_at: Time | nil, - line_items: ^(Orb::ArrayOf[Orb::Models::InvoiceLineItemModel]), - maximum: Orb::Models::MaximumModel | nil, + line_items: ^(Orb::ArrayOf[Orb::Models::Invoice::LineItem]), + maximum: Orb::Models::Invoice::Maximum | nil, maximum_amount: String | nil, memo: String | nil, metadata: ^(Orb::HashOf[String]), - minimum: Orb::Models::MinimumModel | nil, + minimum: Orb::Models::Invoice::Minimum | nil, minimum_amount: String | nil, paid_at: Time | nil, - payment_attempts: ^(Orb::ArrayOf[Orb::Models::PaymentAttemptModel]), + payment_attempts: ^(Orb::ArrayOf[Orb::Models::Invoice::PaymentAttempt]), payment_failed_at: Time | nil, payment_started_at: Time | nil, scheduled_issue_at: Time | nil, - shipping_address: Orb::Models::AddressModel | nil, - status: Orb::Models::InvoiceModel::Status, - subscription: Orb::Models::SubscriptionMinifiedModel | nil, + shipping_address: Orb::Models::Invoice::ShippingAddress | nil, + status: Orb::Models::Invoice::Status, + subscription: Orb::Models::Invoice::Subscription | nil, subtotal: String, sync_failed_at: Time | nil, total: String, @@ -140,21 +140,21 @@ def test_list row = response.to_enum.first assert_pattern do - row => Orb::Models::InvoiceModel + row => Orb::Models::Invoice end assert_pattern do row => { id: String, amount_due: String, - auto_collection: Orb::Models::AutoCollectionModel, - billing_address: Orb::Models::AddressModel | nil, + auto_collection: Orb::Models::Invoice::AutoCollection, + billing_address: Orb::Models::Invoice::BillingAddress | nil, created_at: Time, - credit_notes: ^(Orb::ArrayOf[Orb::Models::CreditNoteSummaryModel]), + credit_notes: ^(Orb::ArrayOf[Orb::Models::Invoice::CreditNote]), currency: String, - customer: Orb::Models::CustomerMinifiedModel, - customer_balance_transactions: ^(Orb::ArrayOf[Orb::Models::CustomerBalanceTransactionModel]), - customer_tax_id: Orb::Models::CustomerTaxIDModel | nil, + customer: Orb::Models::Invoice::Customer, + customer_balance_transactions: ^(Orb::ArrayOf[Orb::Models::Invoice::CustomerBalanceTransaction]), + customer_tax_id: Orb::Models::Invoice::CustomerTaxID | nil, discount: Orb::Unknown, discounts: ^(Orb::ArrayOf[union: Orb::Models::InvoiceLevelDiscount]), due_date: Time | nil, @@ -163,24 +163,24 @@ def test_list invoice_date: Time, invoice_number: String, invoice_pdf: String | nil, - invoice_source: Orb::Models::InvoiceModel::InvoiceSource, + invoice_source: Orb::Models::Invoice::InvoiceSource, issue_failed_at: Time | nil, issued_at: Time | nil, - line_items: ^(Orb::ArrayOf[Orb::Models::InvoiceLineItemModel]), - maximum: Orb::Models::MaximumModel | nil, + line_items: ^(Orb::ArrayOf[Orb::Models::Invoice::LineItem]), + maximum: Orb::Models::Invoice::Maximum | nil, maximum_amount: String | nil, memo: String | nil, metadata: ^(Orb::HashOf[String]), - minimum: Orb::Models::MinimumModel | nil, + minimum: Orb::Models::Invoice::Minimum | nil, minimum_amount: String | nil, paid_at: Time | nil, - payment_attempts: ^(Orb::ArrayOf[Orb::Models::PaymentAttemptModel]), + payment_attempts: ^(Orb::ArrayOf[Orb::Models::Invoice::PaymentAttempt]), payment_failed_at: Time | nil, payment_started_at: Time | nil, scheduled_issue_at: Time | nil, - shipping_address: Orb::Models::AddressModel | nil, - status: Orb::Models::InvoiceModel::Status, - subscription: Orb::Models::SubscriptionMinifiedModel | nil, + shipping_address: Orb::Models::Invoice::ShippingAddress | nil, + status: Orb::Models::Invoice::Status, + subscription: Orb::Models::Invoice::Subscription | nil, subtotal: String, sync_failed_at: Time | nil, total: String, @@ -194,21 +194,21 @@ def test_fetch response = @orb.invoices.fetch("invoice_id") assert_pattern do - response => Orb::Models::InvoiceModel + response => Orb::Models::Invoice end assert_pattern do response => { id: String, amount_due: String, - auto_collection: Orb::Models::AutoCollectionModel, - billing_address: Orb::Models::AddressModel | nil, + auto_collection: Orb::Models::Invoice::AutoCollection, + billing_address: Orb::Models::Invoice::BillingAddress | nil, created_at: Time, - credit_notes: ^(Orb::ArrayOf[Orb::Models::CreditNoteSummaryModel]), + credit_notes: ^(Orb::ArrayOf[Orb::Models::Invoice::CreditNote]), currency: String, - customer: Orb::Models::CustomerMinifiedModel, - customer_balance_transactions: ^(Orb::ArrayOf[Orb::Models::CustomerBalanceTransactionModel]), - customer_tax_id: Orb::Models::CustomerTaxIDModel | nil, + customer: Orb::Models::Invoice::Customer, + customer_balance_transactions: ^(Orb::ArrayOf[Orb::Models::Invoice::CustomerBalanceTransaction]), + customer_tax_id: Orb::Models::Invoice::CustomerTaxID | nil, discount: Orb::Unknown, discounts: ^(Orb::ArrayOf[union: Orb::Models::InvoiceLevelDiscount]), due_date: Time | nil, @@ -217,24 +217,24 @@ def test_fetch invoice_date: Time, invoice_number: String, invoice_pdf: String | nil, - invoice_source: Orb::Models::InvoiceModel::InvoiceSource, + invoice_source: Orb::Models::Invoice::InvoiceSource, issue_failed_at: Time | nil, issued_at: Time | nil, - line_items: ^(Orb::ArrayOf[Orb::Models::InvoiceLineItemModel]), - maximum: Orb::Models::MaximumModel | nil, + line_items: ^(Orb::ArrayOf[Orb::Models::Invoice::LineItem]), + maximum: Orb::Models::Invoice::Maximum | nil, maximum_amount: String | nil, memo: String | nil, metadata: ^(Orb::HashOf[String]), - minimum: Orb::Models::MinimumModel | nil, + minimum: Orb::Models::Invoice::Minimum | nil, minimum_amount: String | nil, paid_at: Time | nil, - payment_attempts: ^(Orb::ArrayOf[Orb::Models::PaymentAttemptModel]), + payment_attempts: ^(Orb::ArrayOf[Orb::Models::Invoice::PaymentAttempt]), payment_failed_at: Time | nil, payment_started_at: Time | nil, scheduled_issue_at: Time | nil, - shipping_address: Orb::Models::AddressModel | nil, - status: Orb::Models::InvoiceModel::Status, - subscription: Orb::Models::SubscriptionMinifiedModel | nil, + shipping_address: Orb::Models::Invoice::ShippingAddress | nil, + status: Orb::Models::Invoice::Status, + subscription: Orb::Models::Invoice::Subscription | nil, subtotal: String, sync_failed_at: Time | nil, total: String, @@ -255,14 +255,14 @@ def test_fetch_upcoming_required_params response => { id: String, amount_due: String, - auto_collection: Orb::Models::AutoCollectionModel, - billing_address: Orb::Models::AddressModel | nil, + auto_collection: Orb::Models::InvoiceFetchUpcomingResponse::AutoCollection, + billing_address: Orb::Models::InvoiceFetchUpcomingResponse::BillingAddress | nil, created_at: Time, - credit_notes: ^(Orb::ArrayOf[Orb::Models::CreditNoteSummaryModel]), + credit_notes: ^(Orb::ArrayOf[Orb::Models::InvoiceFetchUpcomingResponse::CreditNote]), currency: String, - customer: Orb::Models::CustomerMinifiedModel, - customer_balance_transactions: ^(Orb::ArrayOf[Orb::Models::CustomerBalanceTransactionModel]), - customer_tax_id: Orb::Models::CustomerTaxIDModel | nil, + customer: Orb::Models::InvoiceFetchUpcomingResponse::Customer, + customer_balance_transactions: ^(Orb::ArrayOf[Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction]), + customer_tax_id: Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID | nil, discount: Orb::Unknown, discounts: ^(Orb::ArrayOf[union: Orb::Models::InvoiceLevelDiscount]), due_date: Time | nil, @@ -273,21 +273,21 @@ def test_fetch_upcoming_required_params invoice_source: Orb::Models::InvoiceFetchUpcomingResponse::InvoiceSource, issue_failed_at: Time | nil, issued_at: Time | nil, - line_items: ^(Orb::ArrayOf[Orb::Models::InvoiceLineItemModel]), - maximum: Orb::Models::MaximumModel | nil, + line_items: ^(Orb::ArrayOf[Orb::Models::InvoiceFetchUpcomingResponse::LineItem]), + maximum: Orb::Models::InvoiceFetchUpcomingResponse::Maximum | nil, maximum_amount: String | nil, memo: String | nil, metadata: ^(Orb::HashOf[String]), - minimum: Orb::Models::MinimumModel | nil, + minimum: Orb::Models::InvoiceFetchUpcomingResponse::Minimum | nil, minimum_amount: String | nil, paid_at: Time | nil, - payment_attempts: ^(Orb::ArrayOf[Orb::Models::PaymentAttemptModel]), + payment_attempts: ^(Orb::ArrayOf[Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt]), payment_failed_at: Time | nil, payment_started_at: Time | nil, scheduled_issue_at: Time | nil, - shipping_address: Orb::Models::AddressModel | nil, + shipping_address: Orb::Models::InvoiceFetchUpcomingResponse::ShippingAddress | nil, status: Orb::Models::InvoiceFetchUpcomingResponse::Status, - subscription: Orb::Models::SubscriptionMinifiedModel | nil, + subscription: Orb::Models::InvoiceFetchUpcomingResponse::Subscription | nil, subtotal: String, sync_failed_at: Time | nil, target_date: Time, @@ -302,21 +302,21 @@ def test_issue response = @orb.invoices.issue("invoice_id") assert_pattern do - response => Orb::Models::InvoiceModel + response => Orb::Models::Invoice end assert_pattern do response => { id: String, amount_due: String, - auto_collection: Orb::Models::AutoCollectionModel, - billing_address: Orb::Models::AddressModel | nil, + auto_collection: Orb::Models::Invoice::AutoCollection, + billing_address: Orb::Models::Invoice::BillingAddress | nil, created_at: Time, - credit_notes: ^(Orb::ArrayOf[Orb::Models::CreditNoteSummaryModel]), + credit_notes: ^(Orb::ArrayOf[Orb::Models::Invoice::CreditNote]), currency: String, - customer: Orb::Models::CustomerMinifiedModel, - customer_balance_transactions: ^(Orb::ArrayOf[Orb::Models::CustomerBalanceTransactionModel]), - customer_tax_id: Orb::Models::CustomerTaxIDModel | nil, + customer: Orb::Models::Invoice::Customer, + customer_balance_transactions: ^(Orb::ArrayOf[Orb::Models::Invoice::CustomerBalanceTransaction]), + customer_tax_id: Orb::Models::Invoice::CustomerTaxID | nil, discount: Orb::Unknown, discounts: ^(Orb::ArrayOf[union: Orb::Models::InvoiceLevelDiscount]), due_date: Time | nil, @@ -325,24 +325,24 @@ def test_issue invoice_date: Time, invoice_number: String, invoice_pdf: String | nil, - invoice_source: Orb::Models::InvoiceModel::InvoiceSource, + invoice_source: Orb::Models::Invoice::InvoiceSource, issue_failed_at: Time | nil, issued_at: Time | nil, - line_items: ^(Orb::ArrayOf[Orb::Models::InvoiceLineItemModel]), - maximum: Orb::Models::MaximumModel | nil, + line_items: ^(Orb::ArrayOf[Orb::Models::Invoice::LineItem]), + maximum: Orb::Models::Invoice::Maximum | nil, maximum_amount: String | nil, memo: String | nil, metadata: ^(Orb::HashOf[String]), - minimum: Orb::Models::MinimumModel | nil, + minimum: Orb::Models::Invoice::Minimum | nil, minimum_amount: String | nil, paid_at: Time | nil, - payment_attempts: ^(Orb::ArrayOf[Orb::Models::PaymentAttemptModel]), + payment_attempts: ^(Orb::ArrayOf[Orb::Models::Invoice::PaymentAttempt]), payment_failed_at: Time | nil, payment_started_at: Time | nil, scheduled_issue_at: Time | nil, - shipping_address: Orb::Models::AddressModel | nil, - status: Orb::Models::InvoiceModel::Status, - subscription: Orb::Models::SubscriptionMinifiedModel | nil, + shipping_address: Orb::Models::Invoice::ShippingAddress | nil, + status: Orb::Models::Invoice::Status, + subscription: Orb::Models::Invoice::Subscription | nil, subtotal: String, sync_failed_at: Time | nil, total: String, @@ -356,21 +356,21 @@ def test_mark_paid_required_params response = @orb.invoices.mark_paid("invoice_id", payment_received_date: "2023-09-22") assert_pattern do - response => Orb::Models::InvoiceModel + response => Orb::Models::Invoice end assert_pattern do response => { id: String, amount_due: String, - auto_collection: Orb::Models::AutoCollectionModel, - billing_address: Orb::Models::AddressModel | nil, + auto_collection: Orb::Models::Invoice::AutoCollection, + billing_address: Orb::Models::Invoice::BillingAddress | nil, created_at: Time, - credit_notes: ^(Orb::ArrayOf[Orb::Models::CreditNoteSummaryModel]), + credit_notes: ^(Orb::ArrayOf[Orb::Models::Invoice::CreditNote]), currency: String, - customer: Orb::Models::CustomerMinifiedModel, - customer_balance_transactions: ^(Orb::ArrayOf[Orb::Models::CustomerBalanceTransactionModel]), - customer_tax_id: Orb::Models::CustomerTaxIDModel | nil, + customer: Orb::Models::Invoice::Customer, + customer_balance_transactions: ^(Orb::ArrayOf[Orb::Models::Invoice::CustomerBalanceTransaction]), + customer_tax_id: Orb::Models::Invoice::CustomerTaxID | nil, discount: Orb::Unknown, discounts: ^(Orb::ArrayOf[union: Orb::Models::InvoiceLevelDiscount]), due_date: Time | nil, @@ -379,24 +379,24 @@ def test_mark_paid_required_params invoice_date: Time, invoice_number: String, invoice_pdf: String | nil, - invoice_source: Orb::Models::InvoiceModel::InvoiceSource, + invoice_source: Orb::Models::Invoice::InvoiceSource, issue_failed_at: Time | nil, issued_at: Time | nil, - line_items: ^(Orb::ArrayOf[Orb::Models::InvoiceLineItemModel]), - maximum: Orb::Models::MaximumModel | nil, + line_items: ^(Orb::ArrayOf[Orb::Models::Invoice::LineItem]), + maximum: Orb::Models::Invoice::Maximum | nil, maximum_amount: String | nil, memo: String | nil, metadata: ^(Orb::HashOf[String]), - minimum: Orb::Models::MinimumModel | nil, + minimum: Orb::Models::Invoice::Minimum | nil, minimum_amount: String | nil, paid_at: Time | nil, - payment_attempts: ^(Orb::ArrayOf[Orb::Models::PaymentAttemptModel]), + payment_attempts: ^(Orb::ArrayOf[Orb::Models::Invoice::PaymentAttempt]), payment_failed_at: Time | nil, payment_started_at: Time | nil, scheduled_issue_at: Time | nil, - shipping_address: Orb::Models::AddressModel | nil, - status: Orb::Models::InvoiceModel::Status, - subscription: Orb::Models::SubscriptionMinifiedModel | nil, + shipping_address: Orb::Models::Invoice::ShippingAddress | nil, + status: Orb::Models::Invoice::Status, + subscription: Orb::Models::Invoice::Subscription | nil, subtotal: String, sync_failed_at: Time | nil, total: String, @@ -410,21 +410,21 @@ def test_pay response = @orb.invoices.pay("invoice_id") assert_pattern do - response => Orb::Models::InvoiceModel + response => Orb::Models::Invoice end assert_pattern do response => { id: String, amount_due: String, - auto_collection: Orb::Models::AutoCollectionModel, - billing_address: Orb::Models::AddressModel | nil, + auto_collection: Orb::Models::Invoice::AutoCollection, + billing_address: Orb::Models::Invoice::BillingAddress | nil, created_at: Time, - credit_notes: ^(Orb::ArrayOf[Orb::Models::CreditNoteSummaryModel]), + credit_notes: ^(Orb::ArrayOf[Orb::Models::Invoice::CreditNote]), currency: String, - customer: Orb::Models::CustomerMinifiedModel, - customer_balance_transactions: ^(Orb::ArrayOf[Orb::Models::CustomerBalanceTransactionModel]), - customer_tax_id: Orb::Models::CustomerTaxIDModel | nil, + customer: Orb::Models::Invoice::Customer, + customer_balance_transactions: ^(Orb::ArrayOf[Orb::Models::Invoice::CustomerBalanceTransaction]), + customer_tax_id: Orb::Models::Invoice::CustomerTaxID | nil, discount: Orb::Unknown, discounts: ^(Orb::ArrayOf[union: Orb::Models::InvoiceLevelDiscount]), due_date: Time | nil, @@ -433,24 +433,24 @@ def test_pay invoice_date: Time, invoice_number: String, invoice_pdf: String | nil, - invoice_source: Orb::Models::InvoiceModel::InvoiceSource, + invoice_source: Orb::Models::Invoice::InvoiceSource, issue_failed_at: Time | nil, issued_at: Time | nil, - line_items: ^(Orb::ArrayOf[Orb::Models::InvoiceLineItemModel]), - maximum: Orb::Models::MaximumModel | nil, + line_items: ^(Orb::ArrayOf[Orb::Models::Invoice::LineItem]), + maximum: Orb::Models::Invoice::Maximum | nil, maximum_amount: String | nil, memo: String | nil, metadata: ^(Orb::HashOf[String]), - minimum: Orb::Models::MinimumModel | nil, + minimum: Orb::Models::Invoice::Minimum | nil, minimum_amount: String | nil, paid_at: Time | nil, - payment_attempts: ^(Orb::ArrayOf[Orb::Models::PaymentAttemptModel]), + payment_attempts: ^(Orb::ArrayOf[Orb::Models::Invoice::PaymentAttempt]), payment_failed_at: Time | nil, payment_started_at: Time | nil, scheduled_issue_at: Time | nil, - shipping_address: Orb::Models::AddressModel | nil, - status: Orb::Models::InvoiceModel::Status, - subscription: Orb::Models::SubscriptionMinifiedModel | nil, + shipping_address: Orb::Models::Invoice::ShippingAddress | nil, + status: Orb::Models::Invoice::Status, + subscription: Orb::Models::Invoice::Subscription | nil, subtotal: String, sync_failed_at: Time | nil, total: String, @@ -464,21 +464,21 @@ def test_void response = @orb.invoices.void("invoice_id") assert_pattern do - response => Orb::Models::InvoiceModel + response => Orb::Models::Invoice end assert_pattern do response => { id: String, amount_due: String, - auto_collection: Orb::Models::AutoCollectionModel, - billing_address: Orb::Models::AddressModel | nil, + auto_collection: Orb::Models::Invoice::AutoCollection, + billing_address: Orb::Models::Invoice::BillingAddress | nil, created_at: Time, - credit_notes: ^(Orb::ArrayOf[Orb::Models::CreditNoteSummaryModel]), + credit_notes: ^(Orb::ArrayOf[Orb::Models::Invoice::CreditNote]), currency: String, - customer: Orb::Models::CustomerMinifiedModel, - customer_balance_transactions: ^(Orb::ArrayOf[Orb::Models::CustomerBalanceTransactionModel]), - customer_tax_id: Orb::Models::CustomerTaxIDModel | nil, + customer: Orb::Models::Invoice::Customer, + customer_balance_transactions: ^(Orb::ArrayOf[Orb::Models::Invoice::CustomerBalanceTransaction]), + customer_tax_id: Orb::Models::Invoice::CustomerTaxID | nil, discount: Orb::Unknown, discounts: ^(Orb::ArrayOf[union: Orb::Models::InvoiceLevelDiscount]), due_date: Time | nil, @@ -487,24 +487,24 @@ def test_void invoice_date: Time, invoice_number: String, invoice_pdf: String | nil, - invoice_source: Orb::Models::InvoiceModel::InvoiceSource, + invoice_source: Orb::Models::Invoice::InvoiceSource, issue_failed_at: Time | nil, issued_at: Time | nil, - line_items: ^(Orb::ArrayOf[Orb::Models::InvoiceLineItemModel]), - maximum: Orb::Models::MaximumModel | nil, + line_items: ^(Orb::ArrayOf[Orb::Models::Invoice::LineItem]), + maximum: Orb::Models::Invoice::Maximum | nil, maximum_amount: String | nil, memo: String | nil, metadata: ^(Orb::HashOf[String]), - minimum: Orb::Models::MinimumModel | nil, + minimum: Orb::Models::Invoice::Minimum | nil, minimum_amount: String | nil, paid_at: Time | nil, - payment_attempts: ^(Orb::ArrayOf[Orb::Models::PaymentAttemptModel]), + payment_attempts: ^(Orb::ArrayOf[Orb::Models::Invoice::PaymentAttempt]), payment_failed_at: Time | nil, payment_started_at: Time | nil, scheduled_issue_at: Time | nil, - shipping_address: Orb::Models::AddressModel | nil, - status: Orb::Models::InvoiceModel::Status, - subscription: Orb::Models::SubscriptionMinifiedModel | nil, + shipping_address: Orb::Models::Invoice::ShippingAddress | nil, + status: Orb::Models::Invoice::Status, + subscription: Orb::Models::Invoice::Subscription | nil, subtotal: String, sync_failed_at: Time | nil, total: String, diff --git a/test/orb/resources/items_test.rb b/test/orb/resources/items_test.rb index baa13a05..c1d9f263 100644 --- a/test/orb/resources/items_test.rb +++ b/test/orb/resources/items_test.rb @@ -7,14 +7,14 @@ def test_create_required_params response = @orb.items.create(name: "API requests") assert_pattern do - response => Orb::Models::ItemModel + response => Orb::Models::Item end assert_pattern do response => { id: String, created_at: Time, - external_connections: ^(Orb::ArrayOf[Orb::Models::ItemExternalConnectionModel]), + external_connections: ^(Orb::ArrayOf[Orb::Models::Item::ExternalConnection]), name: String } end @@ -24,14 +24,14 @@ def test_update response = @orb.items.update("item_id") assert_pattern do - response => Orb::Models::ItemModel + response => Orb::Models::Item end assert_pattern do response => { id: String, created_at: Time, - external_connections: ^(Orb::ArrayOf[Orb::Models::ItemExternalConnectionModel]), + external_connections: ^(Orb::ArrayOf[Orb::Models::Item::ExternalConnection]), name: String } end @@ -51,14 +51,14 @@ def test_list row = response.to_enum.first assert_pattern do - row => Orb::Models::ItemModel + row => Orb::Models::Item end assert_pattern do row => { id: String, created_at: Time, - external_connections: ^(Orb::ArrayOf[Orb::Models::ItemExternalConnectionModel]), + external_connections: ^(Orb::ArrayOf[Orb::Models::Item::ExternalConnection]), name: String } end @@ -68,14 +68,14 @@ def test_fetch response = @orb.items.fetch("item_id") assert_pattern do - response => Orb::Models::ItemModel + response => Orb::Models::Item end assert_pattern do response => { id: String, created_at: Time, - external_connections: ^(Orb::ArrayOf[Orb::Models::ItemExternalConnectionModel]), + external_connections: ^(Orb::ArrayOf[Orb::Models::Item::ExternalConnection]), name: String } end diff --git a/test/orb/resources/metrics_test.rb b/test/orb/resources/metrics_test.rb index 67133015..0d9e8664 100644 --- a/test/orb/resources/metrics_test.rb +++ b/test/orb/resources/metrics_test.rb @@ -12,17 +12,17 @@ def test_create_required_params ) assert_pattern do - response => Orb::Models::BillableMetricModel + response => Orb::Models::BillableMetric end assert_pattern do response => { id: String, description: String | nil, - item: Orb::Models::ItemModel, + item: Orb::Models::Item, metadata: ^(Orb::HashOf[String]), name: String, - status: Orb::Models::BillableMetricModel::Status + status: Orb::Models::BillableMetric::Status } end end @@ -31,17 +31,17 @@ def test_update response = @orb.metrics.update("metric_id") assert_pattern do - response => Orb::Models::BillableMetricModel + response => Orb::Models::BillableMetric end assert_pattern do response => { id: String, description: String | nil, - item: Orb::Models::ItemModel, + item: Orb::Models::Item, metadata: ^(Orb::HashOf[String]), name: String, - status: Orb::Models::BillableMetricModel::Status + status: Orb::Models::BillableMetric::Status } end end @@ -60,17 +60,17 @@ def test_list row = response.to_enum.first assert_pattern do - row => Orb::Models::BillableMetricModel + row => Orb::Models::BillableMetric end assert_pattern do row => { id: String, description: String | nil, - item: Orb::Models::ItemModel, + item: Orb::Models::Item, metadata: ^(Orb::HashOf[String]), name: String, - status: Orb::Models::BillableMetricModel::Status + status: Orb::Models::BillableMetric::Status } end end @@ -79,17 +79,17 @@ def test_fetch response = @orb.metrics.fetch("metric_id") assert_pattern do - response => Orb::Models::BillableMetricModel + response => Orb::Models::BillableMetric end assert_pattern do response => { id: String, description: String | nil, - item: Orb::Models::ItemModel, + item: Orb::Models::Item, metadata: ^(Orb::HashOf[String]), name: String, - status: Orb::Models::BillableMetricModel::Status + status: Orb::Models::BillableMetric::Status } end end diff --git a/test/orb/resources/plans/external_plan_id_test.rb b/test/orb/resources/plans/external_plan_id_test.rb index 7dd53aff..c52144f5 100644 --- a/test/orb/resources/plans/external_plan_id_test.rb +++ b/test/orb/resources/plans/external_plan_id_test.rb @@ -7,14 +7,14 @@ def test_update response = @orb.plans.external_plan_id.update("external_plan_id") assert_pattern do - response => Orb::Models::PlanModel + response => Orb::Models::Plan end assert_pattern do response => { id: String, - adjustments: ^(Orb::ArrayOf[union: Orb::Models::AdjustmentModel]), - base_plan: Orb::Models::PlanMinifiedModel | nil, + adjustments: ^(Orb::ArrayOf[union: Orb::Models::Plan::Adjustment]), + base_plan: Orb::Models::Plan::BasePlan | nil, base_plan_id: String | nil, created_at: Time, currency: String, @@ -23,18 +23,18 @@ def test_update discount: Orb::Models::Discount | nil, external_plan_id: String | nil, invoicing_currency: String, - maximum: Orb::Models::MaximumModel | nil, + maximum: Orb::Models::Plan::Maximum | nil, maximum_amount: String | nil, metadata: ^(Orb::HashOf[String]), - minimum: Orb::Models::MinimumModel | nil, + minimum: Orb::Models::Plan::Minimum | nil, minimum_amount: String | nil, name: String, net_terms: Integer | nil, - plan_phases: ^(Orb::ArrayOf[Orb::Models::PlanModel::PlanPhase]) | nil, - prices: ^(Orb::ArrayOf[union: Orb::Models::PriceModel]), - product: Orb::Models::PlanModel::Product, - status: Orb::Models::PlanModel::Status, - trial_config: Orb::Models::PlanModel::TrialConfig, + plan_phases: ^(Orb::ArrayOf[Orb::Models::Plan::PlanPhase]) | nil, + prices: ^(Orb::ArrayOf[union: Orb::Models::Price]), + product: Orb::Models::Plan::Product, + status: Orb::Models::Plan::Status, + trial_config: Orb::Models::Plan::TrialConfig, version: Integer } end @@ -44,14 +44,14 @@ def test_fetch response = @orb.plans.external_plan_id.fetch("external_plan_id") assert_pattern do - response => Orb::Models::PlanModel + response => Orb::Models::Plan end assert_pattern do response => { id: String, - adjustments: ^(Orb::ArrayOf[union: Orb::Models::AdjustmentModel]), - base_plan: Orb::Models::PlanMinifiedModel | nil, + adjustments: ^(Orb::ArrayOf[union: Orb::Models::Plan::Adjustment]), + base_plan: Orb::Models::Plan::BasePlan | nil, base_plan_id: String | nil, created_at: Time, currency: String, @@ -60,18 +60,18 @@ def test_fetch discount: Orb::Models::Discount | nil, external_plan_id: String | nil, invoicing_currency: String, - maximum: Orb::Models::MaximumModel | nil, + maximum: Orb::Models::Plan::Maximum | nil, maximum_amount: String | nil, metadata: ^(Orb::HashOf[String]), - minimum: Orb::Models::MinimumModel | nil, + minimum: Orb::Models::Plan::Minimum | nil, minimum_amount: String | nil, name: String, net_terms: Integer | nil, - plan_phases: ^(Orb::ArrayOf[Orb::Models::PlanModel::PlanPhase]) | nil, - prices: ^(Orb::ArrayOf[union: Orb::Models::PriceModel]), - product: Orb::Models::PlanModel::Product, - status: Orb::Models::PlanModel::Status, - trial_config: Orb::Models::PlanModel::TrialConfig, + plan_phases: ^(Orb::ArrayOf[Orb::Models::Plan::PlanPhase]) | nil, + prices: ^(Orb::ArrayOf[union: Orb::Models::Price]), + product: Orb::Models::Plan::Product, + status: Orb::Models::Plan::Status, + trial_config: Orb::Models::Plan::TrialConfig, version: Integer } end diff --git a/test/orb/resources/plans_test.rb b/test/orb/resources/plans_test.rb index fed5b7e3..b5a5a3e7 100644 --- a/test/orb/resources/plans_test.rb +++ b/test/orb/resources/plans_test.rb @@ -19,14 +19,14 @@ def test_create_required_params ) assert_pattern do - response => Orb::Models::PlanModel + response => Orb::Models::Plan end assert_pattern do response => { id: String, - adjustments: ^(Orb::ArrayOf[union: Orb::Models::AdjustmentModel]), - base_plan: Orb::Models::PlanMinifiedModel | nil, + adjustments: ^(Orb::ArrayOf[union: Orb::Models::Plan::Adjustment]), + base_plan: Orb::Models::Plan::BasePlan | nil, base_plan_id: String | nil, created_at: Time, currency: String, @@ -35,18 +35,18 @@ def test_create_required_params discount: Orb::Models::Discount | nil, external_plan_id: String | nil, invoicing_currency: String, - maximum: Orb::Models::MaximumModel | nil, + maximum: Orb::Models::Plan::Maximum | nil, maximum_amount: String | nil, metadata: ^(Orb::HashOf[String]), - minimum: Orb::Models::MinimumModel | nil, + minimum: Orb::Models::Plan::Minimum | nil, minimum_amount: String | nil, name: String, net_terms: Integer | nil, - plan_phases: ^(Orb::ArrayOf[Orb::Models::PlanModel::PlanPhase]) | nil, - prices: ^(Orb::ArrayOf[union: Orb::Models::PriceModel]), - product: Orb::Models::PlanModel::Product, - status: Orb::Models::PlanModel::Status, - trial_config: Orb::Models::PlanModel::TrialConfig, + plan_phases: ^(Orb::ArrayOf[Orb::Models::Plan::PlanPhase]) | nil, + prices: ^(Orb::ArrayOf[union: Orb::Models::Price]), + product: Orb::Models::Plan::Product, + status: Orb::Models::Plan::Status, + trial_config: Orb::Models::Plan::TrialConfig, version: Integer } end @@ -56,14 +56,14 @@ def test_update response = @orb.plans.update("plan_id") assert_pattern do - response => Orb::Models::PlanModel + response => Orb::Models::Plan end assert_pattern do response => { id: String, - adjustments: ^(Orb::ArrayOf[union: Orb::Models::AdjustmentModel]), - base_plan: Orb::Models::PlanMinifiedModel | nil, + adjustments: ^(Orb::ArrayOf[union: Orb::Models::Plan::Adjustment]), + base_plan: Orb::Models::Plan::BasePlan | nil, base_plan_id: String | nil, created_at: Time, currency: String, @@ -72,18 +72,18 @@ def test_update discount: Orb::Models::Discount | nil, external_plan_id: String | nil, invoicing_currency: String, - maximum: Orb::Models::MaximumModel | nil, + maximum: Orb::Models::Plan::Maximum | nil, maximum_amount: String | nil, metadata: ^(Orb::HashOf[String]), - minimum: Orb::Models::MinimumModel | nil, + minimum: Orb::Models::Plan::Minimum | nil, minimum_amount: String | nil, name: String, net_terms: Integer | nil, - plan_phases: ^(Orb::ArrayOf[Orb::Models::PlanModel::PlanPhase]) | nil, - prices: ^(Orb::ArrayOf[union: Orb::Models::PriceModel]), - product: Orb::Models::PlanModel::Product, - status: Orb::Models::PlanModel::Status, - trial_config: Orb::Models::PlanModel::TrialConfig, + plan_phases: ^(Orb::ArrayOf[Orb::Models::Plan::PlanPhase]) | nil, + prices: ^(Orb::ArrayOf[union: Orb::Models::Price]), + product: Orb::Models::Plan::Product, + status: Orb::Models::Plan::Status, + trial_config: Orb::Models::Plan::TrialConfig, version: Integer } end @@ -103,14 +103,14 @@ def test_list row = response.to_enum.first assert_pattern do - row => Orb::Models::PlanModel + row => Orb::Models::Plan end assert_pattern do row => { id: String, - adjustments: ^(Orb::ArrayOf[union: Orb::Models::AdjustmentModel]), - base_plan: Orb::Models::PlanMinifiedModel | nil, + adjustments: ^(Orb::ArrayOf[union: Orb::Models::Plan::Adjustment]), + base_plan: Orb::Models::Plan::BasePlan | nil, base_plan_id: String | nil, created_at: Time, currency: String, @@ -119,18 +119,18 @@ def test_list discount: Orb::Models::Discount | nil, external_plan_id: String | nil, invoicing_currency: String, - maximum: Orb::Models::MaximumModel | nil, + maximum: Orb::Models::Plan::Maximum | nil, maximum_amount: String | nil, metadata: ^(Orb::HashOf[String]), - minimum: Orb::Models::MinimumModel | nil, + minimum: Orb::Models::Plan::Minimum | nil, minimum_amount: String | nil, name: String, net_terms: Integer | nil, - plan_phases: ^(Orb::ArrayOf[Orb::Models::PlanModel::PlanPhase]) | nil, - prices: ^(Orb::ArrayOf[union: Orb::Models::PriceModel]), - product: Orb::Models::PlanModel::Product, - status: Orb::Models::PlanModel::Status, - trial_config: Orb::Models::PlanModel::TrialConfig, + plan_phases: ^(Orb::ArrayOf[Orb::Models::Plan::PlanPhase]) | nil, + prices: ^(Orb::ArrayOf[union: Orb::Models::Price]), + product: Orb::Models::Plan::Product, + status: Orb::Models::Plan::Status, + trial_config: Orb::Models::Plan::TrialConfig, version: Integer } end @@ -140,14 +140,14 @@ def test_fetch response = @orb.plans.fetch("plan_id") assert_pattern do - response => Orb::Models::PlanModel + response => Orb::Models::Plan end assert_pattern do response => { id: String, - adjustments: ^(Orb::ArrayOf[union: Orb::Models::AdjustmentModel]), - base_plan: Orb::Models::PlanMinifiedModel | nil, + adjustments: ^(Orb::ArrayOf[union: Orb::Models::Plan::Adjustment]), + base_plan: Orb::Models::Plan::BasePlan | nil, base_plan_id: String | nil, created_at: Time, currency: String, @@ -156,18 +156,18 @@ def test_fetch discount: Orb::Models::Discount | nil, external_plan_id: String | nil, invoicing_currency: String, - maximum: Orb::Models::MaximumModel | nil, + maximum: Orb::Models::Plan::Maximum | nil, maximum_amount: String | nil, metadata: ^(Orb::HashOf[String]), - minimum: Orb::Models::MinimumModel | nil, + minimum: Orb::Models::Plan::Minimum | nil, minimum_amount: String | nil, name: String, net_terms: Integer | nil, - plan_phases: ^(Orb::ArrayOf[Orb::Models::PlanModel::PlanPhase]) | nil, - prices: ^(Orb::ArrayOf[union: Orb::Models::PriceModel]), - product: Orb::Models::PlanModel::Product, - status: Orb::Models::PlanModel::Status, - trial_config: Orb::Models::PlanModel::TrialConfig, + plan_phases: ^(Orb::ArrayOf[Orb::Models::Plan::PlanPhase]) | nil, + prices: ^(Orb::ArrayOf[union: Orb::Models::Price]), + product: Orb::Models::Plan::Product, + status: Orb::Models::Plan::Status, + trial_config: Orb::Models::Plan::TrialConfig, version: Integer } end diff --git a/test/orb/resources/prices/external_price_id_test.rb b/test/orb/resources/prices/external_price_id_test.rb index d518ac58..070062e2 100644 --- a/test/orb/resources/prices/external_price_id_test.rb +++ b/test/orb/resources/prices/external_price_id_test.rb @@ -7,7 +7,7 @@ def test_update response = @orb.prices.external_price_id.update("external_price_id") assert_pattern do - response => Orb::Models::PriceModel + response => Orb::Models::Price end end @@ -15,7 +15,7 @@ def test_fetch response = @orb.prices.external_price_id.fetch("external_price_id") assert_pattern do - response => Orb::Models::PriceModel + response => Orb::Models::Price end end end diff --git a/test/orb/resources/prices_test.rb b/test/orb/resources/prices_test.rb index bea475bb..25a715cd 100644 --- a/test/orb/resources/prices_test.rb +++ b/test/orb/resources/prices_test.rb @@ -14,7 +14,7 @@ def test_create_required_params ) assert_pattern do - response => Orb::Models::PriceModel + response => Orb::Models::Price end end @@ -22,7 +22,7 @@ def test_update response = @orb.prices.update("price_id") assert_pattern do - response => Orb::Models::PriceModel + response => Orb::Models::Price end end @@ -40,7 +40,7 @@ def test_list row = response.to_enum.first assert_pattern do - row => Orb::Models::PriceModel + row => Orb::Models::Price end end @@ -66,7 +66,7 @@ def test_fetch response = @orb.prices.fetch("price_id") assert_pattern do - response => Orb::Models::PriceModel + response => Orb::Models::Price end end end diff --git a/test/orb/resources/subscriptions_test.rb b/test/orb/resources/subscriptions_test.rb index c74713f3..0b924d6d 100644 --- a/test/orb/resources/subscriptions_test.rb +++ b/test/orb/resources/subscriptions_test.rb @@ -7,36 +7,36 @@ def test_create response = @orb.subscriptions.create assert_pattern do - response => Orb::Models::MutatedSubscriptionModel + response => Orb::Models::SubscriptionCreateResponse end assert_pattern do response => { id: String, active_plan_phase_order: Integer | nil, - adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::AdjustmentIntervalModel]), + adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionCreateResponse::AdjustmentInterval]), auto_collection: Orb::BooleanModel | nil, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionCreateResponse::BillingCycleAnchorConfiguration, billing_cycle_day: Integer, created_at: Time, current_billing_period_end_date: Time | nil, current_billing_period_start_date: Time | nil, - customer: Orb::Models::CustomerModel, + customer: Orb::Models::Customer, default_invoice_memo: String | nil, - discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::MutatedSubscriptionModel::DiscountInterval]), + discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::SubscriptionCreateResponse::DiscountInterval]), end_date: Time | nil, - fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::FixedFeeQuantityScheduleEntryModel]), + fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::SubscriptionCreateResponse::FixedFeeQuantitySchedule]), invoicing_threshold: String | nil, - maximum_intervals: ^(Orb::ArrayOf[Orb::Models::MaximumIntervalModel]), + maximum_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionCreateResponse::MaximumInterval]), metadata: ^(Orb::HashOf[String]), - minimum_intervals: ^(Orb::ArrayOf[Orb::Models::MinimumIntervalModel]), + minimum_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionCreateResponse::MinimumInterval]), net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: ^(Orb::ArrayOf[Orb::Models::PriceIntervalModel]), - redeemed_coupon: Orb::Models::CouponRedemptionModel | nil, + plan: Orb::Models::Plan, + price_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionCreateResponse::PriceInterval]), + redeemed_coupon: Orb::Models::SubscriptionCreateResponse::RedeemedCoupon | nil, start_date: Time, - status: Orb::Models::MutatedSubscriptionModel::Status, - trial_info: Orb::Models::SubscriptionTrialInfoModel + status: Orb::Models::SubscriptionCreateResponse::Status, + trial_info: Orb::Models::SubscriptionCreateResponse::TrialInfo } end end @@ -45,36 +45,36 @@ def test_update response = @orb.subscriptions.update("subscription_id") assert_pattern do - response => Orb::Models::SubscriptionModel + response => Orb::Models::Subscription end assert_pattern do response => { id: String, active_plan_phase_order: Integer | nil, - adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::AdjustmentIntervalModel]), + adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::Subscription::AdjustmentInterval]), auto_collection: Orb::BooleanModel | nil, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, + billing_cycle_anchor_configuration: Orb::Models::Subscription::BillingCycleAnchorConfiguration, billing_cycle_day: Integer, created_at: Time, current_billing_period_end_date: Time | nil, current_billing_period_start_date: Time | nil, - customer: Orb::Models::CustomerModel, + customer: Orb::Models::Customer, default_invoice_memo: String | nil, - discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::SubscriptionModel::DiscountInterval]), + discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::Subscription::DiscountInterval]), end_date: Time | nil, - fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::FixedFeeQuantityScheduleEntryModel]), + fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::Subscription::FixedFeeQuantitySchedule]), invoicing_threshold: String | nil, - maximum_intervals: ^(Orb::ArrayOf[Orb::Models::MaximumIntervalModel]), + maximum_intervals: ^(Orb::ArrayOf[Orb::Models::Subscription::MaximumInterval]), metadata: ^(Orb::HashOf[String]), - minimum_intervals: ^(Orb::ArrayOf[Orb::Models::MinimumIntervalModel]), + minimum_intervals: ^(Orb::ArrayOf[Orb::Models::Subscription::MinimumInterval]), net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: ^(Orb::ArrayOf[Orb::Models::PriceIntervalModel]), - redeemed_coupon: Orb::Models::CouponRedemptionModel | nil, + plan: Orb::Models::Plan, + price_intervals: ^(Orb::ArrayOf[Orb::Models::Subscription::PriceInterval]), + redeemed_coupon: Orb::Models::Subscription::RedeemedCoupon | nil, start_date: Time, - status: Orb::Models::SubscriptionModel::Status, - trial_info: Orb::Models::SubscriptionTrialInfoModel + status: Orb::Models::Subscription::Status, + trial_info: Orb::Models::Subscription::TrialInfo } end end @@ -93,36 +93,36 @@ def test_list row = response.to_enum.first assert_pattern do - row => Orb::Models::SubscriptionModel + row => Orb::Models::Subscription end assert_pattern do row => { id: String, active_plan_phase_order: Integer | nil, - adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::AdjustmentIntervalModel]), + adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::Subscription::AdjustmentInterval]), auto_collection: Orb::BooleanModel | nil, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, + billing_cycle_anchor_configuration: Orb::Models::Subscription::BillingCycleAnchorConfiguration, billing_cycle_day: Integer, created_at: Time, current_billing_period_end_date: Time | nil, current_billing_period_start_date: Time | nil, - customer: Orb::Models::CustomerModel, + customer: Orb::Models::Customer, default_invoice_memo: String | nil, - discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::SubscriptionModel::DiscountInterval]), + discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::Subscription::DiscountInterval]), end_date: Time | nil, - fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::FixedFeeQuantityScheduleEntryModel]), + fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::Subscription::FixedFeeQuantitySchedule]), invoicing_threshold: String | nil, - maximum_intervals: ^(Orb::ArrayOf[Orb::Models::MaximumIntervalModel]), + maximum_intervals: ^(Orb::ArrayOf[Orb::Models::Subscription::MaximumInterval]), metadata: ^(Orb::HashOf[String]), - minimum_intervals: ^(Orb::ArrayOf[Orb::Models::MinimumIntervalModel]), + minimum_intervals: ^(Orb::ArrayOf[Orb::Models::Subscription::MinimumInterval]), net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: ^(Orb::ArrayOf[Orb::Models::PriceIntervalModel]), - redeemed_coupon: Orb::Models::CouponRedemptionModel | nil, + plan: Orb::Models::Plan, + price_intervals: ^(Orb::ArrayOf[Orb::Models::Subscription::PriceInterval]), + redeemed_coupon: Orb::Models::Subscription::RedeemedCoupon | nil, start_date: Time, - status: Orb::Models::SubscriptionModel::Status, - trial_info: Orb::Models::SubscriptionTrialInfoModel + status: Orb::Models::Subscription::Status, + trial_info: Orb::Models::Subscription::TrialInfo } end end @@ -131,36 +131,36 @@ def test_cancel_required_params response = @orb.subscriptions.cancel("subscription_id", cancel_option: :end_of_subscription_term) assert_pattern do - response => Orb::Models::MutatedSubscriptionModel + response => Orb::Models::SubscriptionCancelResponse end assert_pattern do response => { id: String, active_plan_phase_order: Integer | nil, - adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::AdjustmentIntervalModel]), + adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionCancelResponse::AdjustmentInterval]), auto_collection: Orb::BooleanModel | nil, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionCancelResponse::BillingCycleAnchorConfiguration, billing_cycle_day: Integer, created_at: Time, current_billing_period_end_date: Time | nil, current_billing_period_start_date: Time | nil, - customer: Orb::Models::CustomerModel, + customer: Orb::Models::Customer, default_invoice_memo: String | nil, - discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::MutatedSubscriptionModel::DiscountInterval]), + discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::SubscriptionCancelResponse::DiscountInterval]), end_date: Time | nil, - fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::FixedFeeQuantityScheduleEntryModel]), + fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::SubscriptionCancelResponse::FixedFeeQuantitySchedule]), invoicing_threshold: String | nil, - maximum_intervals: ^(Orb::ArrayOf[Orb::Models::MaximumIntervalModel]), + maximum_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionCancelResponse::MaximumInterval]), metadata: ^(Orb::HashOf[String]), - minimum_intervals: ^(Orb::ArrayOf[Orb::Models::MinimumIntervalModel]), + minimum_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionCancelResponse::MinimumInterval]), net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: ^(Orb::ArrayOf[Orb::Models::PriceIntervalModel]), - redeemed_coupon: Orb::Models::CouponRedemptionModel | nil, + plan: Orb::Models::Plan, + price_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionCancelResponse::PriceInterval]), + redeemed_coupon: Orb::Models::SubscriptionCancelResponse::RedeemedCoupon | nil, start_date: Time, - status: Orb::Models::MutatedSubscriptionModel::Status, - trial_info: Orb::Models::SubscriptionTrialInfoModel + status: Orb::Models::SubscriptionCancelResponse::Status, + trial_info: Orb::Models::SubscriptionCancelResponse::TrialInfo } end end @@ -169,36 +169,36 @@ def test_fetch response = @orb.subscriptions.fetch("subscription_id") assert_pattern do - response => Orb::Models::SubscriptionModel + response => Orb::Models::Subscription end assert_pattern do response => { id: String, active_plan_phase_order: Integer | nil, - adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::AdjustmentIntervalModel]), + adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::Subscription::AdjustmentInterval]), auto_collection: Orb::BooleanModel | nil, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, + billing_cycle_anchor_configuration: Orb::Models::Subscription::BillingCycleAnchorConfiguration, billing_cycle_day: Integer, created_at: Time, current_billing_period_end_date: Time | nil, current_billing_period_start_date: Time | nil, - customer: Orb::Models::CustomerModel, + customer: Orb::Models::Customer, default_invoice_memo: String | nil, - discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::SubscriptionModel::DiscountInterval]), + discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::Subscription::DiscountInterval]), end_date: Time | nil, - fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::FixedFeeQuantityScheduleEntryModel]), + fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::Subscription::FixedFeeQuantitySchedule]), invoicing_threshold: String | nil, - maximum_intervals: ^(Orb::ArrayOf[Orb::Models::MaximumIntervalModel]), + maximum_intervals: ^(Orb::ArrayOf[Orb::Models::Subscription::MaximumInterval]), metadata: ^(Orb::HashOf[String]), - minimum_intervals: ^(Orb::ArrayOf[Orb::Models::MinimumIntervalModel]), + minimum_intervals: ^(Orb::ArrayOf[Orb::Models::Subscription::MinimumInterval]), net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: ^(Orb::ArrayOf[Orb::Models::PriceIntervalModel]), - redeemed_coupon: Orb::Models::CouponRedemptionModel | nil, + plan: Orb::Models::Plan, + price_intervals: ^(Orb::ArrayOf[Orb::Models::Subscription::PriceInterval]), + redeemed_coupon: Orb::Models::Subscription::RedeemedCoupon | nil, start_date: Time, - status: Orb::Models::SubscriptionModel::Status, - trial_info: Orb::Models::SubscriptionTrialInfoModel + status: Orb::Models::Subscription::Status, + trial_info: Orb::Models::Subscription::TrialInfo } end end @@ -212,7 +212,7 @@ def test_fetch_costs assert_pattern do response => { - data: ^(Orb::ArrayOf[Orb::Models::AggregatedCostModel]) + data: ^(Orb::ArrayOf[Orb::Models::SubscriptionFetchCostsResponse::Data]) } end end @@ -238,7 +238,7 @@ def test_fetch_schedule row => { created_at: Time, end_date: Time | nil, - plan: Orb::Models::PlanMinifiedModel, + plan: Orb::Models::SubscriptionFetchScheduleResponse::Plan, start_date: Time } end @@ -260,36 +260,36 @@ def test_price_intervals response = @orb.subscriptions.price_intervals("subscription_id") assert_pattern do - response => Orb::Models::MutatedSubscriptionModel + response => Orb::Models::SubscriptionPriceIntervalsResponse end assert_pattern do response => { id: String, active_plan_phase_order: Integer | nil, - adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::AdjustmentIntervalModel]), + adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval]), auto_collection: Orb::BooleanModel | nil, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionPriceIntervalsResponse::BillingCycleAnchorConfiguration, billing_cycle_day: Integer, created_at: Time, current_billing_period_end_date: Time | nil, current_billing_period_start_date: Time | nil, - customer: Orb::Models::CustomerModel, + customer: Orb::Models::Customer, default_invoice_memo: String | nil, - discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::MutatedSubscriptionModel::DiscountInterval]), + discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval]), end_date: Time | nil, - fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::FixedFeeQuantityScheduleEntryModel]), + fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::SubscriptionPriceIntervalsResponse::FixedFeeQuantitySchedule]), invoicing_threshold: String | nil, - maximum_intervals: ^(Orb::ArrayOf[Orb::Models::MaximumIntervalModel]), + maximum_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionPriceIntervalsResponse::MaximumInterval]), metadata: ^(Orb::HashOf[String]), - minimum_intervals: ^(Orb::ArrayOf[Orb::Models::MinimumIntervalModel]), + minimum_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionPriceIntervalsResponse::MinimumInterval]), net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: ^(Orb::ArrayOf[Orb::Models::PriceIntervalModel]), - redeemed_coupon: Orb::Models::CouponRedemptionModel | nil, + plan: Orb::Models::Plan, + price_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval]), + redeemed_coupon: Orb::Models::SubscriptionPriceIntervalsResponse::RedeemedCoupon | nil, start_date: Time, - status: Orb::Models::MutatedSubscriptionModel::Status, - trial_info: Orb::Models::SubscriptionTrialInfoModel + status: Orb::Models::SubscriptionPriceIntervalsResponse::Status, + trial_info: Orb::Models::SubscriptionPriceIntervalsResponse::TrialInfo } end end @@ -298,36 +298,36 @@ def test_schedule_plan_change_required_params response = @orb.subscriptions.schedule_plan_change("subscription_id", change_option: :requested_date) assert_pattern do - response => Orb::Models::MutatedSubscriptionModel + response => Orb::Models::SubscriptionSchedulePlanChangeResponse end assert_pattern do response => { id: String, active_plan_phase_order: Integer | nil, - adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::AdjustmentIntervalModel]), + adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval]), auto_collection: Orb::BooleanModel | nil, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionSchedulePlanChangeResponse::BillingCycleAnchorConfiguration, billing_cycle_day: Integer, created_at: Time, current_billing_period_end_date: Time | nil, current_billing_period_start_date: Time | nil, - customer: Orb::Models::CustomerModel, + customer: Orb::Models::Customer, default_invoice_memo: String | nil, - discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::MutatedSubscriptionModel::DiscountInterval]), + discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval]), end_date: Time | nil, - fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::FixedFeeQuantityScheduleEntryModel]), + fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::SubscriptionSchedulePlanChangeResponse::FixedFeeQuantitySchedule]), invoicing_threshold: String | nil, - maximum_intervals: ^(Orb::ArrayOf[Orb::Models::MaximumIntervalModel]), + maximum_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionSchedulePlanChangeResponse::MaximumInterval]), metadata: ^(Orb::HashOf[String]), - minimum_intervals: ^(Orb::ArrayOf[Orb::Models::MinimumIntervalModel]), + minimum_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionSchedulePlanChangeResponse::MinimumInterval]), net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: ^(Orb::ArrayOf[Orb::Models::PriceIntervalModel]), - redeemed_coupon: Orb::Models::CouponRedemptionModel | nil, + plan: Orb::Models::Plan, + price_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval]), + redeemed_coupon: Orb::Models::SubscriptionSchedulePlanChangeResponse::RedeemedCoupon | nil, start_date: Time, - status: Orb::Models::MutatedSubscriptionModel::Status, - trial_info: Orb::Models::SubscriptionTrialInfoModel + status: Orb::Models::SubscriptionSchedulePlanChangeResponse::Status, + trial_info: Orb::Models::SubscriptionSchedulePlanChangeResponse::TrialInfo } end end @@ -336,36 +336,36 @@ def test_trigger_phase response = @orb.subscriptions.trigger_phase("subscription_id") assert_pattern do - response => Orb::Models::MutatedSubscriptionModel + response => Orb::Models::SubscriptionTriggerPhaseResponse end assert_pattern do response => { id: String, active_plan_phase_order: Integer | nil, - adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::AdjustmentIntervalModel]), + adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval]), auto_collection: Orb::BooleanModel | nil, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration, billing_cycle_day: Integer, created_at: Time, current_billing_period_end_date: Time | nil, current_billing_period_start_date: Time | nil, - customer: Orb::Models::CustomerModel, + customer: Orb::Models::Customer, default_invoice_memo: String | nil, - discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::MutatedSubscriptionModel::DiscountInterval]), + discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval]), end_date: Time | nil, - fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::FixedFeeQuantityScheduleEntryModel]), + fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::SubscriptionTriggerPhaseResponse::FixedFeeQuantitySchedule]), invoicing_threshold: String | nil, - maximum_intervals: ^(Orb::ArrayOf[Orb::Models::MaximumIntervalModel]), + maximum_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionTriggerPhaseResponse::MaximumInterval]), metadata: ^(Orb::HashOf[String]), - minimum_intervals: ^(Orb::ArrayOf[Orb::Models::MinimumIntervalModel]), + minimum_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionTriggerPhaseResponse::MinimumInterval]), net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: ^(Orb::ArrayOf[Orb::Models::PriceIntervalModel]), - redeemed_coupon: Orb::Models::CouponRedemptionModel | nil, + plan: Orb::Models::Plan, + price_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval]), + redeemed_coupon: Orb::Models::SubscriptionTriggerPhaseResponse::RedeemedCoupon | nil, start_date: Time, - status: Orb::Models::MutatedSubscriptionModel::Status, - trial_info: Orb::Models::SubscriptionTrialInfoModel + status: Orb::Models::SubscriptionTriggerPhaseResponse::Status, + trial_info: Orb::Models::SubscriptionTriggerPhaseResponse::TrialInfo } end end @@ -374,36 +374,36 @@ def test_unschedule_cancellation response = @orb.subscriptions.unschedule_cancellation("subscription_id") assert_pattern do - response => Orb::Models::MutatedSubscriptionModel + response => Orb::Models::SubscriptionUnscheduleCancellationResponse end assert_pattern do response => { id: String, active_plan_phase_order: Integer | nil, - adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::AdjustmentIntervalModel]), + adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval]), auto_collection: Orb::BooleanModel | nil, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUnscheduleCancellationResponse::BillingCycleAnchorConfiguration, billing_cycle_day: Integer, created_at: Time, current_billing_period_end_date: Time | nil, current_billing_period_start_date: Time | nil, - customer: Orb::Models::CustomerModel, + customer: Orb::Models::Customer, default_invoice_memo: String | nil, - discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::MutatedSubscriptionModel::DiscountInterval]), + discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval]), end_date: Time | nil, - fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::FixedFeeQuantityScheduleEntryModel]), + fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::SubscriptionUnscheduleCancellationResponse::FixedFeeQuantitySchedule]), invoicing_threshold: String | nil, - maximum_intervals: ^(Orb::ArrayOf[Orb::Models::MaximumIntervalModel]), + maximum_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionUnscheduleCancellationResponse::MaximumInterval]), metadata: ^(Orb::HashOf[String]), - minimum_intervals: ^(Orb::ArrayOf[Orb::Models::MinimumIntervalModel]), + minimum_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionUnscheduleCancellationResponse::MinimumInterval]), net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: ^(Orb::ArrayOf[Orb::Models::PriceIntervalModel]), - redeemed_coupon: Orb::Models::CouponRedemptionModel | nil, + plan: Orb::Models::Plan, + price_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval]), + redeemed_coupon: Orb::Models::SubscriptionUnscheduleCancellationResponse::RedeemedCoupon | nil, start_date: Time, - status: Orb::Models::MutatedSubscriptionModel::Status, - trial_info: Orb::Models::SubscriptionTrialInfoModel + status: Orb::Models::SubscriptionUnscheduleCancellationResponse::Status, + trial_info: Orb::Models::SubscriptionUnscheduleCancellationResponse::TrialInfo } end end @@ -415,36 +415,36 @@ def test_unschedule_fixed_fee_quantity_updates_required_params ) assert_pattern do - response => Orb::Models::MutatedSubscriptionModel + response => Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse end assert_pattern do response => { id: String, active_plan_phase_order: Integer | nil, - adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::AdjustmentIntervalModel]), + adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval]), auto_collection: Orb::BooleanModel | nil, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::BillingCycleAnchorConfiguration, billing_cycle_day: Integer, created_at: Time, current_billing_period_end_date: Time | nil, current_billing_period_start_date: Time | nil, - customer: Orb::Models::CustomerModel, + customer: Orb::Models::Customer, default_invoice_memo: String | nil, - discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::MutatedSubscriptionModel::DiscountInterval]), + discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval]), end_date: Time | nil, - fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::FixedFeeQuantityScheduleEntryModel]), + fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::FixedFeeQuantitySchedule]), invoicing_threshold: String | nil, - maximum_intervals: ^(Orb::ArrayOf[Orb::Models::MaximumIntervalModel]), + maximum_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MaximumInterval]), metadata: ^(Orb::HashOf[String]), - minimum_intervals: ^(Orb::ArrayOf[Orb::Models::MinimumIntervalModel]), + minimum_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MinimumInterval]), net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: ^(Orb::ArrayOf[Orb::Models::PriceIntervalModel]), - redeemed_coupon: Orb::Models::CouponRedemptionModel | nil, + plan: Orb::Models::Plan, + price_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval]), + redeemed_coupon: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::RedeemedCoupon | nil, start_date: Time, - status: Orb::Models::MutatedSubscriptionModel::Status, - trial_info: Orb::Models::SubscriptionTrialInfoModel + status: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::Status, + trial_info: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::TrialInfo } end end @@ -453,36 +453,36 @@ def test_unschedule_pending_plan_changes response = @orb.subscriptions.unschedule_pending_plan_changes("subscription_id") assert_pattern do - response => Orb::Models::MutatedSubscriptionModel + response => Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse end assert_pattern do response => { id: String, active_plan_phase_order: Integer | nil, - adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::AdjustmentIntervalModel]), + adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval]), auto_collection: Orb::BooleanModel | nil, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::BillingCycleAnchorConfiguration, billing_cycle_day: Integer, created_at: Time, current_billing_period_end_date: Time | nil, current_billing_period_start_date: Time | nil, - customer: Orb::Models::CustomerModel, + customer: Orb::Models::Customer, default_invoice_memo: String | nil, - discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::MutatedSubscriptionModel::DiscountInterval]), + discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval]), end_date: Time | nil, - fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::FixedFeeQuantityScheduleEntryModel]), + fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::FixedFeeQuantitySchedule]), invoicing_threshold: String | nil, - maximum_intervals: ^(Orb::ArrayOf[Orb::Models::MaximumIntervalModel]), + maximum_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::MaximumInterval]), metadata: ^(Orb::HashOf[String]), - minimum_intervals: ^(Orb::ArrayOf[Orb::Models::MinimumIntervalModel]), + minimum_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::MinimumInterval]), net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: ^(Orb::ArrayOf[Orb::Models::PriceIntervalModel]), - redeemed_coupon: Orb::Models::CouponRedemptionModel | nil, + plan: Orb::Models::Plan, + price_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::PriceInterval]), + redeemed_coupon: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::RedeemedCoupon | nil, start_date: Time, - status: Orb::Models::MutatedSubscriptionModel::Status, - trial_info: Orb::Models::SubscriptionTrialInfoModel + status: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::Status, + trial_info: Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::TrialInfo } end end @@ -495,36 +495,36 @@ def test_update_fixed_fee_quantity_required_params ) assert_pattern do - response => Orb::Models::MutatedSubscriptionModel + response => Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse end assert_pattern do response => { id: String, active_plan_phase_order: Integer | nil, - adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::AdjustmentIntervalModel]), + adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval]), auto_collection: Orb::BooleanModel | nil, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::BillingCycleAnchorConfiguration, billing_cycle_day: Integer, created_at: Time, current_billing_period_end_date: Time | nil, current_billing_period_start_date: Time | nil, - customer: Orb::Models::CustomerModel, + customer: Orb::Models::Customer, default_invoice_memo: String | nil, - discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::MutatedSubscriptionModel::DiscountInterval]), + discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval]), end_date: Time | nil, - fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::FixedFeeQuantityScheduleEntryModel]), + fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::FixedFeeQuantitySchedule]), invoicing_threshold: String | nil, - maximum_intervals: ^(Orb::ArrayOf[Orb::Models::MaximumIntervalModel]), + maximum_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::MaximumInterval]), metadata: ^(Orb::HashOf[String]), - minimum_intervals: ^(Orb::ArrayOf[Orb::Models::MinimumIntervalModel]), + minimum_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::MinimumInterval]), net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: ^(Orb::ArrayOf[Orb::Models::PriceIntervalModel]), - redeemed_coupon: Orb::Models::CouponRedemptionModel | nil, + plan: Orb::Models::Plan, + price_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::PriceInterval]), + redeemed_coupon: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::RedeemedCoupon | nil, start_date: Time, - status: Orb::Models::MutatedSubscriptionModel::Status, - trial_info: Orb::Models::SubscriptionTrialInfoModel + status: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::Status, + trial_info: Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::TrialInfo } end end @@ -533,36 +533,36 @@ def test_update_trial_required_params response = @orb.subscriptions.update_trial("subscription_id", trial_end_date: "2017-07-21T17:32:28Z") assert_pattern do - response => Orb::Models::MutatedSubscriptionModel + response => Orb::Models::SubscriptionUpdateTrialResponse end assert_pattern do response => { id: String, active_plan_phase_order: Integer | nil, - adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::AdjustmentIntervalModel]), + adjustment_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval]), auto_collection: Orb::BooleanModel | nil, - billing_cycle_anchor_configuration: Orb::Models::BillingCycleAnchorConfigurationModel, + billing_cycle_anchor_configuration: Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration, billing_cycle_day: Integer, created_at: Time, current_billing_period_end_date: Time | nil, current_billing_period_start_date: Time | nil, - customer: Orb::Models::CustomerModel, + customer: Orb::Models::Customer, default_invoice_memo: String | nil, - discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::MutatedSubscriptionModel::DiscountInterval]), + discount_intervals: ^(Orb::ArrayOf[union: Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval]), end_date: Time | nil, - fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::FixedFeeQuantityScheduleEntryModel]), + fixed_fee_quantity_schedule: ^(Orb::ArrayOf[Orb::Models::SubscriptionUpdateTrialResponse::FixedFeeQuantitySchedule]), invoicing_threshold: String | nil, - maximum_intervals: ^(Orb::ArrayOf[Orb::Models::MaximumIntervalModel]), + maximum_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval]), metadata: ^(Orb::HashOf[String]), - minimum_intervals: ^(Orb::ArrayOf[Orb::Models::MinimumIntervalModel]), + minimum_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval]), net_terms: Integer, - plan: Orb::Models::PlanModel, - price_intervals: ^(Orb::ArrayOf[Orb::Models::PriceIntervalModel]), - redeemed_coupon: Orb::Models::CouponRedemptionModel | nil, + plan: Orb::Models::Plan, + price_intervals: ^(Orb::ArrayOf[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval]), + redeemed_coupon: Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon | nil, start_date: Time, - status: Orb::Models::MutatedSubscriptionModel::Status, - trial_info: Orb::Models::SubscriptionTrialInfoModel + status: Orb::Models::SubscriptionUpdateTrialResponse::Status, + trial_info: Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo } end end